Save This Page
Home » hibernate-distribution-3.3.1.GA-dist » org.hibernate » tuple » entity » [javadoc | source]
org.hibernate.tuple.entity
public interface: EntityTuplizer [javadoc | source]

All Implemented Interfaces:
    Tuplizer

All Known Implementing Classes:
    Dom4jEntityTuplizer, DynamicMapEntityTuplizer, PojoEntityTuplizer, AbstractEntityTuplizer

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)

Method from org.hibernate.tuple.entity.EntityTuplizer Summary:
afterInitialize,   createProxy,   getConcreteProxyClass,   getIdentifier,   getPropertyValue,   getPropertyValuesToInsert,   getVersion,   hasProxy,   hasUninitializedLazyProperties,   instantiate,   isInstrumented,   isLifecycleImplementor,   isValidatableImplementor,   resetIdentifier,   setIdentifier,   setPropertyValue,   setPropertyValue
Method from org.hibernate.tuple.entity.EntityTuplizer Detail:
 public  void afterInitialize(Object entity,
    boolean lazyPropertiesAreUnfetched,
    SessionImplementor session)
    Called just after the entities properties have been initialized.
 public Object createProxy(Serializable id,
    SessionImplementor session) throws HibernateException
    Generates an appropriate proxy representation of this entity for this entity-mode.
 public Class getConcreteProxyClass()
    Returns the java class to which generated proxies will be typed.
 public Serializable getIdentifier(Object entity) throws HibernateException
    Extract the identifier value from the given entity.
 public Object getPropertyValue(Object entity,
    String propertyName) throws HibernateException
    Extract the value of a particular property from the given entity.
 public Object[] getPropertyValuesToInsert(Object entity,
    Map mergeMap,
    SessionImplementor session) throws HibernateException
    Extract the values of the insertable properties of the entity (including backrefs)
 public Object getVersion(Object entity) throws HibernateException
    Extract the value of the version property from the given entity.
 public boolean hasProxy()
    Does this entity, for this mode, present a possibility for proxying?
 public boolean hasUninitializedLazyProperties(Object entity)
    Does the given entity instance have any currently uninitialized lazy properties?
 public Object instantiate(Serializable id) throws HibernateException
    Create an entity instance initialized with the given identifier.
 public boolean isInstrumented()
    Is it an instrumented POJO?
 public boolean isLifecycleImplementor()
 public boolean isValidatableImplementor()
 public  void resetIdentifier(Object entity,
    Serializable currentId,
    Object currentVersion)
    Inject the given identifier and version into the entity, in order to "roll back" to their original values.
 public  void setIdentifier(Object entity,
    Serializable id) throws HibernateException
    Inject the identifier value into the given entity.

    Has no effect if the entity does not define an identifier property
 public  void setPropertyValue(Object entity,
    int i,
    Object value) throws HibernateException
    Inject the value of a particular property.
 public  void setPropertyValue(Object entity,
    String propertyName,
    Object value) throws HibernateException
    Inject the value of a particular property.