Class FcEncryptedBinaryType
java.lang.Object
de.xima.fc.persistence.hibernate.FcEncryptedBinaryType
- All Implemented Interfaces:
FcEncryptedUserType, org.hibernate.usertype.ParameterizedType, org.hibernate.usertype.UserType
- Direct Known Subclasses:
FCEncryptedBinaryType
public class FcEncryptedBinaryType
extends Object
implements FcEncryptedUserType, org.hibernate.usertype.UserType, org.hibernate.usertype.ParameterizedType
Hibernate UserType that maps a byte array field to an encrypted LOB field in the database.
Parameters:
- defaultValue: The default value to use if decryption fails or the database value is null/empty.
- scope: Optional scope for the encryptor, can be used to differentiate between different encryption contexts.
- Since:
- 8.5.0
- Author:
- Norman Lorenz
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassemble(Serializable cached, Object owner) disassemble(Object value) booleangetScope()Returns the encryption scope.intbooleannullSafeGet(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) voidsetParameterValues(Properties parameters) int[]sqlTypes()
-
Field Details
-
NAME
- See Also:
-
SCOPE
- See Also:
-
-
Constructor Details
-
FcEncryptedBinaryType
public FcEncryptedBinaryType()
-
-
Method Details
-
assemble
- Specified by:
assemblein interfaceorg.hibernate.usertype.UserType- Throws:
org.hibernate.HibernateException
-
deepCopy
-
disassemble
- Specified by:
disassemblein interfaceorg.hibernate.usertype.UserType- Throws:
org.hibernate.HibernateException
-
equals
-
hashCode
- Specified by:
hashCodein interfaceorg.hibernate.usertype.UserType- Throws:
org.hibernate.HibernateException
-
isMutable
public boolean isMutable()- Specified by:
isMutablein interfaceorg.hibernate.usertype.UserType
-
replace
-
returnedClass
- Specified by:
returnedClassin interfaceorg.hibernate.usertype.UserType
-
setParameterValues
- Specified by:
setParameterValuesin interfaceorg.hibernate.usertype.ParameterizedType
-
sqlTypes
public int[] sqlTypes()- Specified by:
sqlTypesin interfaceorg.hibernate.usertype.UserType
-
getScope
Description copied from interface:FcEncryptedUserTypeReturns the encryption scope.- Specified by:
getScopein interfaceFcEncryptedUserType- Returns:
- The scope, may be null.
-