java.lang.Object | ||
↳ | org.hibernate.type.AbstractType | |
↳ | org.hibernate.type.AnyType |
Known Direct Subclasses |
Handles "any" mappings
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AnyType.ObjectTypeCacheEntry |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Reconstruct the object from its cached "disassembled" state.
| |||||||||||
Perform a
Comparator style comparison between values | |||||||||||
Return a deep copy of the persistent state, stopping at entities and at
collections.
| |||||||||||
Return a cacheable "disassembled" representation of the object.
| |||||||||||
Parse the XML representation of an instance.
| |||||||||||
Get the entity name of the associated entity
| |||||||||||
Get the "persister" for this association - a class or
collection persister
| |||||||||||
Retrieve the cascade style of the indicated component property.
| |||||||||||
How many columns are used to persist this type.
| |||||||||||
Retrieve the fetch mode of the indicated component property.
| |||||||||||
Get the foreign key directionality of this association
| |||||||||||
Get the name of a property in the owning entity
that provides the join key (null if the identifier)
| |||||||||||
Returns the abbreviated name of the type.
| |||||||||||
Get the "filtering" SQL fragment that is applied in the
SQL on clause, in addition to the usual join condition
| |||||||||||
Get the names of the component properties
| |||||||||||
Retrieve the indicators regarding which component properties are nullable.
| |||||||||||
Extract a particular component property value indicated by index.
| |||||||||||
Extract the values of the component properties from the given component instance
| |||||||||||
Extract the values of the component properties from the given component instance without access to the
session.
| |||||||||||
The name of a unique property of the associated entity
that provides the join key (null if the identifier of
an entity, or key of a collection)
| |||||||||||
The class returned by
nullSafeGet(ResultSet, String, SessionImplementor, Object) methods. | |||||||||||
Get the types of the component properties
| |||||||||||
Retrieve an instance of the mapped class, or the identifier of an entity or collection,
from a JDBC resultset.
| |||||||||||
Do we dirty check this association, even when there are
no columns to be updated?
| |||||||||||
Return true if the implementation is castable to
AnyType . | |||||||||||
Return true if the implementation is castable to
AssociationType . | |||||||||||
Return true if the implementation is castable to
CompositeType . | |||||||||||
Should the parent be considered dirty, given both the old and current value?
| |||||||||||
Is this component embedded? "embedded" indicates that the component is "virtual", that its properties are
"flattened" onto its owner
| |||||||||||
Is the given method a member of this component's class?
| |||||||||||
Has the value been modified compared to the current database state? The difference between this
and the
isDirty(Object, Object, boolean[], SessionImplementor) methods is that here we need to account for "partially" built values. | |||||||||||
Are objects of this type mutable.
| |||||||||||
Compare two instances of the class mapped by this type for persistence "equality" (equality of persistent
state) taking a shortcut for entity references.
| |||||||||||
Retrieve an instance of the mapped class from a JDBC resultset.
| |||||||||||
Retrieve an instance of the mapped class from a JDBC resultset.
| |||||||||||
Write an instance of the mapped class to a prepared statement, ignoring some columns.
| |||||||||||
Write an instance of the mapped class to a prepared statement.
| |||||||||||
During merge, replace the existing (target) value in the entity we are merging to
with a new (original) value from the detached entity we are merging.
| |||||||||||
Map identifiers to entities or collections.
| |||||||||||
Given a hydrated, but unresolved value, return a value that may be used to
reconstruct property-ref associations.
| |||||||||||
Inject property values onto the given component instance
An optional operation
| |||||||||||
A representation of the value to be embedded in an XML element.
| |||||||||||
Return the JDBC types codes (per java.sql.Types) for the columns mapped by this type.
| |||||||||||
Given an instance of the type, return an array of boolean, indicating
which mapped columns would be null.
| |||||||||||
A representation of the value to be embedded in a log file.
| |||||||||||
Is the primary key of the owning entity table
to be used in the join?
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.hibernate.type.AbstractType
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.hibernate.type.AssociationType
| |||||||||||
From interface
org.hibernate.type.CompositeType
| |||||||||||
From interface
org.hibernate.type.Type
|
Reconstruct the object from its cached "disassembled" state.
cached | the disassembled state from the cache |
---|---|
session | the session |
owner | the parent entity object |
HibernateException |
---|
Perform a Comparator
style comparison between values
x | The first value |
---|---|
y | The second value |
entityMode | The entity mode of the values. |
compare(T, T)
for a discussion.
Return a deep copy of the persistent state, stopping at entities and at collections.
value | generally a collection element or entity field |
---|
HibernateException |
---|
Return a cacheable "disassembled" representation of the object.
value | the value to cache |
---|---|
session | the session |
owner | optional parent entity object (needed for collections) |
HibernateException |
---|
Parse the XML representation of an instance.
HibernateException |
---|
Get the entity name of the associated entity
MappingException |
---|
Get the "persister" for this association - a class or collection persister
Retrieve the cascade style of the indicated component property.
i | The property index, |
---|
How many columns are used to persist this type. Always the same as sqlTypes(mapping).length
session | The mapping object :/ |
---|
MappingException |
---|
Retrieve the fetch mode of the indicated component property.
i | The property index, |
---|
Get the foreign key directionality of this association
Get the name of a property in the owning entity that provides the join key (null if the identifier)
Returns the abbreviated name of the type.
Get the "filtering" SQL fragment that is applied in the SQL on clause, in addition to the usual join condition
MappingException |
---|
Get the names of the component properties
Retrieve the indicators regarding which component properties are nullable.
An optional operationExtract a particular component property value indicated by index.
component | The component instance |
---|---|
i | The index of the property whose value is to be extracted |
session | The session from which the request originates. |
HibernateException |
---|
Extract the values of the component properties from the given component instance
component | The component instance |
---|---|
session | The session from which the request originates |
HibernateException |
---|
Extract the values of the component properties from the given component instance without access to the session.
An optional operationcomponent | The component instance |
---|---|
entityMode | The entity mode |
The name of a unique property of the associated entity that provides the join key (null if the identifier of an entity, or key of a collection)
The class returned by nullSafeGet(ResultSet, String, SessionImplementor, Object)
methods. This is used to establish the class of an array of
this type.
Get the types of the component properties
Retrieve an instance of the mapped class, or the identifier of an entity or collection, from a JDBC resultset. This is useful for 2-phase property initialization - the second phase is a call to resolveIdentifier().
names | the column names |
---|---|
session | the session |
owner | the parent entity |
HibernateException | |
---|---|
SQLException |
Do we dirty check this association, even when there are no columns to be updated?
Return true if the implementation is castable to AnyType
. Essentially a polymorphic
version of (type instanceof AnyType.class)
.
AnyType
is additionally an AssociationType
; so if this method returns true,
isAssociationType()
should also return true.AnyType
implementor; false otherwise.
Return true if the implementation is castable to AssociationType
. This does not necessarily imply that
the type actually represents an association. Essentially a polymorphic version of
(type instanceof AssociationType.class)
AssociationType
implementor; false otherwise.
Return true if the implementation is castable to CompositeType
. Essentially a polymorphic
version of (type instanceof CompositeType.class)
. A component type may own collections or
associations and hence must provide certain extra functionality.
CompositeType
implementor; false otherwise.
Should the parent be considered dirty, given both the old and current value?
old | the old value |
---|---|
current | the current value |
checkable | An array of booleans indicating which columns making up the value are actually checkable |
session | The session from which the request originated. |
HibernateException |
---|
Is this component embedded? "embedded" indicates that the component is "virtual", that its properties are "flattened" onto its owner
Is the given method a member of this component's class?
method | The method to check |
---|
Has the value been modified compared to the current database state? The difference between this
and the isDirty(Object, Object, boolean[], SessionImplementor)
methods is that here we need to account for "partially" built values. This is really
only an issue with association types. For most type implementations it is enough to simply delegate to
isDirty(Object, Object, boolean[], SessionImplementor)
here/
old | the database state, in a "hydrated" form, with identifiers unresolved |
---|---|
current | the current state of the object |
checkable | which columns are actually updatable |
session | The session from which the request originated. |
HibernateException |
---|
Are objects of this type mutable. (With respect to the referencing object ... entities and collections are considered immutable because they manage their own internal state.)
Compare two instances of the class mapped by this type for persistence "equality" (equality of persistent state) taking a shortcut for entity references.
For most types this should equate to #equals check on the values. For associations the implication is a bit different. For most types it is conceivable to simply delegate toisEqual(Object, Object, EntityMode)
x | The first value |
---|---|
y | The second value |
entityMode | The entity mode of the values. |
HibernateException |
---|
Retrieve an instance of the mapped class from a JDBC resultset. Implementations should handle possibility of null values. This method might be called if the type is known to be a single-column type.
name | the column name |
---|---|
owner | the parent entity |
HibernateException | |
---|---|
SQLException |
Retrieve an instance of the mapped class from a JDBC resultset. Implementors should handle possibility of null values.
names | the column names |
---|---|
owner | the parent entity |
HibernateException | |
---|---|
SQLException |
Write an instance of the mapped class to a prepared statement, ignoring some columns. Implementors should handle possibility of null values. A multi-column type should be written to parameters starting from index.
value | the object to write |
---|---|
index | statement parameter index |
settable | an array indicating which columns to ignore |
HibernateException | |
---|---|
SQLException |
Write an instance of the mapped class to a prepared statement. Implementors should handle possibility of null values. A multi-column type should be written to parameters starting from index.
value | the object to write |
---|---|
index | statement parameter index |
HibernateException | |
---|---|
SQLException |
During merge, replace the existing (target) value in the entity we are merging to with a new (original) value from the detached entity we are merging. For immutable objects, or null values, it is safe to simply return the first parameter. For mutable objects, it is safe to return a copy of the first parameter. For objects with component values, it might make sense to recursively replace component values.
original | the value from the detached entity being merged |
---|---|
target | the value in the managed entity |
HibernateException |
---|
Map identifiers to entities or collections. This is the second phase of 2-phase property initialization.
value | an identifier or value returned by hydrate() |
---|---|
session | the session |
owner | the parent entity |
HibernateException |
---|
Given a hydrated, but unresolved value, return a value that may be used to reconstruct property-ref associations.
HibernateException |
---|
Inject property values onto the given component instance
An optional operationcomponent | The component instance |
---|---|
values | The values to inject |
entityMode | The entity mode |
HibernateException |
---|
A representation of the value to be embedded in an XML element.
Return the JDBC types codes (per java.sql.Types) for the columns mapped by this type.
mapping | The mapping object :/ |
---|
MappingException |
---|
Given an instance of the type, return an array of boolean, indicating which mapped columns would be null.
value | an instance of the type |
---|
A representation of the value to be embedded in a log file.
HibernateException |
---|
Is the primary key of the owning entity table to be used in the join?