Package org.hibernate.tuple.entity
Interface EntityTuplizer
-
- All Superinterfaces:
Tuplizer
- All Known Implementing Classes:
AbstractEntityTuplizer
,DynamicMapEntityTuplizer
,PojoEntityTuplizer
@Deprecated public interface EntityTuplizer extends Tuplizer
Deprecated.Defines further responsibilities regarding tuplization based on a mapped entity. EntityTuplizer implementations should have the following constructor signatures: (org.hibernate.tuple.entity.EntityMetamodel, org.hibernate.mapping.PersistentClass) (org.hibernate.tuple.entity.EntityMetamodel, org.hibernate.metamodel.binding.EntityBinding)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description String
determineConcreteSubclassEntityName(Object entityInstance, SessionFactoryImplementor factory)
Deprecated.Given an entity instance, determine the most appropriate (most targeted) entity-name which represents it.EntityNameResolver[]
getEntityNameResolvers()
Deprecated.Get anyEntityNameResolvers
associated with thisTuplizer
.Object
getIdentifier(Object entity, SharedSessionContractImplementor session)
Deprecated.(as of 6.0) - no longer used internally and to be removed.Object[]
getPropertyValuesToInsert(Object entity, Map mergeMap, SharedSessionContractImplementor session)
Deprecated.Extract the values of the insertable properties of the entity (including backrefs)-
Methods inherited from interface org.hibernate.tuple.Tuplizer
getGetter, getMappedClass, getPropertyValue
-
-
-
-
Method Detail
-
getIdentifier
@Deprecated Object getIdentifier(Object entity, SharedSessionContractImplementor session)
Deprecated.(as of 6.0) - no longer used internally and to be removed. UseEntityIdentifierMapping.getIdentifier(java.lang.Object, org.hibernate.engine.spi.SharedSessionContractImplementor)
insteadExtract the identifier value from the given entity.- Parameters:
entity
- The entity from which to extract the identifier value.session
- The session from which is requests originates- Returns:
- The identifier value.
-
getPropertyValuesToInsert
Object[] getPropertyValuesToInsert(Object entity, Map mergeMap, SharedSessionContractImplementor session)
Deprecated.Extract the values of the insertable properties of the entity (including backrefs)- Parameters:
entity
- The entity from which to extract.mergeMap
- a map of instances being merged to merged instancessession
- The session in which the result set is being made.- Returns:
- The insertable property values.
- Throws:
HibernateException
- Indicates a problem access the properties
-
getEntityNameResolvers
EntityNameResolver[] getEntityNameResolvers()
Deprecated.Get anyEntityNameResolvers
associated with thisTuplizer
.- Returns:
- The associated resolvers. May be null or empty.
-
determineConcreteSubclassEntityName
String determineConcreteSubclassEntityName(Object entityInstance, SessionFactoryImplementor factory)
Deprecated.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 inheritance 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 meaning 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).- Parameters:
entityInstance
- The entity instance.factory
- Reference to the SessionFactory.- Returns:
- The most appropriate entity name to use.
- Throws:
HibernateException
- If we are unable to determine an entity-name within the inheritance hierarchy.
-
-