Package org.jasypt.hibernate6.type
Class AbstractEncryptedAsStringType
Object
org.jasypt.hibernate6.type.AbstractEncryptedAsStringType
- All Implemented Interfaces:
org.hibernate.usertype.ParameterizedType,org.hibernate.usertype.UserType
- Direct Known Subclasses:
EncryptedBigDecimalAsStringType,EncryptedBigIntegerAsStringType,EncryptedBooleanAsStringType,EncryptedByteAsStringType,EncryptedCalendarAsStringType,EncryptedDateAsStringType,EncryptedDoubleAsStringType,EncryptedFloatAsStringType,EncryptedIntegerAsStringType,EncryptedLongAsStringType,EncryptedShortAsStringType,EncryptedStringType
public abstract class AbstractEncryptedAsStringType
extends Object
implements org.hibernate.usertype.UserType, org.hibernate.usertype.ParameterizedType
Base class for Hibernate UserTypes to store
values as encrypted strings.
- Since:
- 1.9.0
- Author:
- Chus Picos
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.jasypt.encryption.pbe.PBEStringEncryptor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Objectassemble(Serializable cached, Object owner) protected final voidprotected abstract ObjectconvertToObject(String string) Converts given String to its Object form.convertToString(Object object) Converts given Object to its String form.final Objectfinal Serializabledisassemble(Object value) final booleanfinal intfinal booleannullSafeGet(ResultSet rs, String[] names, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner) voidnullSafeSet(PreparedStatement st, Object value, int index, org.hibernate.engine.spi.SharedSessionContractImplementor session) final Objectabstract Class<?>voidsetParameterValues(Properties parameters) final int[]sqlTypes()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.usertype.UserType
getDefaultSqlLength, getDefaultSqlPrecision, getDefaultSqlScale, getJdbcType, getSqlType, getValueConverter, nullSafeGet
-
Field Details
-
encryptor
protected org.jasypt.encryption.pbe.PBEStringEncryptor encryptor
-
-
Constructor Details
-
AbstractEncryptedAsStringType
public AbstractEncryptedAsStringType()
-
-
Method Details
-
convertToObject
Converts given String to its Object form.- Parameters:
string- the string value- Returns:
- the object form of the passed String
-
convertToString
Converts given Object to its String form.- Parameters:
object- the object value- Returns:
- the string form of the passes Object
-
sqlTypes
public final int[] sqlTypes() -
returnedClass
- Specified by:
returnedClassin interfaceorg.hibernate.usertype.UserType
-
equals
- Specified by:
equalsin interfaceorg.hibernate.usertype.UserType- Throws:
org.hibernate.HibernateException
-
deepCopy
- Specified by:
deepCopyin interfaceorg.hibernate.usertype.UserType- Throws:
org.hibernate.HibernateException
-
assemble
public final Object assemble(Serializable cached, Object owner) throws org.hibernate.HibernateException - Specified by:
assemblein interfaceorg.hibernate.usertype.UserType- Throws:
org.hibernate.HibernateException
-
disassemble
- Specified by:
disassemblein interfaceorg.hibernate.usertype.UserType- Throws:
org.hibernate.HibernateException
-
isMutable
public final boolean isMutable()- Specified by:
isMutablein interfaceorg.hibernate.usertype.UserType
-
hashCode
- Specified by:
hashCodein interfaceorg.hibernate.usertype.UserType- Throws:
org.hibernate.HibernateException
-
replace
public final Object replace(Object original, Object target, Object owner) throws org.hibernate.HibernateException - Specified by:
replacein interfaceorg.hibernate.usertype.UserType- Throws:
org.hibernate.HibernateException
-
setParameterValues
- Specified by:
setParameterValuesin interfaceorg.hibernate.usertype.ParameterizedType
-
checkInitialization
protected final void checkInitialization()
-