public abstract class

AbstractComponentTuplizer

extends Object
implements ComponentTuplizer
java.lang.Object
   ↳ org.hibernate.tuple.component.AbstractComponentTuplizer
Known Direct Subclasses

Class Overview

Support for tuplizers relating to components.

Summary

Fields
protected final Getter[] getters
protected final boolean hasCustomAccessors
protected final Instantiator instantiator
protected final int propertySpan
protected final Setter[] setters
Protected Constructors
AbstractComponentTuplizer(Component component)
Public Methods
Getter getGetter(int i)
Retrieve the getter for the specified property.
Object getParent(Object component)
Retreive the current value of the parent property.
Object getPropertyValue(Object component, int i)
Extract the value of a particular property from the given entity.
Object[] getPropertyValues(Object component)
Extract the current values contained on the given entity.
boolean hasParentProperty()
Does the component managed by this tuuplizer contain a parent property?
Object instantiate()
This method does not populate the component parent
boolean isInstance(Object object)
Is the given object considered an instance of the the entity (acconting for entity-mode) managed by this tuplizer.
boolean isMethodOf(Method method)
Is the given method available via the managed component as a property getter?
void setParent(Object component, Object parent, SessionFactoryImplementor factory)
Set the value of the parent property.
void setPropertyValues(Object component, Object[] values)
Inject the given values into the given entity.
Protected Methods
abstract Getter buildGetter(Component component, Property prop)
abstract Instantiator buildInstantiator(Component component)
abstract Setter buildSetter(Component component, Property prop)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.hibernate.tuple.Tuplizer
From interface org.hibernate.tuple.component.ComponentTuplizer

Fields

protected final Getter[] getters

protected final boolean hasCustomAccessors

protected final Instantiator instantiator

protected final int propertySpan

protected final Setter[] setters

Protected Constructors

protected AbstractComponentTuplizer (Component component)

Public Methods

public Getter getGetter (int i)

Retrieve the getter for the specified property.

Parameters
i The property index.
Returns
  • The property getter.

public Object getParent (Object component)

Retreive the current value of the parent property.

Parameters
component The component instance from which to extract the parent property value.
Returns
  • The current value of the parent property.

public Object getPropertyValue (Object component, int i)

Extract the value of a particular property from the given entity.

Parameters
component The entity from which to extract the property value.
i The index of the property for which to extract the value.
Returns
  • The current value of the given property on the given entity.

public Object[] getPropertyValues (Object component)

Extract the current values contained on the given entity.

Parameters
component The entity from which to extract values.
Returns
  • The current property values.

public boolean hasParentProperty ()

Does the component managed by this tuuplizer contain a parent property?

Returns
  • True if the component does contain a parent property; false otherwise.

public Object instantiate ()

This method does not populate the component parent

Returns
  • The new, empty entity instance.

public boolean isInstance (Object object)

Is the given object considered an instance of the the entity (acconting for entity-mode) managed by this tuplizer.

Parameters
object The object to be checked.
Returns
  • True if the object is considered as an instance of this entity within the given mode.

public boolean isMethodOf (Method method)

Is the given method available via the managed component as a property getter?

Parameters
method The method which to check against the managed component.
Returns
  • True if the managed component is available from the managed component; else false.

public void setParent (Object component, Object parent, SessionFactoryImplementor factory)

Set the value of the parent property.

Parameters
component The component instance on which to set the parent.
parent The parent to be set on the comonent.
factory The current session factory.

public void setPropertyValues (Object component, Object[] values)

Inject the given values into the given entity.

Parameters
component The entity.
values The values to be injected.

Protected Methods

protected abstract Getter buildGetter (Component component, Property prop)

protected abstract Instantiator buildInstantiator (Component component)

protected abstract Setter buildSetter (Component component, Property prop)