|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPersistentObject
An IPersistentObject is an abstract representation of an Object with a number of features:
Field Summary | |
---|---|
static int |
DELETED
An object with this ID exists but is marked deleted |
static java.lang.String |
FLD_DATE
predefined property that holds the date of creation of this object in the form YYYYMMDD |
static java.lang.String |
FLD_DELETED
predefined property to hande a field that marks the Object as deleted |
static java.lang.String |
FLD_EXTINFO
predefined property to handle a field that is a compressed HashMap |
static java.lang.String |
FLD_ID
predefined field name for the GUID |
static java.lang.String |
FLD_LASTUPDATE
predefined property that holds an automatically updated field containing the last update of this object as long value (milliseconds as in Date()) |
static int |
MATCH_AUTO
Try to find match method. |
static int |
MATCH_CONTAINS
String must contain test (ignoring case) |
static int |
MATCH_EXACT
Strings must match exactly (but ignore case) |
static int |
MATCH_REGEXP
String must match as regular expression |
static int |
MATCH_START
String must start with test (ignoring case) |
static int |
STATE_EXISTING
This is an existing object |
static int |
STATE_INEXISTENT
An object with this ID does not exist |
static int |
STATE_INVALID_ID
This id is not valid |
Method Summary | |
---|---|
void |
addChangeListener(IChangeListener listener,
java.lang.String propertyToObserve)
Add a listener to this object that will be informed, if a given property gets changed. |
void |
addSticker(ISticker et)
Add a Sticker to this object |
boolean |
addXid(java.lang.String domain,
java.lang.String domain_id,
boolean updateIfExists)
Assign a Xid to this object. |
boolean |
exists()
Check whether an object exists (i.e. lives in the database and is NOT marked as deleted) |
java.lang.String |
get(java.lang.String field)
get a named property |
boolean |
get(java.lang.String[] fields,
java.lang.String[] values)
Mehrere Felder auf einmal auslesen |
java.lang.String |
getId()
Return an identifier for this object that is guaranteed to be globally unique. |
int |
getInt(java.lang.String field)
read a property that is an Integer |
java.lang.String |
getLabel()
return a human readable identifier (not necessarily unique) for this Object |
long |
getLastUpdate()
return the time of the last update of this object |
java.util.Map<?,?> |
getMap(java.lang.String field)
Read a property that contains a Map |
ISticker |
getSticker()
Find the "highest" or the only Sticker of this object |
java.util.List<ISticker> |
getStickers()
Return all Stickers attributed to this object |
IXid |
getXid()
return the "best" Xid for a given object. |
java.lang.String |
getXid(java.lang.String domain)
Return an domain_id of a XID for a specified domain |
java.util.List<IXid> |
getXids()
retrieve all Xids of this object |
boolean |
isAvailable()
Check wether the object exists in the database. |
boolean |
isDeleted()
Deprecated. use state() |
boolean |
isDragOK()
check wether this object may dragged and dropped . |
boolean |
isMatching(IPersistentObject other,
int mode,
java.lang.String... fields)
Testet ob zwei Objekte bezüglich definierbarer Felder übereinstimmend sind |
boolean |
isMatching(java.util.List<Query.Term> terms)
|
boolean |
isMatching(java.util.Map<java.lang.String,java.lang.String> fields,
int mode,
boolean bSkipInexisting)
Testet ob dieses Objekt den angegebenen Feldern entspricht. |
boolean |
isMatching(java.lang.String[] fields,
int mode,
java.lang.String... others)
testet, ob die angegebenen Felder den angegebenen Werten entsprechen. |
boolean |
isValid()
Tell whether this Object is valid (measured by its own implementation dependent means) |
void |
removeChangeListener(IChangeListener listener,
java.lang.String propertyObserved)
Remove a property change listener. |
void |
removeSticker(ISticker st)
Remove a Stickerfrom this object |
boolean |
set(java.lang.String[] fields,
java.lang.String[] values)
Mehrere Felder auf einmal setzen (Effizienter als einzelnes set) |
boolean |
set(java.lang.String field,
java.lang.String value)
Store a property |
boolean |
setInt(java.lang.String field,
int value)
Set a value of type int. |
void |
setMap(java.lang.String field,
java.util.Map<java.lang.Object,java.lang.Object> map)
store a property that is a map. |
int |
state()
Check the state of an object with this ID Note: This method accesses the database and therefore is much more costly than the simple instantaniation of a PersistentObject |
java.lang.String |
storeToString()
Serialize this object into a String. |
Field Detail |
---|
static final java.lang.String FLD_ID
static final java.lang.String FLD_EXTINFO
static final java.lang.String FLD_DELETED
static final java.lang.String FLD_LASTUPDATE
static final java.lang.String FLD_DATE
static final int STATE_INEXISTENT
static final int STATE_INVALID_ID
static final int DELETED
static final int STATE_EXISTING
static final int MATCH_EXACT
static final int MATCH_START
static final int MATCH_REGEXP
static final int MATCH_CONTAINS
static final int MATCH_AUTO
Method Detail |
---|
java.lang.String getLabel()
boolean isValid()
java.lang.String getId()
java.lang.String storeToString()
int state()
boolean exists()
boolean isAvailable()
java.lang.String getXid(java.lang.String domain)
domain
-
IXid getXid()
java.util.List<IXid> getXids()
boolean addXid(java.lang.String domain, java.lang.String domain_id, boolean updateIfExists)
domain
- the domain whose ID will be assigneddomain_id
- the id out of the given domain fot this objectupdateIfExists
- if true update values if Xid with same domain and domain_id
exists. Otherwise the method will fail if a collision occurs.
ISticker getSticker()
java.util.List<ISticker> getStickers()
void removeSticker(ISticker st)
st
- the Sticker to removevoid addSticker(ISticker et)
et
- the Sticker to addboolean isDeleted()
boolean isDragOK()
java.lang.String get(java.lang.String field)
field
- name of the Property
java.util.Map<?,?> getMap(java.lang.String field)
field
- Name of the map
int getInt(java.lang.String field)
field
- name of the Property
boolean set(java.lang.String field, java.lang.String value)
field
- name of the Property to writevalue
- value of the property. Any preexistent value will be overwritten.
void setMap(java.lang.String field, java.util.Map<java.lang.Object,java.lang.Object> map) throws PersistenceException
field
- Name of the mapmap
- the map to store. The map will be serialized in an implementation dependent way.
PersistenceException
- on storage failureboolean setInt(java.lang.String field, int value)
field
- a table field of numeric typevalue
- the value to be set
boolean set(java.lang.String[] fields, java.lang.String[] values)
fields
- die Feldnamenvalues
- die Werte
boolean get(java.lang.String[] fields, java.lang.String[] values)
fields
- die Feldervalues
- String Array für die gelesenen Werte
boolean isMatching(IPersistentObject other, int mode, java.lang.String... fields)
other
- anderes Objektmode
- gleich, LIKE oder Regexpfields
- die interessierenden Felder
boolean isMatching(java.lang.String[] fields, int mode, java.lang.String... others)
fields
- die zu testenden Feldemode
- Testmodus (MATCH_EXACT, MATCH_LIKE oder MATCH_REGEXP)others
- die Vergleichswerte
boolean isMatching(java.util.Map<java.lang.String,java.lang.String> fields, int mode, boolean bSkipInexisting)
fields
- HashMap mit name,wert paaren für die Feldermode
- Testmodus (MATCH_EXACT, MATCH_BEGIN, MATCH_REGEXP,
MATCH_CONTAIN oder MATCH_AUTO)bSkipInexisting
- don't return false if a fieldname is not found but skip this
field instead
boolean isMatching(java.util.List<Query.Term> terms)
long getLastUpdate()
void addChangeListener(IChangeListener listener, java.lang.String propertyToObserve)
listener
- The Listener to attachpropertyToObserve
- the name of the property to observevoid removeChangeListener(IChangeListener listener, java.lang.String propertyObserved)
listener
- the listener to removepropertyObserved
- the property that was observed by this listener.
|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |