org.ow2.dragon.persistence.bo.common
Class BaseObject

java.lang.Object
  extended by org.ow2.dragon.persistence.bo.common.BaseObject
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
NonSearchableBaseObject, SearchableBaseObject

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

Base class for Model objects. Child objects should implement toString(), equals() and hashCode().

Author:
Matt Raible, Olivier Fabre
See Also:
Serialized Form

Constructor Summary
BaseObject()
           
 
Method Summary
abstract  boolean equals(java.lang.Object o)
          Compares object equality.
 java.util.Date getCreated()
           
 java.util.Date getLastUpdated()
           
abstract  int hashCode()
          When you override equals, you should override hashCode.
 void setCreated(java.util.Date created)
           
 void setLastUpdated(java.util.Date lastUpdated)
           
abstract  java.lang.String toString()
          Returns a multi-line String with key=value pairs.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseObject

public BaseObject()
Method Detail

toString

public abstract java.lang.String toString()
Returns a multi-line String with key=value pairs.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this class.

equals

public abstract boolean equals(java.lang.Object o)
Compares object equality. When using Hibernate, the primary key should not be a part of this comparison.

Overrides:
equals in class java.lang.Object
Parameters:
o - object to compare to
Returns:
true/false based on equality tests

hashCode

public abstract int hashCode()
When you override equals, you should override hashCode. See "Why are equals() and hashCode() importation" for more information: http://www.hibernate.org/109.html

Overrides:
hashCode in class java.lang.Object
Returns:
hashCode

getCreated

public java.util.Date getCreated()

setCreated

public void setCreated(java.util.Date created)

getLastUpdated

public java.util.Date getLastUpdated()

setLastUpdated

public void setLastUpdated(java.util.Date lastUpdated)


Copyright © 2008-2009 eBMWebsourcing. All Rights Reserved.