Elexis API documentation
Version 2.1.6 as of December 11 2011

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

Author:
gerry

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_REMARK
           
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_PWD, CFG_TYPE, CFG_USER, DELETED, EXISTS, INEXISTENT, INVALID_ID, MATCH_AUTO, MATCH_CONTAINS, MATCH_EXACT, MATCH_REGEXP, MATCH_START
 
Fields inherited from interface ch.elexis.core.data.IPersistentObject
FLD_DATE, FLD_DELETED, FLD_EXTINFO, FLD_ID, FLD_LASTUPDATE, STATE_EXISTING, STATE_INEXISTENT, STATE_INVALID_ID
 
Constructor Summary
SampleDataType(Patient pat, java.lang.String title, int funFactor, int boreFactor)
          Create a new Object.
 
Method Summary
 int getFunFactor()
           
 byte[] getFunnyStuff()
           
 java.lang.String getLabel()
          This should return a human readable short description of this object.
 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, 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
 

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

FLD_REMARK

public static final java.lang.String FLD_REMARK
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 -
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:

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis