Package org.hibernate.type
Class TypeHelper
- java.lang.Object
-
- org.hibernate.type.TypeHelper
-
@Deprecated public class TypeHelper extends java.lang.Object
Deprecated.with no real replacement. this was always intended as an internal classCollection of convenience methods relating to operations across arrays of types...
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.Object[]
assemble(java.io.Serializable[] row, Type[] types, SharedSessionContractImplementor session, java.lang.Object owner)
Deprecated.Apply theType.assemble(java.io.Serializable, org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object)
operation across a series of values.static void
beforeAssemble(java.io.Serializable[] row, Type[] types, SharedSessionContractImplementor session)
Deprecated.Apply theType.beforeAssemble(java.io.Serializable, org.hibernate.engine.spi.SharedSessionContractImplementor)
operation across a series of values.static void
deepCopy(java.lang.Object[] values, Type[] types, boolean[] copy, java.lang.Object[] target, SharedSessionContractImplementor session)
Deprecated.Deep copy a series of values from one array to another...static java.io.Serializable[]
disassemble(java.lang.Object[] row, Type[] types, boolean[] nonCacheable, SharedSessionContractImplementor session, java.lang.Object owner)
Deprecated.Apply theType.disassemble(java.lang.Object, org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object)
operation across a series of values.static int[]
findDirty(NonIdentifierAttribute[] properties, java.lang.Object[] currentState, java.lang.Object[] previousState, boolean[][] includeColumns, boolean anyUninitializedProperties, SharedSessionContractImplementor session)
Deprecated.Use {org.hibernate.type.TypeHelperfindDirty(NonIdentifierAttribute[], Object[], Object[], boolean[][], SharedSessionContractImplementor)
indteadstatic int[]
findDirty(NonIdentifierAttribute[] properties, java.lang.Object[] currentState, java.lang.Object[] previousState, boolean[][] includeColumns, SharedSessionContractImplementor session)
Deprecated.Determine if any of the given field values are dirty, returning an array containing indices of the dirty fields.static int[]
findModified(NonIdentifierAttribute[] properties, java.lang.Object[] currentState, java.lang.Object[] previousState, boolean[][] includeColumns, boolean[] includeProperties, boolean anyUninitializedProperties, SharedSessionContractImplementor session)
static int[]
findModified(NonIdentifierAttribute[] properties, java.lang.Object[] currentState, java.lang.Object[] previousState, boolean[][] includeColumns, boolean[] includeProperties, SharedSessionContractImplementor session)
Deprecated.Determine if any of the given field values are modified, returning an array containing indices of the modified fields.static java.lang.Object[]
replace(java.lang.Object[] original, java.lang.Object[] target, Type[] types, SharedSessionContractImplementor session, java.lang.Object owner, java.util.Map copyCache)
Deprecated.Apply theType.replace(java.lang.Object, java.lang.Object, org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.util.Map)
operation across a series of values.static java.lang.Object[]
replace(java.lang.Object[] original, java.lang.Object[] target, Type[] types, SharedSessionContractImplementor session, java.lang.Object owner, java.util.Map copyCache, ForeignKeyDirection foreignKeyDirection)
Deprecated.Apply theType.replace(java.lang.Object, java.lang.Object, org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.util.Map)
operation across a series of values.static java.lang.Object[]
replaceAssociations(java.lang.Object[] original, java.lang.Object[] target, Type[] types, SharedSessionContractImplementor session, java.lang.Object owner, java.util.Map copyCache, ForeignKeyDirection foreignKeyDirection)
Deprecated.Apply theType.replace(java.lang.Object, java.lang.Object, org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.util.Map)
operation across a series of values, as long as the correspondingType
is an association.
-
-
-
Method Detail
-
deepCopy
public static void deepCopy(java.lang.Object[] values, Type[] types, boolean[] copy, java.lang.Object[] target, SharedSessionContractImplementor session)
Deprecated.Deep copy a series of values from one array to another...- Parameters:
values
- The values to copy (the source)types
- The value typescopy
- an array indicating which values to include in the copytarget
- The array into which to copy the valuessession
- The originating session
-
beforeAssemble
public static void beforeAssemble(java.io.Serializable[] row, Type[] types, SharedSessionContractImplementor session)
Deprecated.Apply theType.beforeAssemble(java.io.Serializable, org.hibernate.engine.spi.SharedSessionContractImplementor)
operation across a series of values.- Parameters:
row
- The valuestypes
- The value typessession
- The originating session
-
assemble
public static java.lang.Object[] assemble(java.io.Serializable[] row, Type[] types, SharedSessionContractImplementor session, java.lang.Object owner)
Deprecated.Apply theType.assemble(java.io.Serializable, org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object)
operation across a series of values.- Parameters:
row
- The valuestypes
- The value typessession
- The originating sessionowner
- The entity "owning" the values- Returns:
- The assembled state
-
disassemble
public static java.io.Serializable[] disassemble(java.lang.Object[] row, Type[] types, boolean[] nonCacheable, SharedSessionContractImplementor session, java.lang.Object owner)
Deprecated.Apply theType.disassemble(java.lang.Object, org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object)
operation across a series of values.- Parameters:
row
- The valuestypes
- The value typesnonCacheable
- An array indicating which values to include in the disassembled statesession
- The originating sessionowner
- The entity "owning" the values- Returns:
- The disassembled state
-
replace
public static java.lang.Object[] replace(java.lang.Object[] original, java.lang.Object[] target, Type[] types, SharedSessionContractImplementor session, java.lang.Object owner, java.util.Map copyCache)
Deprecated.Apply theType.replace(java.lang.Object, java.lang.Object, org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.util.Map)
operation across a series of values.- Parameters:
original
- The source of the statetarget
- The target into which to replace the source values.types
- The value typessession
- The originating sessionowner
- The entity "owning" the valuescopyCache
- A map representing a cache of already replaced state- Returns:
- The replaced state
-
replace
public static java.lang.Object[] replace(java.lang.Object[] original, java.lang.Object[] target, Type[] types, SharedSessionContractImplementor session, java.lang.Object owner, java.util.Map copyCache, ForeignKeyDirection foreignKeyDirection)
Deprecated.Apply theType.replace(java.lang.Object, java.lang.Object, org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.util.Map)
operation across a series of values.- Parameters:
original
- The source of the statetarget
- The target into which to replace the source values.types
- The value typessession
- The originating sessionowner
- The entity "owning" the valuescopyCache
- A map representing a cache of already replaced stateforeignKeyDirection
- FK directionality to be applied to the replacement- Returns:
- The replaced state
-
replaceAssociations
public static java.lang.Object[] replaceAssociations(java.lang.Object[] original, java.lang.Object[] target, Type[] types, SharedSessionContractImplementor session, java.lang.Object owner, java.util.Map copyCache, ForeignKeyDirection foreignKeyDirection)
Deprecated.Apply theType.replace(java.lang.Object, java.lang.Object, org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.util.Map)
operation across a series of values, as long as the correspondingType
is an association. If the corresponding type is a component type, then applyType.replace(java.lang.Object, java.lang.Object, org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.util.Map)
across the component subtypes but do not replace the component value itself.- Parameters:
original
- The source of the statetarget
- The target into which to replace the source values.types
- The value typessession
- The originating sessionowner
- The entity "owning" the valuescopyCache
- A map representing a cache of already replaced stateforeignKeyDirection
- FK directionality to be applied to the replacement- Returns:
- The replaced state
-
findDirty
@Deprecated public static int[] findDirty(NonIdentifierAttribute[] properties, java.lang.Object[] currentState, java.lang.Object[] previousState, boolean[][] includeColumns, boolean anyUninitializedProperties, SharedSessionContractImplementor session)
Deprecated.Use {org.hibernate.type.TypeHelperfindDirty(NonIdentifierAttribute[], Object[], Object[], boolean[][], SharedSessionContractImplementor)
indteadDetermine if any of the given field values are dirty, returning an array containing indices of the dirty fields. If it is determined that no fields are dirty, null is returned.- Parameters:
properties
- The property definitionscurrentState
- The current state of the entitypreviousState
- The baseline state of the entityincludeColumns
- Columns to be included in the dirty checking, per propertyanyUninitializedProperties
- Does the entity currently hold any uninitialized property values?session
- The session from which the dirty check request originated.- Returns:
- Array containing indices of the dirty properties, or null if no properties considered dirty.
-
findDirty
public static int[] findDirty(NonIdentifierAttribute[] properties, java.lang.Object[] currentState, java.lang.Object[] previousState, boolean[][] includeColumns, SharedSessionContractImplementor session)
Deprecated.Determine if any of the given field values are dirty, returning an array containing indices of the dirty fields. If it is determined that no fields are dirty, null is returned.- Parameters:
properties
- The property definitionscurrentState
- The current state of the entitypreviousState
- The baseline state of the entityincludeColumns
- Columns to be included in the dirty checking, per propertysession
- The session from which the dirty check request originated.- Returns:
- Array containing indices of the dirty properties, or null if no properties considered dirty.
-
findModified
@Deprecated public static int[] findModified(NonIdentifierAttribute[] properties, java.lang.Object[] currentState, java.lang.Object[] previousState, boolean[][] includeColumns, boolean[] includeProperties, boolean anyUninitializedProperties, SharedSessionContractImplementor session)
Deprecated.Determine if any of the given field values are modified, returning an array containing indices of the modified fields. If it is determined that no fields are dirty, null is returned.- Parameters:
properties
- The property definitionscurrentState
- The current state of the entitypreviousState
- The baseline state of the entityincludeColumns
- Columns to be included in the mod checking, per propertyincludeProperties
- Array of property indices that identify which properties participate in checkanyUninitializedProperties
- Does the entity currently hold any uninitialized property values?session
- The session from which the dirty check request originated.- Returns:
- Array containing indices of the modified properties, or null if no properties considered modified.
-
findModified
public static int[] findModified(NonIdentifierAttribute[] properties, java.lang.Object[] currentState, java.lang.Object[] previousState, boolean[][] includeColumns, boolean[] includeProperties, SharedSessionContractImplementor session)
Deprecated.Determine if any of the given field values are modified, returning an array containing indices of the modified fields. If it is determined that no fields are dirty, null is returned.- Parameters:
properties
- The property definitionscurrentState
- The current state of the entitypreviousState
- The baseline state of the entityincludeColumns
- Columns to be included in the mod checking, per propertyincludeProperties
- Array of property indices that identify which properties participate in checksession
- The session from which the dirty check request originated.- Returns:
- Array containing indices of the modified properties, or null if no properties considered modified.
-
-