EntityTuplizer implementations should have the following constructor signature: (org.hibernate.tuple.entity.EntityMetamodel, org.hibernate.mapping.PersistentClass)
| Modifier and Type | Method and Description |
|---|---|
| public void | afterInitialize(Object
The entity being initialized. entity, boolean Are defined lazy properties currently unfecthed lazyPropertiesAreUnfetched, SessionImplementor The session initializing this entity. session)Called just after the entities properties have been initialized. |
| public Object | Returns: The generate proxies.The id of the instance for which to generate a proxy. id, SessionImplementor The session to which the proxy should be bound. session)Generates an appropriate proxy representation of this entity for this entity-mode. |
| public String | Returns: The most appropriate entity name to use.The entity instance. entityInstance, SessionFactoryImplementor Reference to the SessionFactory. factory)Given an entity instance, determine the most appropriate (most targeted) entity-name which represents it. |
| public Class | Returns: The java class to which generated proxies will be typedReturns the java class to which generated proxies will be typed. |
| public EntityMode | |
| public EntityNameResolver[] | Returns: The associated resolvers. May be null or empty.Get any |
| public Serializable | Returns: The identifier value.The entity from which to extract the identifier value. entity)
Deprecated
Use
Extract the identifier value from the given entity.
getIdentifier(Object, SessionImplementor) instead.
|
| public Serializable | Returns: The identifier value.The entity from which to extract the identifier value. entity, SessionImplementor The session from which is requests originates session)Extract the identifier value from the given entity. |
| public Getter | Returns: The getter for the identifier property.Retrieve the getter for the identifier property. |
| public Object | Returns: The current value of the given property on the given entity.The entity from which to extract the property value. entity, String The name of the property for which to extract the value. propertyName)Extract the value of a particular property from the given entity. |
| public Object[] | Returns: The insertable property values.The entity from which to extract. entity, Map<K, V> a map of instances being merged to merged instances mergeMap, SessionImplementor The session in which the resuest is being made. session)Extract the values of the insertable properties of the entity (including backrefs) |
| public Object | Returns: The value of the version property, or null if not versioned.The entity from which to extract the version value. entity)Extract the value of the version property from the given entity. |
| public Getter | Returns: The getter for the version property.Retrieve the getter for the version property. |
| public boolean | Returns: True if this tuplizer can generate proxies for this entity.Does this entity, for this mode, present a possibility for proxying? |
| public boolean | Returns: True if uninitialized lazy properties were found; false otherwise.The entity to be check for uninitialized lazy properties. entity)Does the given entity instance have any currently uninitialized lazy properties? |
| public Object | Returns: The instantiated entity.The identifier value for the entity to be instantiated. id)
Deprecated
Use
Create an entity instance initialized with the given identifier.
instantiate(Serializable, SessionImplementor) instead.
|
| public Object | Returns: The instantiated entity.The identifier value for the entity to be instantiated. id, SessionImplementor The session from which is requests originates session)Create an entity instance initialized with the given identifier. |
| public boolean | |
| public boolean | Returns: True if the Lifecycle interface is implemented; false otherwise.Does the |
| public boolean | Returns: True if the Validatable interface is implemented; false otherwise.Does the |
| public void | resetIdentifier(Object
The entity for which to reset the id/version values entity, Serializable The identifier value to inject into the entity. currentId, Object The version value to inject into the entity. currentVersion)
Deprecated
Use
Inject the given identifier and version into the entity, in order to
"roll back" to their original values.
resetIdentifier(Object, Serializable, Object, SessionImplementor) instead
|
| public void | resetIdentifier(Object
The entity for which to reset the id/version values entity, Serializable The identifier value to inject into the entity. currentId, Object The version value to inject into the entity. currentVersion, SessionImplementor The session from which the request originated session)Inject the given identifier and version into the entity, in order to "roll back" to their original values. |
| public void | setIdentifier(Object
The entity to inject with the identifier value. entity, Serializable The value to be injected as the identifier. id)
Deprecated
Use
Inject the identifier value into the given entity.
setIdentifier(Object, Serializable, SessionImplementor) instead.
|
| public void | setIdentifier(Object
The entity to inject with the identifier value. entity, Serializable The value to be injected as the identifier. id, SessionImplementor The session from which is requests originates session)Inject the identifier value into the given entity. |
| public void | setPropertyValue(Object
The entity into which to inject the value. entity, int The property's index. i, Object The property value to inject. value)Inject the value of a particular property. |
| public void | setPropertyValue(Object
The entity into which to inject the value. entity, String The name of the property. propertyName, Object The property value to inject. value)Inject the value of a particular property. |
| afterInitialize | back to summary |
|---|---|
| public void afterInitialize(Object entity, boolean lazyPropertiesAreUnfetched, SessionImplementor session) Called just after the entities properties have been initialized.
| |
| createProxy | back to summary |
|---|---|
| public Object createProxy(Serializable id, SessionImplementor session) throws HibernateException Generates an appropriate proxy representation of this entity for this entity-mode.
| |
| determineConcreteSubclassEntityName | back to summary |
|---|---|
| public String determineConcreteSubclassEntityName(Object entityInstance, SessionFactoryImplementor factory) 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).
| |
| getConcreteProxyClass | back to summary |
|---|---|
| public Class Returns the java class to which generated proxies will be typed.
todo : look at fully encapsulating
| |
| getEntityMode | back to summary |
|---|---|
| public EntityMode getEntityMode() Return the entity-mode handled by this tuplizer instance.
| |
| getEntityNameResolvers | back to summary |
|---|---|
| public EntityNameResolver[] getEntityNameResolvers() Get any
| |
| getIdentifier | back to summary |
|---|---|
| public Serializable getIdentifier(Object entity) throws HibernateException
Deprecated Use Extract the identifier value from the given entity.
| |
| getIdentifier | back to summary |
|---|---|
| public Serializable getIdentifier(Object entity, SessionImplementor session) Extract the identifier value from the given entity.
| |
| getIdentifierGetter | back to summary |
|---|---|
| public Getter getIdentifierGetter() Retrieve the getter for the identifier property. May return null.
| |
| getPropertyValue | back to summary |
|---|---|
| public Object getPropertyValue(Object entity, String propertyName) throws HibernateException Extract the value of a particular property from the given entity. | |
| getPropertyValuesToInsert | back to summary |
|---|---|
| public Object[] getPropertyValuesToInsert(Object entity, Map<K, V> mergeMap, SessionImplementor session) throws HibernateException Extract the values of the insertable properties of the entity (including backrefs)
| |
| getVersion | back to summary |
|---|---|
| public Object getVersion(Object entity) throws HibernateException Extract the value of the version property from the given entity. | |
| getVersionGetter | back to summary |
|---|---|
| public Getter getVersionGetter() Retrieve the getter for the version property. May return null.
| |
| hasProxy | back to summary |
|---|---|
| public boolean hasProxy() Does this entity, for this mode, present a possibility for proxying?
| |
| hasUninitializedLazyProperties | back to summary |
|---|---|
| public boolean hasUninitializedLazyProperties(Object entity) Does the given entity instance have any currently uninitialized lazy properties?
| |
| instantiate | back to summary |
|---|---|
| public Object instantiate(Serializable id) throws HibernateException
Deprecated Use Create an entity instance initialized with the given identifier.
| |
| instantiate | back to summary |
|---|---|
| public Object instantiate(Serializable id, SessionImplementor session) Create an entity instance initialized with the given identifier.
| |
| isInstrumented | back to summary |
|---|---|
| public boolean isInstrumented() Is it an instrumented POJO? | |
| isLifecycleImplementor | back to summary |
|---|---|
| public boolean isLifecycleImplementor() Does the
| |
| isValidatableImplementor | back to summary |
|---|---|
| public boolean isValidatableImplementor() Does the
| |
| resetIdentifier | back to summary |
|---|---|
| public void resetIdentifier(Object entity, Serializable currentId, Object currentVersion)
Deprecated Use Inject the given identifier and version into the entity, in order to "roll back" to their original values.
| |
| resetIdentifier | back to summary |
|---|---|
| public void resetIdentifier(Object entity, Serializable currentId, Object currentVersion, SessionImplementor session) Inject the given identifier and version into the entity, in order to "roll back" to their original values.
| |
| setIdentifier | back to summary |
|---|---|
| public void setIdentifier(Object entity, Serializable id) throws HibernateException
Deprecated Use Inject the identifier value into the given entity. Has no effect if the entity does not define an identifier property
| |
| setIdentifier | back to summary |
|---|---|
| public void setIdentifier(Object entity, Serializable id, SessionImplementor session) Inject the identifier value into the given entity. Has no effect if the entity does not define an identifier property
| |
| setPropertyValue | back to summary |
|---|---|
| public void setPropertyValue(Object entity, int i, Object value) throws HibernateException Inject the value of a particular property. | |
| setPropertyValue | back to summary |
|---|---|
| public void setPropertyValue(Object entity, String propertyName, Object value) throws HibernateException Inject the value of a particular property. | |