|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface to identify those SandStructMessages which are persistent.
A SandPersistMessage contains automatically generated fields used for
instance identification and tracking over time. These fields are reflected
through the accessor methods defined by this interface. With the exception
of lastModifiedReason (which may be used for any purpose by
the application code), these fields are the responsibility of the
DataManager and are only
modified within a Persister
implementation.
The uniqueID (primary key) for an instance is immutable.
The setUniqueID method is provided to support temporary IDs
for reference structures in an AggregateUpdate message.
See Persist.html
in the top level documentation for more information on persistency.
| Field Summary | |
static int |
RECORDSTATUS_ACTIVE
Indicates everything is normal. |
static int |
RECORDSTATUS_ARCHIVED
Historical information can accumulate significantly over time. |
static int |
RECORDSTATUS_DELETED
Indicates this instance no longer exists. |
| Fields inherited from interface org.sandev.basics.structs.SandInstanceMessage |
FIELDCHECK_INVALIDVAL, FIELDCHECK_NOTAREF, FIELDCHECK_NOTINRANGE, FIELDCHECK_NULLARRAY, FIELDCHECK_STRINGOVER, FIELDCHECK_UNKNOWNVAL, FIELDFLAG_BINARY, FIELDFLAG_ENCRYPT, FIELDFLAG_INTERNAL, FIELDFLAG_NOECHO, FIELDFLAG_OBFUSCATE, FIELDFLAG_STRINGPERSIST, FIELDFLAG_UNIQUE, GENMOD_ACTION_APPEND, GENMOD_ACTION_INSERT, GENMOD_ACTION_REMOVE, GENMOD_ACTION_SET |
| Method Summary | |
java.util.Date |
getCreationTime()
Return the immutable timestamp generated by the DataManager when the instance was first created. |
java.lang.String |
getLastModifiedReason()
Return the arbitrary text optionally supplied by the application as part of the last update message. |
java.util.Date |
getLastModifiedTime()
Return the immutable timestamp generated by the DataManager when the instance was last updated. |
int |
getRecordStatus()
Returns the RECORDSTATUS_* value for this instance. |
long |
getRevisionNumber()
Return the number of times this instance has been updated. |
long |
getUniqueID()
Returns the immutable unique identifier generated by the DataManager when the instance was first created. |
void |
setLastModifiedReason(java.lang.String reason)
Set the last modified reason. |
void |
setRevisionNumber(long val)
Set the number of times this instance has been updated. |
void |
setUniqueID(long id)
Sets the immutable unique identifier generated by the DataManager when the instance was first created. |
| Methods inherited from interface org.sandev.basics.structs.SandInstanceMessage |
cloneMessage, convertToSuperstructClass, copyFieldValue, debugDump, defaultField, fieldHasFlag, fieldsValid, fieldValidate, generalAccessor, generalDereference, generalModifier, getAllFields, getDisplayFields, getDisplayValues |
| Methods inherited from interface org.sandev.basics.structs.SandMessage |
getCollectionMessage, getQueryMessage, getShortName, getStructMessage, getUpdateMessage, isEquivalent |
| Field Detail |
public static final int RECORDSTATUS_ACTIVE
public static final int RECORDSTATUS_DELETED
Anything that is RECORDSTATUS_DELETED, which does not track history, can be permanently removed from persistent storage. If a deleted instance is removed from permanent storage, it will generally not be possible for the application to distinguish between the deletion and the instance never having been created.
public static final int RECORDSTATUS_ARCHIVED
When removing records from active storage, the first historical
record of the removed block is left in active storage with
RECORDSTATUS_ARCHIVED. This allows the DataManager to realize
this is not a case of missing or bad data, and it allows the
application to smoothly pick up where the current DataManager
left off (possibly by querying an archive DataManager).
It is recommended, though not required, that the tagging
of information as archived be done through the DataManager.
The DataManager will mark all active records older than the
cutoff as archived.
| Method Detail |
public long getUniqueID()
public void setUniqueID(long id)
public java.util.Date getCreationTime()
public java.util.Date getLastModifiedTime()
public java.lang.String getLastModifiedReason()
public void setLastModifiedReason(java.lang.String reason)
public long getRevisionNumber()
This is declared as a long because it avoids the question of
whether any application will exceed 2,147,483,647 revisions.
public void setRevisionNumber(long val)
public int getRecordStatus()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||