org.opensubsystems.core.data
Class ModifiableDataObject

java.lang.Object
  extended by org.opensubsystems.core.data.DataObject
      extended by org.opensubsystems.core.data.BasicDataObject
          extended by org.opensubsystems.core.data.ModifiableDataObject
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
SimpleModifiableDataObject

public abstract class ModifiableDataObject
extends BasicDataObject

Base class for all data objects, which can be modified and therefore want to track when they were last modified.

Version:
$Id: ModifiableDataObject.java,v 1.7 2007/01/07 06:14:17 bastafidli Exp $
Author:
Miro Halas
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
1.5 2005/08/22 06:29:10 bastafidli

Field Summary
protected  java.sql.Timestamp m_modificationTimestamp
          Modification timestamp when the data object was last time modified.
 
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
ModifiableDataObject()
          Default constructor.
ModifiableDataObject(int iDomainId)
          Simple constructor creating new data object in particular domain.
ModifiableDataObject(int iId, int iDomainId, java.sql.Timestamp creationTimestamp, java.sql.Timestamp modificationTimestamp)
          Full constructor.
 
Method Summary
 boolean equals(java.lang.Object oObject)
          
 java.sql.Timestamp getModificationTimestamp()
          Get modification timestamp when the data object was last time modified.
 int hashCode()
          
protected  void restore(int iId, int iDomainId, java.sql.Timestamp creationTimestamp, java.sql.Timestamp modificationTimestamp)
          Restore all values from specified values.
 void setModificationTimestamp(java.sql.Timestamp modificationTimestamp)
          Set modification timestamp when the data object was last time modified.
 
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

m_modificationTimestamp

protected java.sql.Timestamp m_modificationTimestamp
Modification timestamp when the data object was last time modified.

Constructor Detail

ModifiableDataObject

public ModifiableDataObject()
Default constructor.


ModifiableDataObject

public ModifiableDataObject(int iDomainId)
Simple constructor creating new data object in particular domain.

Parameters:
iDomainId - - domain this data object belongs to

ModifiableDataObject

public ModifiableDataObject(int iId,
                            int iDomainId,
                            java.sql.Timestamp creationTimestamp,
                            java.sql.Timestamp modificationTimestamp)
Full constructor.

Parameters:
iId - - id of this data object
iDomainId - - domain this data object belongs to
creationTimestamp - - timestamp when the data object was created.
modificationTimestamp - - timestamp when the data object was last time modified.
Method Detail

getModificationTimestamp

public java.sql.Timestamp getModificationTimestamp()
Get modification timestamp when the data object was last time modified.

Returns:
Timestamp

setModificationTimestamp

public void setModificationTimestamp(java.sql.Timestamp modificationTimestamp)
Set modification timestamp when the data object was last time modified.

Parameters:
modificationTimestamp - - new modification timestamp

equals

public boolean equals(java.lang.Object oObject)

Overrides:
equals in class BasicDataObject

hashCode

public int hashCode()

Overrides:
hashCode in class BasicDataObject

restore

protected void restore(int iId,
                       int iDomainId,
                       java.sql.Timestamp creationTimestamp,
                       java.sql.Timestamp modificationTimestamp)
Restore all values from specified values. This is here to reinitialize object in case it needs to be reused or reconstructed (e.g. when rollback is issued).

Parameters:
iId - - id of this data object
iDomainId - - domain this data object belongs to
creationTimestamp - - timestamp when the data object was created.
modificationTimestamp - - timestamp when the data object was last time modified.


Copyright © 2003 - 2006 OpenSubsystems s.r.o.