public abstract class AbstractHibernateType extends Object implements UserType, ParameterizedType
| Modifier and Type | Field and Description |
|---|---|
protected static Charset |
DEFAULT_CHARSET |
protected static SecureRandom |
random |
| Constructor and Description |
|---|
AbstractHibernateType() |
| Modifier and Type | Method and Description |
|---|---|
Object |
assemble(Serializable cached,
Object owner) |
protected void |
configure(Properties parameters)
Loads the encryptor and any other necessary instance variables.
|
protected abstract Object |
decrypt(String value)
Decrypts the given string using an appropriate method for the object type.
|
Object |
deepCopy(Object value) |
Serializable |
disassemble(Object value) |
protected abstract String |
encrypt(Object value)
Encrypts the given object using an appropriate method for the object type.
|
boolean |
equals(Object x,
Object y) |
protected Charset |
getCharset()
Returns the charset.
|
protected ValueEncryptorInterface<Encryptor> |
getEncryptor()
Returns the encryptor value.
|
int |
hashCode(Object x) |
protected void |
initializeIfNot() |
boolean |
isMutable() |
Object |
nullSafeGet(ResultSet rs,
String[] names,
SessionImplementor session,
Object owner) |
void |
nullSafeSet(PreparedStatement st,
Object value,
int index,
SessionImplementor session) |
Object |
replace(Object original,
Object target,
Object owner) |
protected void |
setCharset(Properties parameters) |
void |
setParameterValues(Properties parameters) |
int[] |
sqlTypes() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreturnedClassprotected static final Charset DEFAULT_CHARSET
protected static final SecureRandom random
protected abstract String encrypt(Object value) throws GeneralSecurityException
value - the object to be encryptedGeneralSecurityException - GeneralSecurityExceptionprotected abstract Object decrypt(String value) throws GeneralSecurityException
value - the string to be decryptedGeneralSecurityException - GeneralSecurityExceptionpublic Object assemble(Serializable cached, Object owner) throws HibernateException
assemble in interface UserTypeHibernateExceptionpublic Object deepCopy(Object value) throws HibernateException
deepCopy in interface UserTypeHibernateExceptionpublic Serializable disassemble(Object value) throws HibernateException
disassemble in interface UserTypeHibernateExceptionpublic boolean equals(Object x, Object y) throws HibernateException
equals in interface UserTypeHibernateExceptionpublic int hashCode(Object x) throws HibernateException
hashCode in interface UserTypeHibernateExceptionpublic Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException
nullSafeGet in interface UserTypeHibernateExceptionSQLExceptionpublic void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException
nullSafeSet in interface UserTypeHibernateExceptionSQLExceptionpublic Object replace(Object original, Object target, Object owner) throws HibernateException
replace in interface UserTypeHibernateExceptionpublic void setParameterValues(Properties parameters)
setParameterValues in interface ParameterizedTypeprotected void configure(Properties parameters)
parameters - the parameter valuesprotected void setCharset(Properties parameters)
protected void initializeIfNot()
protected ValueEncryptorInterface<Encryptor> getEncryptor()
protected Charset getCharset()