Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.elexis.data
Class NamedBlob2

java.lang.Object
  extended by ch.elexis.data.PersistentObject
      extended by ch.elexis.data.NamedBlob2
All Implemented Interfaces:
IPersistentObject, ISelectable
Direct Known Subclasses:
Script

public class NamedBlob2
extends PersistentObject

Well, just a clone of NamedBlob, but using table HEAP2 - sort of a cheap load balancing

Author:
Gerry

Nested Class Summary
 
Nested classes/interfaces inherited from class ch.elexis.data.PersistentObject
PersistentObject.FieldType
 
Field Summary
static java.lang.String FLD_CONTENTS
           
static java.lang.String FLD_DATUM
           
static java.lang.String TABLENAME
           
 
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
 
Method Summary
static void cleanup(java.lang.String prefix, TimeTool older)
          remove all BLOBS with a given name prefix and a last write time older than the given value needs the administrative right AC_PURGE
static NamedBlob2 create(java.lang.String name, boolean bFailIfExists)
          creates or loads a NamedBlob2
 byte[] getBytes()
          return the contents as array of bytes
 java.util.Hashtable getHashtable()
          return the contents as Hashtable (will probably fail if the data was not stored using put(Hashtable)
 java.lang.String getLabel()
          Einen menschenlesbaren Identifikationsstring für dieses Objet liefern
 java.lang.String getString()
          return the contents as String (will probably fail if the data was not stored using putString)
static NamedBlob2 load(java.lang.String id)
          Load or create a NamedBlob with a given Name.
 void put(java.util.Hashtable in)
          Put the contents as Hashtable.
 void putBytes(byte[] in)
          put the contents as array of bytes. the array will be stored in compressed form
 void putString(java.lang.String string)
          Store a String.
 
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_DATUM

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

FLD_CONTENTS

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

TABLENAME

public static final java.lang.String TABLENAME
See Also:
Constant Field Values
Method Detail

getBytes

public byte[] getBytes()
return the contents as array of bytes

Returns:
the contents

putBytes

public void putBytes(byte[] in)
put the contents as array of bytes. the array will be stored in compressed form

Parameters:
the - contents that will override previous contents

getHashtable

public java.util.Hashtable getHashtable()
return the contents as Hashtable (will probably fail if the data was not stored using put(Hashtable)

Returns:
the previously stored Hashtable

put

public void put(java.util.Hashtable in)
Put the contents as Hashtable. The Hashtable will be compressed

Parameters:
in - a Hashtable

getString

public java.lang.String getString()
return the contents as String (will probably fail if the data was not stored using putString)

Returns:
the previously stored string.

putString

public void putString(java.lang.String string)
Store a String. The String will be stored as compressed byte[]

Parameters:
string -

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

create

public static NamedBlob2 create(java.lang.String name,
                                boolean bFailIfExists)
creates or loads a NamedBlob2

Parameters:
name - the NamedBlob2 to get
bFailIfExists - true - create if not exists, otherwise return null. false: if exists:_ return existing

load

public static NamedBlob2 load(java.lang.String id)
Load or create a NamedBlob with a given Name.

Returns:
the NamedBlob with that Name or null if no such NamedBlob exists

cleanup

public static void cleanup(java.lang.String prefix,
                           TimeTool older)
remove all BLOBS with a given name prefix and a last write time older than the given value needs the administrative right AC_PURGE

Parameters:
prefix -
older -

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis