org.hibernate.tuple.entity.EntityTuplizer |
Known Indirect Subclasses |
Defines further responsibilities reagarding tuplization based on a mapped entity.
EntityTuplizer implementations should have the following constructor signature: (org.hibernate.tuple.entity.EntityMetamodel, org.hibernate.mapping.PersistentClass)Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Called just after the entities properties have been initialized.
| |||||||||||
Generates an appropriate proxy representation of this entity for this
entity-mode.
| |||||||||||
Given an entity instance, determine the most appropriate (most targeted) entity-name which represents it.
| |||||||||||
Returns the java class to which generated proxies will be typed.
| |||||||||||
Return the entity-mode handled by this tuplizer instance.
| |||||||||||
Get any
EntityNameResolvers associated with this Tuplizer . | |||||||||||
Extract the identifier value from the given entity.
| |||||||||||
This method is deprecated.
Use
getIdentifier(Object, SessionImplementor) instead.
| |||||||||||
Retrieve the getter for the identifier property.
| |||||||||||
Extract the value of a particular property from the given entity.
| |||||||||||
Extract the values of the insertable properties of the entity (including backrefs)
| |||||||||||
Extract the value of the version property from the given entity.
| |||||||||||
Retrieve the getter for the version property.
| |||||||||||
Does this entity, for this mode, present a possibility for proxying?
| |||||||||||
Does the given entity instance have any currently uninitialized lazy properties?
| |||||||||||
Create an entity instance initialized with the given identifier.
| |||||||||||
This method is deprecated.
Use
instantiate(Serializable, SessionImplementor) instead. | |||||||||||
Is it an instrumented POJO?
| |||||||||||
Does the
class managed by this tuplizer implement
the Validatable interface. | |||||||||||
This method is deprecated.
Use
resetIdentifier(Object, Serializable, Object, SessionImplementor) instead
| |||||||||||
Inject the given identifier and version into the entity, in order to
"roll back" to their original values.
| |||||||||||
This method is deprecated.
Use
setIdentifier(Object, Serializable, SessionImplementor) instead. | |||||||||||
Inject the identifier value into the given entity.
| |||||||||||
Inject the value of a particular property.
| |||||||||||
Inject the value of a particular property.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
org.hibernate.tuple.Tuplizer
|
Called just after the entities properties have been initialized.
entity | The entity being initialized. |
---|---|
lazyPropertiesAreUnfetched | Are defined lazy properties currently unfecthed |
session | The session initializing this entity. |
Generates an appropriate proxy representation of this entity for this entity-mode.
id | The id of the instance for which to generate a proxy. |
---|---|
session | The session to which the proxy should be bound. |
HibernateException | Indicates an error generating the proxy. |
---|
Given an entity instance, determine the most appropriate (most targeted) entity-name which represents it. This is called in situations where we already know an entity name for the given entityInstance; we are being asked to determine if there is a more appropriate entity-name to use, specifically within an inheritence hierarchy.
For example, consider a case where a user calls session.update( "Animal", cat );. Here, the user has explicitly provided Animal as the entity-name. However, they have passed in an instance of Cat which is a subclass of Animal. In this case, we would return Cat as the entity-name. null may be returned from calls to this method. The meaining of null in that case is assumed to be that we should use whatever explicit entity-name the user provided (Animal rather than Cat in the example above).entityInstance | The entity instance. |
---|---|
factory | Reference to the SessionFactory. |
HibernateException | If we are unable to determine an entity-name within the inheritence hierarchy. |
---|
Returns the java class to which generated proxies will be typed.
todo : look at fully encapsulatingnarrowProxy(Object, EntityPersister, EntityKey, Object)
here,
since that is the only external use of this methodReturn the entity-mode handled by this tuplizer instance.
Get any EntityNameResolvers
associated with this Tuplizer
.
Extract the identifier value from the given entity.
entity | The entity from which to extract the identifier value. |
---|---|
session | The session from which is requests originates |
This method is deprecated.
Use getIdentifier(Object, SessionImplementor)
instead.
Extract the identifier value from the given entity.
entity | The entity from which to extract the identifier value. |
---|
HibernateException | If the entity does not define an identifier property, or an error occurs accessing its value. |
---|
Retrieve the getter for the identifier property. May return null.
Extract the value of a particular property from the given entity.
entity | The entity from which to extract the property value. |
---|---|
propertyName | The name of the property for which to extract the value. |
HibernateException |
---|
Extract the values of the insertable properties of the entity (including backrefs)
entity | The entity from which to extract. |
---|---|
mergeMap | a map of instances being merged to merged instances |
session | The session in which the resuest is being made. |
HibernateException |
---|
Extract the value of the version property from the given entity.
entity | The entity from which to extract the version value. |
---|
HibernateException |
---|
Retrieve the getter for the version property. May return null.
Does this entity, for this mode, present a possibility for proxying?
Does the given entity instance have any currently uninitialized lazy properties?
entity | The entity to be check for uninitialized lazy properties. |
---|
Create an entity instance initialized with the given identifier.
id | The identifier value for the entity to be instantiated. |
---|---|
session | The session from which is requests originates |
This method is deprecated.
Use instantiate(Serializable, SessionImplementor)
instead.
Create an entity instance initialized with the given identifier.
id | The identifier value for the entity to be instantiated. |
---|
HibernateException | |
HibernateException |
Is it an instrumented POJO?
Does the class
managed by this tuplizer implement
the Validatable
interface.
This method is deprecated.
Use resetIdentifier(Object, Serializable, Object, SessionImplementor)
instead
Inject the given identifier and version into the entity, in order to "roll back" to their original values.
entity | The entity for which to reset the id/version values |
---|---|
currentId | The identifier value to inject into the entity. |
currentVersion | The version value to inject into the entity. |
Inject the given identifier and version into the entity, in order to "roll back" to their original values.
entity | The entity for which to reset the id/version values |
---|---|
currentId | The identifier value to inject into the entity. |
currentVersion | The version value to inject into the entity. |
session | The session from which the request originated |
This method is deprecated.
Use setIdentifier(Object, Serializable, SessionImplementor)
instead.
Inject the identifier value into the given entity.
Has no effect if the entity does not define an identifier propertyentity | The entity to inject with the identifier value. |
---|---|
id | The value to be injected as the identifier. |
HibernateException |
---|
Inject the identifier value into the given entity.
Has no effect if the entity does not define an identifier propertyentity | The entity to inject with the identifier value. |
---|---|
id | The value to be injected as the identifier. |
session | The session from which is requests originates |
Inject the value of a particular property.
entity | The entity into which to inject the value. |
---|---|
i | The property's index. |
value | The property value to inject. |
HibernateException |
---|
Inject the value of a particular property.
entity | The entity into which to inject the value. |
---|---|
propertyName | The name of the property. |
value | The property value to inject. |
HibernateException |
---|