Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.hibernate.tuple.entity.AbstractEntityTuplizer
org.hibernate.tuple.entity.PojoEntityTuplizer
public class PojoEntityTuplizer
extends AbstractEntityTuplizer
EntityTuplizer
specific to the pojo entity mode.
Field Summary |
Fields inherited from class org.hibernate.tuple.entity.AbstractEntityTuplizer | |
getters , hasCustomAccessors , propertySpan , setters |
Constructor Summary | |
|
Method Summary | |
void |
|
protected Instantiator |
|
protected Getter |
|
protected Setter |
|
protected ProxyFactory |
|
protected ProxyFactory |
|
Class |
|
EntityMode | |
Class |
|
Object[] |
|
Object[] |
|
protected Object[] |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
void |
|
protected void |
|
public PojoEntityTuplizer(EntityMetamodel entityMetamodel, PersistentClass mappedEntity)
public void afterInitialize(Object entity, boolean lazyPropertiesAreUnfetched, SessionImplementor session)
Called just after the entities properties have been initialized.
- Specified by:
- afterInitialize in interface EntityTuplizer
- Overrides:
- afterInitialize in interface AbstractEntityTuplizer
- Parameters:
entity
- The entity being initialized.lazyPropertiesAreUnfetched
- Are defined lazy properties currently unfecthedsession
- The session initializing this entity.
protected Instantiator buildInstantiator(PersistentClass persistentClass)
- Overrides:
- buildInstantiator in interface AbstractEntityTuplizer
protected Getter buildPropertyGetter(Property mappedProperty, PersistentClass mappedEntity)
- Overrides:
- buildPropertyGetter in interface AbstractEntityTuplizer
protected Setter buildPropertySetter(Property mappedProperty, PersistentClass mappedEntity)
- Overrides:
- buildPropertySetter in interface AbstractEntityTuplizer
protected ProxyFactory buildProxyFactory(PersistentClass persistentClass, Getter idGetter, Setter idSetter)
- Overrides:
- buildProxyFactory in interface AbstractEntityTuplizer
protected ProxyFactory buildProxyFactoryInternal(PersistentClass persistentClass, Getter idGetter, Setter idSetter)
public Class getConcreteProxyClass()
Returns the java class to which generated proxies will be typed.
- Specified by:
- getConcreteProxyClass in interface EntityTuplizer
- Returns:
- The java class to which generated proxies will be typed
public EntityMode getEntityMode()
- Overrides:
- getEntityMode in interface AbstractEntityTuplizer
public Class getMappedClass()
Return the pojo class managed by this tuplizer. Need to determine how to best handle this for the Tuplizers for EntityModes other than POJO. todo : be really nice to not have this here since it is essentially pojo specific...
- Specified by:
- getMappedClass in interface Tuplizer
- Returns:
- The persistent class.
public Object[] getPropertyValues(Object entity) throws HibernateException
Extract the current values contained on the given entity.
- Specified by:
- getPropertyValues in interface Tuplizer
- Overrides:
- getPropertyValues in interface AbstractEntityTuplizer
- Parameters:
entity
- The entity from which to extract values.
- Returns:
- The current property values.
- Throws:
HibernateException
-
public Object[] getPropertyValuesToInsert(Object entity, Map mergeMap, SessionImplementor session) throws HibernateException
Extract the values of the insertable properties of the entity (including backrefs)
- Specified by:
- getPropertyValuesToInsert in interface EntityTuplizer
- Overrides:
- getPropertyValuesToInsert in interface AbstractEntityTuplizer
- Parameters:
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.
- Returns:
- The insertable property values.
- Throws:
HibernateException
-
protected Object[] getPropertyValuesWithOptimizer(Object object)
public boolean hasUninitializedLazyProperties(Object entity)
Does the given entity instance have any currently uninitialized lazy properties?
- Specified by:
- hasUninitializedLazyProperties in interface EntityTuplizer
- Overrides:
- hasUninitializedLazyProperties in interface AbstractEntityTuplizer
- Parameters:
entity
- The entity to be check for uninitialized lazy properties.
- Returns:
- True if uninitialized lazy properties were found; false otherwise.
public boolean isInstrumented()
Is it an instrumented POJO?
- Specified by:
- isInstrumented in interface EntityTuplizer
public boolean isLifecycleImplementor()
Does theclass
managed by this tuplizer implement theLifecycle
interface.
- Specified by:
- isLifecycleImplementor in interface EntityTuplizer
- Overrides:
- isLifecycleImplementor in interface AbstractEntityTuplizer
- Returns:
- True if the Lifecycle interface is implemented; false otherwise.
public boolean isValidatableImplementor()
Does theclass
managed by this tuplizer implement theValidatable
interface.
- Specified by:
- isValidatableImplementor in interface EntityTuplizer
- Overrides:
- isValidatableImplementor in interface AbstractEntityTuplizer
- Returns:
- True if the Validatable interface is implemented; false otherwise.
public void setPropertyValues(Object entity, Object[] values) throws HibernateException
Inject the given values into the given entity.
- Specified by:
- setPropertyValues in interface Tuplizer
- Overrides:
- setPropertyValues in interface AbstractEntityTuplizer
- Parameters:
entity
- The entity.values
- The values to be injected.
- Throws:
HibernateException
-
protected void setPropertyValuesWithOptimizer(Object object, Object[] values)