public abstract class ImmutableCompositeType<T> extends Object implements org.hibernate.usertype.CompositeUserType, org.hibernate.type.CompositeType, org.hibernate.type.BasicType
CompositeUserType.
The ImmutableCompositeType implements the Type interface too, so you can pass all
types extending the ImmutableCompositeType to the NativeQuery.addScalar(String, Type)
method to fix the No Dialect mapping for JDBC type issues.
| Type | Property and Description |
|---|---|
boolean |
hasNotNull |
| Modifier | Constructor and Description |
|---|---|
protected |
ImmutableCompositeType(Class<T> clazz)
Initialization constructor taking the
Class
and using the default Configuration object. |
protected |
ImmutableCompositeType(Class<T> clazz,
Configuration configuration)
Initialization constructor taking the
Class and Configuration objects. |
| Modifier and Type | Method and Description |
|---|---|
Object |
assemble(Serializable cached,
org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object owner) |
void |
beforeAssemble(Serializable cached,
org.hibernate.engine.spi.SharedSessionContractImplementor session) |
int |
compare(Object x,
Object y) |
Object |
deepCopy(Object value) |
Object |
deepCopy(Object value,
org.hibernate.engine.spi.SessionFactoryImplementor factory) |
org.hibernate.engine.jdbc.Size[] |
defaultSizes(org.hibernate.engine.spi.Mapping mapping) |
org.hibernate.engine.jdbc.Size[] |
dictatedSizes(org.hibernate.engine.spi.Mapping mapping) |
Serializable |
disassemble(Object o,
org.hibernate.engine.spi.SharedSessionContractImplementor session) |
Serializable |
disassemble(Object value,
org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object owner) |
boolean |
equals(Object x,
Object y) |
protected abstract T |
get(ResultSet rs,
String[] names,
org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object owner)
Get the column value from the JDBC
ResultSet. |
org.hibernate.engine.spi.CascadeStyle |
getCascadeStyle(int index) |
int |
getColumnSpan(org.hibernate.engine.spi.Mapping mapping) |
protected Configuration |
getConfiguration()
Get the current
Configuration object. |
org.hibernate.FetchMode |
getFetchMode(int index) |
int |
getHashCode(Object x) |
int |
getHashCode(Object x,
org.hibernate.engine.spi.SessionFactoryImplementor factory) |
String |
getName() |
boolean[] |
getPropertyNullability() |
Object |
getPropertyValue(Object component,
int index,
org.hibernate.engine.spi.SharedSessionContractImplementor session) |
Object[] |
getPropertyValues(Object component,
org.hibernate.EntityMode entityMode) |
Object[] |
getPropertyValues(Object component,
org.hibernate.engine.spi.SharedSessionContractImplementor session) |
String[] |
getRegistrationKeys() |
Class |
getReturnedClass() |
org.hibernate.type.Type |
getSemiResolvedType(org.hibernate.engine.spi.SessionFactoryImplementor factory) |
org.hibernate.type.Type[] |
getSubtypes() |
int |
hashCode(Object x) |
boolean |
hasNotNullProperty() |
Object |
hydrate(ResultSet rs,
String[] names,
org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object owner) |
boolean |
isAnyType() |
boolean |
isAssociationType() |
boolean |
isCollectionType() |
boolean |
isComponentType() |
protected boolean |
isDirty(Object old,
Object current) |
boolean |
isDirty(Object old,
Object current,
boolean[] checkable,
org.hibernate.engine.spi.SharedSessionContractImplementor session) |
boolean |
isDirty(Object old,
Object current,
org.hibernate.engine.spi.SharedSessionContractImplementor session) |
boolean |
isEmbedded() |
boolean |
isEntityType() |
boolean |
isEqual(Object x,
Object y) |
boolean |
isEqual(Object x,
Object y,
org.hibernate.engine.spi.SessionFactoryImplementor factory) |
boolean |
isMethodOf(Method method) |
boolean |
isModified(Object dbState,
Object currentState,
boolean[] checkable,
org.hibernate.engine.spi.SharedSessionContractImplementor session) |
boolean |
isMutable() |
boolean |
isSame(Object x,
Object y) |
Object |
nullSafeGet(ResultSet rs,
String[] names,
org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object owner) |
Object |
nullSafeGet(ResultSet rs,
String name,
org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object owner) |
void |
nullSafeSet(PreparedStatement st,
Object value,
int index,
boolean[] settable,
org.hibernate.engine.spi.SharedSessionContractImplementor session) |
void |
nullSafeSet(PreparedStatement st,
Object value,
int index,
org.hibernate.engine.spi.SharedSessionContractImplementor session) |
Object |
replace(Object o,
Object target,
org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object owner) |
Object |
replace(Object original,
Object target,
org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object owner,
Map copyCache) |
Object |
replace(Object original,
Object target,
org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object owner,
Map copyCache,
org.hibernate.type.ForeignKeyDirection foreignKeyDirection) |
Object |
resolve(Object value,
org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object owner) |
Class<T> |
returnedClass() |
Object |
semiResolve(Object value,
org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object owner) |
protected abstract void |
set(PreparedStatement st,
T value,
int index,
org.hibernate.engine.spi.SharedSessionContractImplementor session)
Set the column value on the provided JDBC
PreparedStatement. |
void |
setPropertyValues(Object component,
Object[] values,
org.hibernate.EntityMode entityMode) |
int[] |
sqlTypes(org.hibernate.engine.spi.Mapping mapping) |
boolean[] |
toColumnNullness(Object value,
org.hibernate.engine.spi.Mapping mapping) |
String |
toLoggableString(Object value,
org.hibernate.engine.spi.SessionFactoryImplementor factory) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPropertyNames, getPropertyTypes, getPropertyValue, setPropertyValuepublic boolean hasNotNullProperty
hasNotNullProperty in interface org.hibernate.type.CompositeTypeprotected ImmutableCompositeType(Class<T> clazz)
Class
and using the default Configuration object.clazz - the entity attribute Class type to be handledprotected ImmutableCompositeType(Class<T> clazz, Configuration configuration)
Class and Configuration objects.clazz - the entity attribute Class type to be handledconfiguration - custom Configuration object.protected Configuration getConfiguration()
Configuration object.Configuration object.protected abstract T get(ResultSet rs, String[] names, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner) throws SQLException
ResultSet.rs - JDBC ResultSetnames - database column namesession - current Hibernate Sessionowner - current Hibernate SessionFactoryImplementorSQLException - in case of failureprotected abstract void set(PreparedStatement st, T value, int index, org.hibernate.engine.spi.SharedSessionContractImplementor session) throws SQLException
PreparedStatement.st - JDBC PreparedStatementvalue - database column valueindex - database column indexsession - current Hibernate SessionSQLException - in case of failurepublic Object nullSafeGet(ResultSet rs, String[] names, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner) throws SQLException
nullSafeGet in interface org.hibernate.type.TypenullSafeGet in interface org.hibernate.usertype.CompositeUserTypeSQLExceptionpublic void nullSafeSet(PreparedStatement st, Object value, int index, org.hibernate.engine.spi.SharedSessionContractImplementor session) throws SQLException
nullSafeSet in interface org.hibernate.type.TypenullSafeSet in interface org.hibernate.usertype.CompositeUserTypeSQLExceptionpublic Class<T> returnedClass()
returnedClass in interface org.hibernate.usertype.CompositeUserTypepublic boolean equals(Object x, Object y)
equals in interface org.hibernate.usertype.CompositeUserTypepublic int hashCode(Object x)
hashCode in interface org.hibernate.usertype.CompositeUserTypepublic Object deepCopy(Object value)
deepCopy in interface org.hibernate.usertype.CompositeUserTypepublic boolean isMutable()
isMutable in interface org.hibernate.type.TypeisMutable in interface org.hibernate.usertype.CompositeUserTypepublic Serializable disassemble(Object o, org.hibernate.engine.spi.SharedSessionContractImplementor session)
disassemble in interface org.hibernate.usertype.CompositeUserTypepublic Object assemble(Serializable cached, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner) throws org.hibernate.HibernateException
assemble in interface org.hibernate.type.Typeassemble in interface org.hibernate.usertype.CompositeUserTypeorg.hibernate.HibernateExceptionpublic Object replace(Object o, Object target, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner)
replace in interface org.hibernate.usertype.CompositeUserTypepublic boolean isAssociationType()
isAssociationType in interface org.hibernate.type.Typepublic boolean isCollectionType()
isCollectionType in interface org.hibernate.type.Typepublic boolean isEntityType()
isEntityType in interface org.hibernate.type.Typepublic boolean isAnyType()
isAnyType in interface org.hibernate.type.Typepublic boolean isComponentType()
isComponentType in interface org.hibernate.type.Typepublic int getColumnSpan(org.hibernate.engine.spi.Mapping mapping)
throws org.hibernate.MappingException
getColumnSpan in interface org.hibernate.type.Typeorg.hibernate.MappingExceptionpublic int[] sqlTypes(org.hibernate.engine.spi.Mapping mapping)
throws org.hibernate.MappingException
sqlTypes in interface org.hibernate.type.Typeorg.hibernate.MappingExceptionpublic org.hibernate.engine.jdbc.Size[] dictatedSizes(org.hibernate.engine.spi.Mapping mapping)
throws org.hibernate.MappingException
dictatedSizes in interface org.hibernate.type.Typeorg.hibernate.MappingExceptionpublic org.hibernate.engine.jdbc.Size[] defaultSizes(org.hibernate.engine.spi.Mapping mapping)
throws org.hibernate.MappingException
defaultSizes in interface org.hibernate.type.Typeorg.hibernate.MappingExceptionpublic Class getReturnedClass()
getReturnedClass in interface org.hibernate.type.Typepublic boolean isSame(Object x, Object y) throws org.hibernate.HibernateException
isSame in interface org.hibernate.type.Typeorg.hibernate.HibernateExceptionpublic boolean isEqual(Object x, Object y) throws org.hibernate.HibernateException
isEqual in interface org.hibernate.type.Typeorg.hibernate.HibernateExceptionpublic boolean isEqual(Object x, Object y, org.hibernate.engine.spi.SessionFactoryImplementor factory) throws org.hibernate.HibernateException
isEqual in interface org.hibernate.type.Typeorg.hibernate.HibernateExceptionpublic int getHashCode(Object x) throws org.hibernate.HibernateException
getHashCode in interface org.hibernate.type.Typeorg.hibernate.HibernateExceptionpublic int getHashCode(Object x, org.hibernate.engine.spi.SessionFactoryImplementor factory) throws org.hibernate.HibernateException
getHashCode in interface org.hibernate.type.Typeorg.hibernate.HibernateExceptionpublic int compare(Object x, Object y)
compare in interface org.hibernate.type.Typepublic final boolean isDirty(Object old, Object current, org.hibernate.engine.spi.SharedSessionContractImplementor session)
isDirty in interface org.hibernate.type.Typepublic final boolean isDirty(Object old, Object current, boolean[] checkable, org.hibernate.engine.spi.SharedSessionContractImplementor session)
isDirty in interface org.hibernate.type.Typepublic boolean isModified(Object dbState, Object currentState, boolean[] checkable, org.hibernate.engine.spi.SharedSessionContractImplementor session) throws org.hibernate.HibernateException
isModified in interface org.hibernate.type.Typeorg.hibernate.HibernateExceptionpublic Object nullSafeGet(ResultSet rs, String name, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner) throws org.hibernate.HibernateException, SQLException
nullSafeGet in interface org.hibernate.type.Typeorg.hibernate.HibernateExceptionSQLExceptionpublic void nullSafeSet(PreparedStatement st, Object value, int index, boolean[] settable, org.hibernate.engine.spi.SharedSessionContractImplementor session) throws org.hibernate.HibernateException, SQLException
nullSafeSet in interface org.hibernate.type.Typeorg.hibernate.HibernateExceptionSQLExceptionpublic String toLoggableString(Object value, org.hibernate.engine.spi.SessionFactoryImplementor factory) throws org.hibernate.HibernateException
toLoggableString in interface org.hibernate.type.Typeorg.hibernate.HibernateExceptionpublic String getName()
getName in interface org.hibernate.type.Typepublic Object deepCopy(Object value, org.hibernate.engine.spi.SessionFactoryImplementor factory) throws org.hibernate.HibernateException
deepCopy in interface org.hibernate.type.Typeorg.hibernate.HibernateExceptionpublic Serializable disassemble(Object value, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner) throws org.hibernate.HibernateException
disassemble in interface org.hibernate.type.Typeorg.hibernate.HibernateExceptionpublic void beforeAssemble(Serializable cached, org.hibernate.engine.spi.SharedSessionContractImplementor session)
beforeAssemble in interface org.hibernate.type.Typepublic Object hydrate(ResultSet rs, String[] names, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner) throws org.hibernate.HibernateException, SQLException
hydrate in interface org.hibernate.type.Typeorg.hibernate.HibernateExceptionSQLExceptionpublic Object resolve(Object value, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner) throws org.hibernate.HibernateException
resolve in interface org.hibernate.type.Typeorg.hibernate.HibernateExceptionpublic Object semiResolve(Object value, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner) throws org.hibernate.HibernateException
semiResolve in interface org.hibernate.type.Typeorg.hibernate.HibernateExceptionpublic org.hibernate.type.Type getSemiResolvedType(org.hibernate.engine.spi.SessionFactoryImplementor factory)
getSemiResolvedType in interface org.hibernate.type.Typepublic Object replace(Object original, Object target, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner, Map copyCache) throws org.hibernate.HibernateException
replace in interface org.hibernate.type.Typeorg.hibernate.HibernateExceptionpublic Object replace(Object original, Object target, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner, Map copyCache, org.hibernate.type.ForeignKeyDirection foreignKeyDirection) throws org.hibernate.HibernateException
replace in interface org.hibernate.type.Typeorg.hibernate.HibernateExceptionpublic boolean[] toColumnNullness(Object value, org.hibernate.engine.spi.Mapping mapping)
toColumnNullness in interface org.hibernate.type.Typepublic String[] getRegistrationKeys()
getRegistrationKeys in interface org.hibernate.type.BasicTypepublic org.hibernate.type.Type[] getSubtypes()
getSubtypes in interface org.hibernate.type.CompositeTypepublic boolean[] getPropertyNullability()
getPropertyNullability in interface org.hibernate.type.CompositeTypepublic Object[] getPropertyValues(Object component, org.hibernate.engine.spi.SharedSessionContractImplementor session) throws org.hibernate.HibernateException
getPropertyValues in interface org.hibernate.type.CompositeTypeorg.hibernate.HibernateExceptionpublic Object[] getPropertyValues(Object component, org.hibernate.EntityMode entityMode) throws org.hibernate.HibernateException
getPropertyValues in interface org.hibernate.type.CompositeTypeorg.hibernate.HibernateExceptionpublic Object getPropertyValue(Object component, int index, org.hibernate.engine.spi.SharedSessionContractImplementor session) throws org.hibernate.HibernateException
getPropertyValue in interface org.hibernate.type.CompositeTypeorg.hibernate.HibernateExceptionpublic void setPropertyValues(Object component, Object[] values, org.hibernate.EntityMode entityMode) throws org.hibernate.HibernateException
setPropertyValues in interface org.hibernate.type.CompositeTypeorg.hibernate.HibernateExceptionpublic org.hibernate.engine.spi.CascadeStyle getCascadeStyle(int index)
getCascadeStyle in interface org.hibernate.type.CompositeTypepublic org.hibernate.FetchMode getFetchMode(int index)
getFetchMode in interface org.hibernate.type.CompositeTypepublic boolean isMethodOf(Method method)
isMethodOf in interface org.hibernate.type.CompositeTypepublic boolean isEmbedded()
isEmbedded in interface org.hibernate.type.CompositeTypepublic boolean hasNotNullProperty()
hasNotNullProperty in interface org.hibernate.type.CompositeTypeCopyright © 2023. All rights reserved.