org.opensubsystems.core.data
Class SimpleModifiableDataObject

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

public final class SimpleModifiableDataObject
extends ModifiableDataObject
implements java.io.Serializable

This class is the simplest case of modifiable data object and it is useful in situations when we need transfer only the most basic identification information skipping the business data. This class is made final so that nobody cannot derive from it new classes since thats what the parent is for.

Version:
$Id: SimpleModifiableDataObject.java,v 1.5 2007/01/07 06:14:17 bastafidli Exp $
Author:
Martin Cerba
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
1.3 2005/09/07 16:36:02

Field Summary
 
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
SimpleModifiableDataObject()
          Default constructor
SimpleModifiableDataObject(int iDomainId)
          Simple constructor creating new data object in particular domain.
SimpleModifiableDataObject(int iId, int iDomainId, java.sql.Timestamp creationTimestamp, java.sql.Timestamp modificationTimestamp)
          Full constructor
SimpleModifiableDataObject(ModifiableDataObject data)
          Copy constructor.
 
Method Summary
 boolean isSame(java.lang.Object oObject)
          Method to compare all data attributes of two objects to figure out, if their attributes are the same.
 
Methods inherited from class org.opensubsystems.core.data.ModifiableDataObject
equals, getModificationTimestamp, hashCode, 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, setFromPersistenceStore
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleModifiableDataObject

public SimpleModifiableDataObject()
Default constructor


SimpleModifiableDataObject

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

Parameters:
iDomainId - - domain this data object belongs to

SimpleModifiableDataObject

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

Parameters:
iId - - id of object
iDomainId - - domain id
creationTimestamp - - creation timestamp
modificationTimestamp - - modification timestamp

SimpleModifiableDataObject

public SimpleModifiableDataObject(ModifiableDataObject data)
Copy constructor.

Parameters:
data - - source data object
Method Detail

isSame

public boolean isSame(java.lang.Object oObject)
Method to compare all data attributes of two objects to figure out, if their attributes are the same. The objects can for example differ by database generated id and creation or modification timestamp but if other properties which represents the real data are the same then the objects are considered to be the same. This is weaker constraint that equals since not all attributes has to be the same, only the one which really represents the business data should match.

Specified by:
isSame in class DataObject
Parameters:
oObject - - Object to compare
Returns:
boolean - true if same, false otherwise


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