|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SandPersistMessage
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. |
static int |
WRITEACCESS_NORMAL
Indicates this instance can be modified. |
static int |
WRITEACCESS_READONLY
Indicates this instance may not be modified. |
| Method Summary | |
|---|---|
java.util.Date |
getCreationTime()
Return the immutable timestamp generated by the DataManager when the instance was first created. |
int |
getInstanceWriteAccess()
Return the write access for this instance. |
java.util.Date |
getLastAccessedTime()
Return the time this persistent instance was last accessed. |
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 |
setInstanceWriteAccess(int access)
Set the write access for this instance. |
void |
setLastAccessedTime(java.util.Date lastAccessed)
Set the lastAccessedTime for this instance. |
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.SandStructMessage |
|---|
find, getInstance, getInstance, getPrintname |
| Methods inherited from interface org.sandev.basics.structs.SandInstanceMessage |
|---|
cloneMessage, convertToSuperstructClass, copyFieldValue, debugDump, defaultField, fieldHasFlag, fieldsValid, fieldValidate, generalAccessor, generalDereference, generalModifier, getAllFields, getContainedMessageFields, getDisplayFields, getDisplayFieldsPrint, getDisplayID, getDisplayValues, getPrintnameForField |
| Methods inherited from interface org.sandev.basics.structs.SandMessage |
|---|
getCollectionMessage, getQueryMessage, getShortName, getStructMessage, getUpdateMessage, isEquivalent |
| Field Detail |
|---|
static final int WRITEACCESS_NORMAL
static final int WRITEACCESS_READONLY
static final int RECORDSTATUS_ACTIVE
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.
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 |
|---|
long getUniqueID()
void setUniqueID(long id)
java.util.Date getCreationTime()
java.util.Date getLastModifiedTime()
java.lang.String getLastModifiedReason()
void setLastModifiedReason(java.lang.String reason)
long getRevisionNumber()
This is declared as a long because it avoids the question of
whether any application will exceed 2,147,483,647 revisions.
void setRevisionNumber(long val)
java.util.Date getLastAccessedTime()
void setLastAccessedTime(java.util.Date lastAccessed)
int getInstanceWriteAccess()
void setInstanceWriteAccess(int access)
int getRecordStatus()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||