The Encog Project

org.encog.util.orm
Class DataObject

java.lang.Object
  extended by org.encog.util.orm.DataObject
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Alias, Fix, Lemma, Word, WordType, WordTypePossibility, WorkloadItem

public abstract class DataObject
extends java.lang.Object
implements java.io.Serializable

This is the superclass for all Encog Hibernate persisted classes. It provides basic versioning and object id functions required by all Encog database persisted classes. Do not confuse this class with the EncogPersistedCollection class, which is used to save neural networks and related files to disk. This class is exclusively used for database mapped objects.

Author:
jheaton
See Also:
Serialized Form

Constructor Summary
DataObject()
           
 
Method Summary
protected  void copy(DataObject source)
          Copy this object from another.
 boolean equals(java.lang.Object obj)
          Determine if this object equals another.
protected static boolean getBooleanValue(java.lang.Boolean value)
          Convert a Boolean value.
 java.util.Date getCreated()
           
 java.lang.Long getId()
           
 java.util.Date getLastUpdate()
           
 int getVersion()
           
 void setCreated(java.util.Date created)
          Set the create date for this object.
 void setLastUpdate(java.util.Date lastUpdate)
          Set the last update date.
abstract  void validate()
          Validate this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataObject

public DataObject()
Method Detail

getBooleanValue

protected static boolean getBooleanValue(java.lang.Boolean value)
Convert a Boolean value.

Parameters:
value - The boolean value.
Returns:
The boolean value.

copy

protected void copy(DataObject source)
Copy this object from another.

Parameters:
source - The object being copied.

equals

public boolean equals(java.lang.Object obj)
Determine if this object equals another.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The other object to test equality with.
Returns:
True if the two objects are equal.

getCreated

public java.util.Date getCreated()
Returns:
When this object was created.

getId

public java.lang.Long getId()
Returns:
The id for this object.

getLastUpdate

public java.util.Date getLastUpdate()
Returns:
When this object was last updated.

getVersion

public int getVersion()
Returns:
The version of this object.

setCreated

public void setCreated(java.util.Date created)
Set the create date for this object.

Parameters:
created - The date this object was created.

setLastUpdate

public void setLastUpdate(java.util.Date lastUpdate)
Set the last update date.

Parameters:
lastUpdate - The last update date.

validate

public abstract void validate()
Validate this object.


The Encog Project