|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.smartlab.web.Enumeration
public abstract class Enumeration
Represents a meta type used to constraint a property to accept only
pre-defined admitted values. Whenever a property needs some sort of
constraint on assignable values, like person gender or process status, a
subclass of Enumeration
can be used to enumerate all possible
values.
Constructor Summary | |
---|---|
protected |
Enumeration()
Default constructor used for internal purposes only. |
protected |
Enumeration(int id,
java.lang.String display)
Constructs an available choice on a unique identifier and a brief, human understandable, description. |
Method Summary | |
---|---|
java.lang.Object |
assemble(java.io.Serializable arg0,
java.lang.Object arg1)
|
abstract Enumeration |
decode(int id)
Decodes a unique identifier into an instance of this class. |
java.lang.Object |
deepCopy(java.lang.Object value)
|
java.io.Serializable |
disassemble(java.lang.Object arg0)
|
boolean |
equals(java.lang.Object other)
|
boolean |
equals(java.lang.Object src,
java.lang.Object dst)
|
java.lang.String |
getDisplay()
Returns the brief description of the choice. |
int |
getId()
Returns the unique identifier for the choice. |
int |
hashCode()
|
int |
hashCode(java.lang.Object obj)
|
boolean |
isMutable()
|
java.lang.Object |
nullSafeGet(java.sql.ResultSet rows,
java.lang.String[] names,
java.lang.Object owner)
|
void |
nullSafeSet(java.sql.PreparedStatement statement,
java.lang.Object value,
int index)
|
java.lang.Object |
replace(java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2)
|
java.lang.Class |
returnedClass()
|
int[] |
sqlTypes()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Enumeration()
protected Enumeration(int id, java.lang.String display)
id
- the unique identifier for this choice.display
- a short, human understandable, description of the choice.Method Detail |
---|
public int getId()
public java.lang.String getDisplay()
public abstract Enumeration decode(int id)
null
values, instead it should define
a default value.
id
- the identifier to decode.
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public java.lang.Object deepCopy(java.lang.Object value) throws org.hibernate.HibernateException
deepCopy
in interface org.hibernate.usertype.UserType
org.hibernate.HibernateException
UserType.deepCopy(java.lang.Object)
public boolean equals(java.lang.Object src, java.lang.Object dst) throws org.hibernate.HibernateException
equals
in interface org.hibernate.usertype.UserType
org.hibernate.HibernateException
UserType.equals(java.lang.Object,
java.lang.Object)
public boolean isMutable()
isMutable
in interface org.hibernate.usertype.UserType
UserType.isMutable()
public java.lang.Object nullSafeGet(java.sql.ResultSet rows, java.lang.String[] names, java.lang.Object owner) throws org.hibernate.HibernateException, java.sql.SQLException
nullSafeGet
in interface org.hibernate.usertype.UserType
org.hibernate.HibernateException
java.sql.SQLException
UserType.nullSafeGet(java.sql.ResultSet,
java.lang.String[], java.lang.Object)
public void nullSafeSet(java.sql.PreparedStatement statement, java.lang.Object value, int index) throws org.hibernate.HibernateException, java.sql.SQLException
nullSafeSet
in interface org.hibernate.usertype.UserType
org.hibernate.HibernateException
java.sql.SQLException
UserType.nullSafeSet(java.sql.PreparedStatement,
java.lang.Object, int)
public java.lang.Class returnedClass()
returnedClass
in interface org.hibernate.usertype.UserType
UserType.returnedClass()
public int[] sqlTypes()
sqlTypes
in interface org.hibernate.usertype.UserType
UserType.sqlTypes()
public java.lang.Object assemble(java.io.Serializable arg0, java.lang.Object arg1) throws org.hibernate.HibernateException
assemble
in interface org.hibernate.usertype.UserType
org.hibernate.HibernateException
UserType.assemble(java.io.Serializable,
java.lang.Object)
public java.io.Serializable disassemble(java.lang.Object arg0) throws org.hibernate.HibernateException
disassemble
in interface org.hibernate.usertype.UserType
org.hibernate.HibernateException
UserType.disassemble(java.lang.Object)
public int hashCode(java.lang.Object obj) throws org.hibernate.HibernateException
hashCode
in interface org.hibernate.usertype.UserType
org.hibernate.HibernateException
UserType.hashCode(java.lang.Object)
public java.lang.Object replace(java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2) throws org.hibernate.HibernateException
replace
in interface org.hibernate.usertype.UserType
org.hibernate.HibernateException
UserType.replace(java.lang.Object,
java.lang.Object, java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |