|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensubsystems.core.data.DataObject
org.opensubsystems.core.data.BasicDataObject
org.opensubsystems.core.data.ModifiableDataObject
org.opensubsystems.patterns.versioneddata.data.VersionedDataObject
public abstract class VersionedDataObject
Base class for all data objects, which can be versioned and therefore has to track the current version, if they are tip and the base version of, which this is a new version.
| Field Summary | |
|---|---|
static int |
FIRST_VERSION_NUMBER
This is the first version number for any versionable data object. |
protected boolean |
m_bTip
Flag if this data object is the latest (newest) version called tip. |
protected int |
m_iBaseVersionId
Id of the data object, which is base version of this data object. |
protected int |
m_iVersion
Data object version number. |
| Fields inherited from class org.opensubsystems.core.data.ModifiableDataObject |
|---|
m_modificationTimestamp |
| Fields inherited from class org.opensubsystems.core.data.BasicDataObject |
|---|
m_creationTimestamp, m_iDomainId |
| Fields inherited from class org.opensubsystems.core.data.DataObject |
|---|
NEW_ID, NEW_ID_OBJ, NEW_ID_STR |
| Constructor Summary | |
|---|---|
VersionedDataObject()
Default constructor. |
|
VersionedDataObject(int iDomainId)
Simple constructor creating new data object in particular domain. |
|
VersionedDataObject(int iId,
int iDomainId,
int iBaseVersionId,
boolean bTip,
int iVersion,
java.sql.Timestamp creationTimestamp,
java.sql.Timestamp modificationTimestamp)
Full constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object oObject)
|
int |
getBaseVersionId()
Get id of the data object, which is base version of this data object. |
int |
getVersion()
Get the actual version number of this data object. |
int |
hashCode()
|
boolean |
isTip()
Get flag if this data object is the latest (newest) version called tip. |
protected void |
restore(int iId,
int iDomainId,
int iBaseVersionId,
boolean bTip,
int iVersion,
java.sql.Timestamp creationTimestamp,
java.sql.Timestamp modificationTimestamp)
Restore all values from specified values. |
void |
setBaseVersionId(int baseVersionId)
Set id of the data object, which is base version of this data object. |
void |
setTip(boolean tip)
Set flag if this data object is the latest (newest) version called tip. |
void |
setVersion(int version)
Set the actual version number of this data object. |
| Methods inherited from class org.opensubsystems.core.data.ModifiableDataObject |
|---|
getModificationTimestamp, restore, setModificationTimestamp |
| Methods inherited from class org.opensubsystems.core.data.BasicDataObject |
|---|
getCreationTimestamp, getDomainId, getId, getIdAsObject, restore, setCreationTimestamp, setId |
| Methods inherited from class org.opensubsystems.core.data.DataObject |
|---|
isFromPersistenceStore, isSame, setFromPersistenceStore |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int FIRST_VERSION_NUMBER
protected int m_iBaseVersionId
protected boolean m_bTip
protected int m_iVersion
| Constructor Detail |
|---|
public VersionedDataObject()
public VersionedDataObject(int iDomainId)
iDomainId - - domain this data object belongs to
public VersionedDataObject(int iId,
int iDomainId,
int iBaseVersionId,
boolean bTip,
int iVersion,
java.sql.Timestamp creationTimestamp,
java.sql.Timestamp modificationTimestamp)
iId - - id of this data objectiDomainId - - domain this data object belongs toiBaseVersionId - - data object base version IDbTip - - flag if this data object is TIPiVersion - - version number of this data objectcreationTimestamp - - timestamp when the data object was created.modificationTimestamp - - timestamp when the data object was last
time modified.| Method Detail |
|---|
public int getBaseVersionId()
public void setBaseVersionId(int baseVersionId)
baseVersionId - - id of the version on which is this object based onpublic boolean isTip()
public void setTip(boolean tip)
tip - - true if this is the tip - latest (newest) versionpublic int getVersion()
public void setVersion(int version)
version - - version of this objectpublic boolean equals(java.lang.Object oObject)
equals in class org.opensubsystems.core.data.ModifiableDataObjectpublic int hashCode()
hashCode in class org.opensubsystems.core.data.ModifiableDataObject
protected void restore(int iId,
int iDomainId,
int iBaseVersionId,
boolean bTip,
int iVersion,
java.sql.Timestamp creationTimestamp,
java.sql.Timestamp modificationTimestamp)
iId - - id of this data objectiDomainId - - domain this data object belongs toiBaseVersionId - - data object base version IDbTip - - flag if this data object is TIPiVersion - - version number of this data objectcreationTimestamp - - timestamp when the data object was created.modificationTimestamp - - timestamp when the data object was last
time modified.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||