Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.elexis.data
Class LabGroup

java.lang.Object
  extended by ch.elexis.data.PersistentObject
      extended by ch.elexis.data.LabGroup
All Implemented Interfaces:
IPersistentObject, ISelectable, java.lang.Comparable<LabGroup>

public class LabGroup
extends PersistentObject
implements java.lang.Comparable<LabGroup>

A LabGroup is a named collection of LabItem elements.

Author:
Daniel Lutz

Nested Class Summary
 
Nested classes/interfaces inherited from class ch.elexis.data.PersistentObject
PersistentObject.FieldType
 
Field Summary
 
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
LabGroup(java.lang.String name, java.util.List<LabItem> items)
          Creates an new LabGroup with an initial list of entries.
 
Method Summary
 void addItem(LabItem item)
          Adds a new item to this group
 void addItems(java.util.List<LabItem> items)
          Add a list of items to add to this group.
 int compareTo(LabGroup arg0)
          Compare the names of two groups
 boolean delete()
          Ein Objekt und ggf. dessen XID's aus der Datenbank löschen the object is not deleted but rather marked as deleted.
 java.util.List<LabItem> getItems()
          Returns the list of items of this group
 java.lang.String getLabel()
          Einen menschenlesbaren Identifikationsstring für dieses Objet liefern
 java.lang.String getName()
          Get the name of this LabGroup;
static LabGroup load(java.lang.String id)
           
 void removeAll()
          Removes all items of this group
 void removeItem(LabItem item)
          Remove an item from this group
 void setItems(java.util.List<LabItem> items)
          Add a new set of items to this group.
 void setName(java.lang.String name)
          Set the name of this LabGroup;
 
Methods inherited from class ch.elexis.data.PersistentObject
addChangeListener, addSticker, addToList, addXid, begin, checkNull, checkZero, checkZeroDouble, clearCache, connect, connect, 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
 

Constructor Detail

LabGroup

public LabGroup(java.lang.String name,
                java.util.List<LabItem> items)
Creates an new LabGroup with an initial list of entries. Set items to null toe create an empty LabGroup

Parameters:
name - the name of the LabGroup
items - the initiall list of items (may be null)
Method Detail

delete

public boolean delete()
Description copied from class: PersistentObject
Ein Objekt und ggf. dessen XID's aus der Datenbank löschen the object is not deleted but rather marked as deleted. A purge must be applied to remove the object really

Overrides:
delete in class PersistentObject
Returns:
true on success

getName

public java.lang.String getName()
Get the name of this LabGroup;

Returns:
the name of the LabGroup

setName

public void setName(java.lang.String name)
Set the name of this LabGroup;

Parameters:
name - the name of the LabGroup

load

public static LabGroup load(java.lang.String id)

getLabel

public java.lang.String getLabel()
Description copied from class: PersistentObject
Einen menschenlesbaren Identifikationsstring für dieses Objet liefern

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

compareTo

public int compareTo(LabGroup arg0)
Compare the names of two groups

Specified by:
compareTo in interface java.lang.Comparable<LabGroup>

getItems

public java.util.List<LabItem> getItems()
Returns the list of items of this group

Returns:
a list of items

addItem

public void addItem(LabItem item)
Adds a new item to this group

Parameters:
item - the new item to be added

addItems

public void addItems(java.util.List<LabItem> items)
Add a list of items to add to this group. Existing items are preserved.

Parameters:
items - the items to be added

setItems

public void setItems(java.util.List<LabItem> items)
Add a new set of items to this group. Existing items are removed.

Parameters:
items - the new items to be added

removeItem

public void removeItem(LabItem item)
Remove an item from this group

Parameters:
item - the item to be removed

removeAll

public void removeAll()
Removes all items of this group


Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis