com.anasoft.os.daofusion.entity
Class PersistentEnumeration
java.lang.Object
com.anasoft.os.daofusion.entity.PersistentEntity<java.lang.Long>
com.anasoft.os.daofusion.entity.PersistentEnumeration
- All Implemented Interfaces:
- Persistable<java.lang.Long>, java.io.Serializable
public abstract class PersistentEnumeration
- extends PersistentEntity<java.lang.Long>
Base class for persistent enumerations managed within
the JPA / Hibernate persistence context.
Persistent enumeration is a special kind of persistent
entity which adds a name field with unique,
not-updatable and not-null constraints. The name
field must be manually set by the user before persisting
the instance. Persistent enumeration uses Long
as the primary key column type.
Note that the persistent enumeration provides
a hashCode()
and equals(Object)
implementation based on the name field.
- Author:
- vojtech.szocs
- See Also:
PersistentEntity
,
Serialized Form
Field Summary |
static java.lang.String |
_NAME
|
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
_NAME
public static final java.lang.String _NAME
- See Also:
- Constant Field Values
PersistentEnumeration
public PersistentEnumeration()
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
Copyright © 2008-2009 ANASOFT and contributors. All Rights Reserved.