ch.elexis.developer.resources.model
Class SampleDataType
java.lang.Object
ch.elexis.data.PersistentObject
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
- Author:
- gerry
Fields inherited from class ch.elexis.data.PersistentObject |
CACHE_DEFAULT_LIFETIME, CACHE_MIN_LIFETIME, CFG_CONNECTSTRING, CFG_DRIVER, CFG_PWD, CFG_TYPE, CFG_USER, DELETED, EXISTS, INEXISTENT, INVALID_ID, MATCH_AUTO, MATCH_CONTAINS, MATCH_EXACT, MATCH_REGEXP, MATCH_START |
Constructor Summary |
SampleDataType(Patient pat,
java.lang.String title,
int funFactor,
int boreFactor)
Create a new Object. |
Methods inherited from class ch.elexis.data.PersistentObject |
addChangeListener, addSticker, addToList, addXid, begin, checkNull, checkZero, checkZeroDouble, clearCache, connect, connect, delete, deleteList, disconnect, equals, executeSQLScript, exists, exportData, fireChangeEvent, flatten, fold, get, get, getCacheTime, getConnection, getDefaultCacheLifetime, getFieldType, getId, getInt, getLastUpdate, getList, getList, getMap, getSticker, getStickers, getWrappedId, getXid, getXid, getXids, hashCode, isAvailable, isDeleted, isDragOK, isMatching, isMatching, isMatching, isMatching, isShowDeleted, isValid, lock, map, relock, removeChangeListener, removeFromList, removeFromList, removeSticker, resetCache, set, set, setDefaultCacheLifetime, setInt, setMap, setShowDeleted, setTrace, state, storeToString, tableExists, ts, undelete, unlock |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
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
FLD_REMARK
public static final java.lang.String FLD_REMARK
- See Also:
- Constant Field Values
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
-
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:
Copyright 2005-2011 by Gerry Weirich, Elexis