Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013

ch.elexis.developer.resources.model
Class SampleDataType

java.lang.Object
  extended by ch.elexis.data.PersistentObject
      extended by ch.elexis.developer.resources.model.SampleDataType
All Implemented Interfaces:
IPersistentObject, ISelectable

public class SampleDataType
extends PersistentObject

This is an example on how to derive your own type from PersistentObject and make it persistent


Nested Class Summary
 
Nested classes/interfaces inherited from class ch.elexis.data.PersistentObject
PersistentObject.FieldType
 
Field Summary
static java.lang.String FLD_BOREFACTOR
           
static java.lang.String FLD_FUNFACTOR
           
static java.lang.String FLD_FUNNY_STUFF
           
static java.lang.String FLD_PATIENT_ID
           
static java.lang.String FLD_TITLE
           
 
Fields inherited from class ch.elexis.data.PersistentObject
CACHE_DEFAULT_LIFETIME, CACHE_MIN_LIFETIME, CFG_CONNECTSTRING, CFG_DRIVER, CFG_FOLDED_CONNECTION, CFG_PWD, CFG_TYPE, CFG_USER, DATE_COMPOUND, default_lifetime, DELETED, EXISTS, FLD_DATE, FLD_DELETED, FLD_EXTINFO, FLD_LASTUPDATE, INEXISTENT, INVALID_ID, log, MAPPING_ERROR_MARKER, MATCH_AUTO, MATCH_CONTAINS, MATCH_EXACT, MATCH_REGEXP, MATCH_START
 
Fields inherited from interface ch.elexis.core.data.IPersistentObject
FLD_ID, STATE_EXISTING, STATE_INEXISTENT, STATE_INVALID_ID
 
Constructor Summary
  SampleDataType(Patient pat, java.lang.String title, int funFactor, int boreFactor)
          Create a new Object.
protected SampleDataType(java.lang.String id)
          The constructor with a String parameter must be present
 
Method Summary
 int getFunFactor()
           
 byte[] getFunnyStuff()
           
 java.lang.String getLabel()
          This should return a human readable short description of this object.
protected  java.lang.String getTableName()
          This must return the name of the Table this class will reside in.
 java.lang.String getTitle()
           
static SampleDataType load(java.lang.String id)
          This static method should always be defined.
 void setFunnyThings(byte[] funny)
          accessor methods can be created as useful
 
Methods inherited from class ch.elexis.data.PersistentObject
addChangeListener, addMapping, addSticker, addToList, addXid, begin, checkNull, checkZero, checkZeroDouble, clearCache, connect, connect, create, createOrModifyTable, delete, deleteList, disconnect, equals, executeScript, executeSQLScript, exists, exportData, flatten, fold, get, get, getBinary, getCacheTime, getConnection, getConstraint, getDefaultCacheLifetime, getExportFields, getExportUIDValue, getExportUIDVersion, getFieldType, getId, getInt, getLastUpdate, getList, getList, getMap, getSticker, getStickers, getVersionedResource, getWrappedId, getXid, getXid, getXids, hashCode, isAvailable, isDeleted, isDragOK, isMatching, isMatching, isMatching, isMatching, isValid, lock, map, removeChangeListener, removeFromList, removeFromList, removeSticker, removeTable, resetCache, set, set, setBinary, setConstraint, setDefaultCacheLifetime, setInt, setMap, setTrace, setVersionedResource, state, storeToString, tableExists, ts, undelete, unlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLD_PATIENT_ID

public static final java.lang.String FLD_PATIENT_ID
See Also:
Constant Field Values

FLD_FUNNY_STUFF

public static final java.lang.String FLD_FUNNY_STUFF
See Also:
Constant Field Values

FLD_BOREFACTOR

public static final java.lang.String FLD_BOREFACTOR
See Also:
Constant Field Values

FLD_FUNFACTOR

public static final java.lang.String FLD_FUNFACTOR
See Also:
Constant Field Values

FLD_TITLE

public static final java.lang.String FLD_TITLE
See Also:
Constant Field Values
Constructor Detail

SampleDataType

public SampleDataType(Patient pat,
                      java.lang.String title,
                      int funFactor,
                      int boreFactor)
Create a new Object. Any constructor except the empty constructor and the constructor with a single String argument are possible

Parameters:
title -
funFactor -
boreFactor -

SampleDataType

protected SampleDataType(java.lang.String id)
The constructor with a String parameter must be present

Parameters:
id -
Method Detail

setFunnyThings

public void setFunnyThings(byte[] funny)
accessor methods can be created as useful

Parameters:
funny -

getFunnyStuff

public byte[] getFunnyStuff()

getTitle

public java.lang.String getTitle()

getFunFactor

public int getFunFactor()

getLabel

public java.lang.String getLabel()
This should return a human readable short description of this object. The getLabel Method should be fast because it is called frequently.

Specified by:
getLabel in interface IPersistentObject
Specified by:
getLabel in class PersistentObject

load

public static SampleDataType load(java.lang.String id)
This static method should always be defined. We need this to retrieve PersistentObjects from the Database

Parameters:
id -
Returns:

getTableName

protected java.lang.String getTableName()
This must return the name of the Table this class will reside in. This may be an existent table or one specificallym created by this plugin.

Specified by:
getTableName in class PersistentObject
Returns:
Der Name einer bereits existierenden Tabelle der Datenbank

Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013