Arch4J 1.1

org.arch4j.persistence.domainmapper
Class BaseDomain

java.lang.Object
  |
  +--org.arch4j.persistence.domainmapper.BaseDomain

public abstract class BaseDomain
extends Object

The base class of all domain objects.

Author:
dcolwell

Constructor Summary
BaseDomain()
          Constructs an instance of the domain superclass and initializes the id to a universally unique identifier.
BaseDomain(Serializable id, long version)
          Constructs an instance of the domain superclass with the specified id and version.
 
Method Summary
 boolean equals(Object o)
           
 Serializable getId()
          Getter for property id.
 long getVersion()
          Getter for the version
 int hashCode()
           
 void setVersion(long aVersion)
          Setter for the version
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseDomain

public BaseDomain()
Constructs an instance of the domain superclass and initializes the id to a universally unique identifier. This method should be called when creating a new instance of the receiver that is not yet stored in the database.


BaseDomain

public BaseDomain(Serializable id,
                  long version)
Constructs an instance of the domain superclass with the specified id and version. This method should be called when creating a new instance of the receiver from the database.

Method Detail

getId

public Serializable getId()
Getter for property id.

Returns:
Value of property id.

getVersion

public long getVersion()
Getter for the version


setVersion

public void setVersion(long aVersion)
Setter for the version

Parameters:
aVersion - the new version

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Arch4J 1.1

Copyright © 2000-2004 SpiderLogic, a service of Wipfli Ullrich Bertelson LLP.