|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcoderz.commons.util.UserTypeBase
org.jcoderz.commons.util.StringUserTypeBase
public abstract class StringUserTypeBase
This class is used by the Hibernate binding for RestrictedStrings.
A subclass has to implement the fromString method
for the particular RestrictedString. Be aware that VARCHAR is
restricted to 1000 Unicode characters!
| Constructor Summary | |
|---|---|
StringUserTypeBase()
|
|
| Method Summary | |
|---|---|
abstract Object |
fromString(String value)
Implement this method for the particular RestrictedString. |
abstract Object |
getEmptyOrNull()
Implement this method for the particular RestrictedString. |
Object |
nullSafeGet(ResultSet resultSet,
String[] types,
Object owner)
|
void |
nullSafeSet(PreparedStatement statement,
Object value,
int index)
|
int[] |
sqlTypes()
|
| Methods inherited from class org.jcoderz.commons.util.UserTypeBase |
|---|
assemble, deepCopy, disassemble, equals, hashCode, isMutable, replace, returnedClass |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringUserTypeBase()
| Method Detail |
|---|
public Object nullSafeGet(ResultSet resultSet,
String[] types,
Object owner)
throws HibernateException,
SQLException
nullSafeGet in interface UserTypenullSafeGet in class UserTypeBaseHibernateException
SQLExceptionpublic abstract Object getEmptyOrNull()
fromString("") if the
StrongType permits this.public abstract Object fromString(String value)
value - the String representation of the mapped class
public void nullSafeSet(PreparedStatement statement,
Object value,
int index)
throws HibernateException,
SQLException
nullSafeSet in interface UserTypenullSafeSet in class UserTypeBaseHibernateException
SQLExceptionpublic int[] sqlTypes()
sqlTypes in interface UserTypesqlTypes in class UserTypeBase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||