net.sourceforge.domian.entity
Class AbstractEntity
java.lang.Object
net.sourceforge.domian.entity.AbstractEntity
- All Implemented Interfaces:
- Entity
- Direct Known Subclasses:
- AbstractRandomIntegerEntity, AbstractRandomLongEntity, AbstractUUIDEntity
public abstract class AbstractEntity
- extends java.lang.Object
- implements Entity
Abstract class for all entity objects, ensuring consistent/unchanging
equals
/hashCode
methods, not influenced by mutable state.
- Since:
- 0.4
- Author:
- Eirik Torske
Field Summary |
protected java.lang.Integer |
version
For possible use of RDBMS optimistic locking. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
version
protected java.lang.Integer version
- For possible use of RDBMS optimistic locking.
AbstractEntity
public AbstractEntity()
getVersion
public java.lang.Integer getVersion()
setVersion
public void setVersion(java.lang.Integer version)
isEntity
public final java.lang.Boolean isEntity()
isValueObject
public final java.lang.Boolean isValueObject()
hashCode
public final int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public final boolean equals(java.lang.Object otherObject)
- Overrides:
equals
in class java.lang.Object
doWarnLog
protected void doWarnLog(java.lang.String message)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2006-2009. All Rights Reserved.