array
public static CollectionType array(String role,
String propertyRef,
boolean embedded,
Class elementClass)
assemble
public static Object[] assemble(Serializable[] row,
Type[] types,
SessionImplementor session,
Object owner)
row
- The valuestypes
- The value typessession
- The orginating sessionowner
- The entity "owning" the values
bag
public static CollectionType bag(String role,
String propertyRef,
boolean embedded)
basic
public static Type basic(String name)
Given the name of a Hibernate basic type, return an instance of
org.hibernate.type.Type.
beforeAssemble
public static void beforeAssemble(Serializable[] row,
Type[] types,
SessionImplementor session)
row
- The valuestypes
- The value typessession
- The orginating session
customCollection
public static CollectionType customCollection(String typeName,
Properties typeParameters,
String role,
String propertyRef,
boolean embedded)
customCollection
public static CollectionType customCollection(String typeName,
String role,
String propertyRef,
boolean embedded)
Use customCollection(String, java.util.Properties, String, String, boolean)
instead
The legacy contract.
deepCopy
public static void deepCopy(Object[] values,
Type[] types,
boolean[] copy,
Object[] target,
SessionImplementor session)
Deep copy a series of values from one array to another...
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 orginating session
disassemble
public static Serializable[] disassemble(Object[] row,
Type[] types,
boolean[] nonCacheable,
SessionImplementor session,
Object owner)
row
- The valuestypes
- The value typesnonCacheable
- An array indicating which values to include in the disassemled statesession
- The orginating sessionowner
- The entity "owning" the values
findDirty
public static int[] findDirty(StandardProperty[] properties,
Object[] currentState,
Object[] previousState,
boolean[][] includeColumns,
boolean anyUninitializedProperties,
SessionImplementor session)
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.
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.
- Array containing indices of the dirty properties, or null if no properties considered dirty.
findModified
public static int[] findModified(StandardProperty[] properties,
Object[] currentState,
Object[] previousState,
boolean[][] includeColumns,
boolean anyUninitializedProperties,
SessionImplementor session)
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.
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 propertyanyUninitializedProperties
- Does the entity currently hold any uninitialized property values?session
- The session from which the dirty check request originated.
- Array containing indices of the modified properties, or null if no properties considered modified.
heuristicType
public static Type heuristicType(String typeName)
throws MappingException
Uses heuristics to deduce a Hibernate type given a string naming the type or Java class.
Return an instance of org.hibernate.type.Type.
heuristicType
public static Type heuristicType(String typeName,
Properties parameters)
throws MappingException
Uses heuristics to deduce a Hibernate type given a string naming the type or Java class.
Return an instance of org.hibernate.type.Type.
idbag
public static CollectionType idbag(String role,
String propertyRef,
boolean embedded)
injectParameters
public static void injectParameters(Object type,
Properties parameters)
list
public static CollectionType list(String role,
String propertyRef,
boolean embedded)
manyToOne
public static EntityType manyToOne(String persistentClass)
A many-to-one association type for the given class
manyToOne
public static EntityType manyToOne(String persistentClass,
String uniqueKeyPropertyName,
boolean lazy,
boolean unwrapProxy,
boolean isEmbeddedInXML,
boolean ignoreNotFound)
A many-to-one association type for the given class
manyToOne
public static EntityType manyToOne(String persistentClass,
boolean lazy)
A many-to-one association type for the given class
map
public static CollectionType map(String role,
String propertyRef,
boolean embedded)
oneToOne
public static EntityType oneToOne(String persistentClass,
ForeignKeyDirection foreignKeyType,
String uniqueKeyPropertyName,
boolean lazy,
boolean unwrapProxy,
boolean isEmbeddedInXML,
String entityName,
String propertyName)
A one-to-one association type for the given class
orderedMap
public static CollectionType orderedMap(String role,
String propertyRef,
boolean embedded)
orderedSet
public static CollectionType orderedSet(String role,
String propertyRef,
boolean embedded)
replace
public static Object[] replace(Object[] original,
Object[] target,
Type[] types,
SessionImplementor session,
Object owner,
Map copyCache)
Apply the Type.replace
operation across a series of values.
original
- The source of the statetarget
- The target into which to replace the source values.types
- The value typessession
- The orginating sessionowner
- The entity "owning" the valuescopyCache
- A map representing a cache of already replaced state
replace
public static Object[] replace(Object[] original,
Object[] target,
Type[] types,
SessionImplementor session,
Object owner,
Map copyCache,
ForeignKeyDirection foreignKeyDirection)
Apply the Type.replace
operation across a series of values.
original
- The source of the statetarget
- The target into which to replace the source values.types
- The value typessession
- The orginating sessionowner
- The entity "owning" the valuescopyCache
- A map representing a cache of already replaced stateforeignKeyDirection
- FK directionality to be applied to the replacement
replaceAssociations
public static Object[] replaceAssociations(Object[] original,
Object[] target,
Type[] types,
SessionImplementor session,
Object owner,
Map copyCache,
ForeignKeyDirection foreignKeyDirection)
original
- The source of the statetarget
- The target into which to replace the source values.types
- The value typessession
- The orginating sessionowner
- The entity "owning" the valuescopyCache
- A map representing a cache of already replaced stateforeignKeyDirection
- FK directionality to be applied to the replacement
set
public static CollectionType set(String role,
String propertyRef,
boolean embedded)
sortedMap
public static CollectionType sortedMap(String role,
String propertyRef,
boolean embedded,
Comparator comparator)
sortedSet
public static CollectionType sortedSet(String role,
String propertyRef,
boolean embedded,
Comparator comparator)