|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensubsystems.core.data.DataObject
public abstract class DataObject
Base class for all data objects regardless of how they are persisted. Data object is here to implement Transfer Object pattern as described in http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html The main goal is to encapsulate set of related attributes as one object so they can be easily passed between different modules and tiers.
| Field Summary | |
|---|---|
static int |
NEW_ID
ID used when creating new object for which the real ID wasn't generated yet. |
static java.lang.Integer |
NEW_ID_OBJ
Object representation for easy reuse. |
static java.lang.String |
NEW_ID_STR
String representation for easy reuse. |
| Constructor Summary | |
|---|---|
DataObject()
|
|
| Method Summary | |
|---|---|
abstract int |
getId()
Get the id uniquely identifying the object. |
abstract java.lang.Integer |
getIdAsObject()
Get the id as object uniquely identifying the object. |
boolean |
isFromPersistenceStore()
Check if this record was loaded from some persistence store and therefore it is existing data object which was already created in the persistence store or it came from somewhere else (was created in memory). |
abstract boolean |
isSame(java.lang.Object oObject)
Method to compare all data attributes of two objects to figure out, if their attributes are the same. |
void |
setFromPersistenceStore()
Set flag that this record was loaded from some persistance store. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NEW_ID
public static final java.lang.Integer NEW_ID_OBJ
public static final java.lang.String NEW_ID_STR
| Constructor Detail |
|---|
public DataObject()
| Method Detail |
|---|
public boolean isFromPersistenceStore()
public void setFromPersistenceStore()
public abstract int getId()
public abstract java.lang.Integer getIdAsObject()
public abstract boolean isSame(java.lang.Object oObject)
oObject - - Object to compare
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||