|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.smartlab.web.StringEnumeration
public abstract class StringEnumeration
This class allows to use string to define enumeration elements identifier but
needs the definition of two constructors. Implementors of this class need to
define two constructors: one without parameters which simply calls
super() and an additional one taking two strings and calling
super(String, String).
| Field Summary | |
|---|---|
protected java.lang.String |
code
TODO documentation |
| Constructor Summary | |
|---|---|
protected |
StringEnumeration()
Default constructor used for internal purposes only. |
protected |
StringEnumeration(java.lang.String code,
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)
|
int |
compareTo(java.lang.Object obj)
|
abstract StringEnumeration |
decode(java.lang.String code)
Decodes a unique code 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 |
getCode()
Returns the enumeration element code. |
java.lang.String |
getDisplay()
Returns the enumeration element display name. |
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 |
| Field Detail |
|---|
protected java.lang.String code
| Constructor Detail |
|---|
protected StringEnumeration()
protected StringEnumeration(java.lang.String code,
java.lang.String display)
id - the unique identifier for this choice.display - a short, human understandable, description of the choice.| Method Detail |
|---|
public java.lang.String getCode()
public java.lang.String getDisplay()
public abstract StringEnumeration decode(java.lang.String code)
null values, instead it should define a
default value.
code - the code to decode.
public boolean equals(java.lang.Object other)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public int[] sqlTypes()
sqlTypes in interface org.hibernate.usertype.UserTypeUserType.sqlTypes()public java.lang.Class returnedClass()
returnedClass in interface org.hibernate.usertype.UserTypeUserType.returnedClass()
public boolean equals(java.lang.Object src,
java.lang.Object dst)
throws org.hibernate.HibernateException
equals in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionUserType.equals(java.lang.Object,
java.lang.Object)
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.UserTypeorg.hibernate.HibernateException
java.sql.SQLExceptionUserType.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.UserTypeorg.hibernate.HibernateException
java.sql.SQLExceptionUserType.nullSafeSet(java.sql.PreparedStatement,
java.lang.Object, int)
public java.lang.Object deepCopy(java.lang.Object value)
throws org.hibernate.HibernateException
deepCopy in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionUserType.deepCopy(java.lang.Object)public boolean isMutable()
isMutable in interface org.hibernate.usertype.UserTypeUserType.isMutable()
public java.lang.Object assemble(java.io.Serializable arg0,
java.lang.Object arg1)
throws org.hibernate.HibernateException
assemble in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionTODO implement
public java.io.Serializable disassemble(java.lang.Object arg0)
throws org.hibernate.HibernateException
disassemble in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionTODO
implement
public int hashCode(java.lang.Object obj)
throws org.hibernate.HibernateException
hashCode in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionUserType.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.UserTypeorg.hibernate.HibernateExceptionTODO implementpublic int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparablejava.lang.Comparable#compareTo(T)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||