|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.tuple.entity.AbstractEntityTuplizer org.hibernate.tuple.entity.PojoEntityTuplizer
public class PojoEntityTuplizer
An EntityTuplizer
specific to the pojo entity mode.
Field Summary |
---|
Fields inherited from class org.hibernate.tuple.entity.AbstractEntityTuplizer |
---|
getters, hasCustomAccessors, propertySpan, setters |
Constructor Summary | |
---|---|
PojoEntityTuplizer(EntityMetamodel entityMetamodel,
PersistentClass mappedEntity)
|
Method Summary | |
---|---|
void |
afterInitialize(Object entity,
boolean lazyPropertiesAreUnfetched,
SessionImplementor session)
Called just after the entities properties have been initialized. |
protected Instantiator |
buildInstantiator(PersistentClass persistentClass)
Build an appropriate Instantiator for the given mapped entity. |
protected Getter |
buildPropertyGetter(Property mappedProperty,
PersistentClass mappedEntity)
Build an appropriate Getter for the given property. |
protected Setter |
buildPropertySetter(Property mappedProperty,
PersistentClass mappedEntity)
Build an appropriate Setter for the given property. |
protected ProxyFactory |
buildProxyFactory(PersistentClass persistentClass,
Getter idGetter,
Setter idSetter)
Build an appropriate ProxyFactory for the given mapped entity. |
protected ProxyFactory |
buildProxyFactoryInternal(PersistentClass persistentClass,
Getter idGetter,
Setter idSetter)
|
Class |
getConcreteProxyClass()
Returns the java class to which generated proxies will be typed. |
EntityMode |
getEntityMode()
Return the entity-mode handled by this tuplizer instance. |
Class |
getMappedClass()
Return the pojo class managed by this tuplizer. |
Object[] |
getPropertyValues(Object entity)
Extract the current values contained on the given entity. |
Object[] |
getPropertyValuesToInsert(Object entity,
Map mergeMap,
SessionImplementor session)
Extract the values of the insertable properties of the entity (including backrefs) |
protected Object[] |
getPropertyValuesWithOptimizer(Object object)
|
boolean |
hasUninitializedLazyProperties(Object entity)
Does the given entity instance have any currently uninitialized lazy properties? |
boolean |
isInstrumented()
Is it an instrumented POJO? |
boolean |
isLifecycleImplementor()
Does the class managed by this tuplizer implement
the Lifecycle interface. |
boolean |
isValidatableImplementor()
Does the class managed by this tuplizer implement
the Validatable interface. |
void |
setPropertyValues(Object entity,
Object[] values)
Inject the given values into the given entity. |
protected void |
setPropertyValuesWithOptimizer(Object object,
Object[] values)
|
Methods inherited from class org.hibernate.tuple.entity.AbstractEntityTuplizer |
---|
createProxy, getComponentValue, getEntityMetamodel, getEntityName, getFactory, getIdentifier, getInstantiator, getPropertyValue, getPropertyValue, getProxyFactory, getSubclassEntityNames, getVersion, hasProxy, instantiate, instantiate, isInstance, resetIdentifier, setIdentifier, setPropertyValue, setPropertyValue, shouldGetAllProperties, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PojoEntityTuplizer(EntityMetamodel entityMetamodel, PersistentClass mappedEntity)
Method Detail |
---|
protected ProxyFactory buildProxyFactory(PersistentClass persistentClass, Getter idGetter, Setter idSetter)
AbstractEntityTuplizer
buildProxyFactory
in class AbstractEntityTuplizer
persistentClass
- The mapping information regarding the mapped entity.idGetter
- The constructed Getter relating to the entity's id property.idSetter
- The constructed Setter relating to the entity's id property.
protected ProxyFactory buildProxyFactoryInternal(PersistentClass persistentClass, Getter idGetter, Setter idSetter)
protected Instantiator buildInstantiator(PersistentClass persistentClass)
AbstractEntityTuplizer
buildInstantiator
in class AbstractEntityTuplizer
persistentClass
- The mapping information regarding the mapped entity.
public void setPropertyValues(Object entity, Object[] values) throws HibernateException
Tuplizer
setPropertyValues
in interface Tuplizer
setPropertyValues
in class AbstractEntityTuplizer
entity
- The entity.values
- The values to be injected.
HibernateException
public Object[] getPropertyValues(Object entity) throws HibernateException
Tuplizer
getPropertyValues
in interface Tuplizer
getPropertyValues
in class AbstractEntityTuplizer
entity
- The entity from which to extract values.
HibernateException
public Object[] getPropertyValuesToInsert(Object entity, Map mergeMap, SessionImplementor session) throws HibernateException
EntityTuplizer
getPropertyValuesToInsert
in interface EntityTuplizer
getPropertyValuesToInsert
in class AbstractEntityTuplizer
entity
- The entity from which to extract.mergeMap
- a map of instances being merged to merged instancessession
- The session in which the resuest is being made.
HibernateException
protected void setPropertyValuesWithOptimizer(Object object, Object[] values)
protected Object[] getPropertyValuesWithOptimizer(Object object)
public EntityMode getEntityMode()
AbstractEntityTuplizer
getEntityMode
in class AbstractEntityTuplizer
public Class getMappedClass()
Tuplizer
public boolean isLifecycleImplementor()
EntityTuplizer
class
managed by this tuplizer implement
the Lifecycle
interface.
isLifecycleImplementor
in interface EntityTuplizer
isLifecycleImplementor
in class AbstractEntityTuplizer
public boolean isValidatableImplementor()
EntityTuplizer
class
managed by this tuplizer implement
the Validatable
interface.
isValidatableImplementor
in interface EntityTuplizer
isValidatableImplementor
in class AbstractEntityTuplizer
protected Getter buildPropertyGetter(Property mappedProperty, PersistentClass mappedEntity)
AbstractEntityTuplizer
buildPropertyGetter
in class AbstractEntityTuplizer
mappedProperty
- The property to be accessed via the built Getter.mappedEntity
- The entity information regarding the mapped entity owning this property.
protected Setter buildPropertySetter(Property mappedProperty, PersistentClass mappedEntity)
AbstractEntityTuplizer
buildPropertySetter
in class AbstractEntityTuplizer
mappedProperty
- The property to be accessed via the built Setter.mappedEntity
- The entity information regarding the mapped entity owning this property.
public Class getConcreteProxyClass()
EntityTuplizer
public void afterInitialize(Object entity, boolean lazyPropertiesAreUnfetched, SessionImplementor session)
EntityTuplizer
afterInitialize
in interface EntityTuplizer
afterInitialize
in class AbstractEntityTuplizer
entity
- The entity being initialized.lazyPropertiesAreUnfetched
- Are defined lazy properties currently unfecthedsession
- The session initializing this entity.public boolean hasUninitializedLazyProperties(Object entity)
EntityTuplizer
hasUninitializedLazyProperties
in interface EntityTuplizer
hasUninitializedLazyProperties
in class AbstractEntityTuplizer
entity
- The entity to be check for uninitialized lazy properties.
public boolean isInstrumented()
EntityTuplizer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |