Top Description Fields Constructors Methods
org.hibernate.tuple.component

public abstract Class AbstractComponentTuplizer

extends Object
implements ComponentTuplizer
Class Inheritance
All Implemented Interfaces
org.hibernate.tuple.component.ComponentTuplizer, java.io.Serializable, org.hibernate.tuple.Tuplizer
Known Direct Subclasses
org.hibernate.tuple.component.DynamicMapComponentTuplizer, org.hibernate.tuple.component.PojoComponentTuplizer
Imports
java.lang.reflect.Method, java.util.Iterator, org.hibernate.HibernateException, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.mapping.Component, .Property, org.hibernate.property.access.spi.Getter, .Setter, org.hibernate.tuple.Instantiator

Support for tuplizers relating to components.
Authors
Gavin King, Steve Ebersole

Field Summary

Modifier and TypeField and Description
protected final Getter[]
protected final boolean
protected final Instantiator
protected final int
protected final Setter[]

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected abstract Getter
buildGetter(Component component, Property prop)

protected abstract Instantiator
protected abstract Setter
buildSetter(Component component, Property prop)

public Getter
getGetter(int
The property index.
i
)

Implements org.hibernate.tuple.Tuplizer.getGetter.

Retrieve the getter for the specified property.
public Object
getParent(Object
The component instance from which to extract the parent property value.
component
)

Implements org.hibernate.tuple.component.ComponentTuplizer.getParent.

Retrieve the current value of the parent property.
public Object
getPropertyValue(Object
The entity from which to extract the property value.
component
,
int
The index of the property for which to extract the value.
i
)

Implements org.hibernate.tuple.Tuplizer.getPropertyValue.

Extract the value of a particular property from the given entity.
public Object[]
getPropertyValues(Object
The entity from which to extract values.
component
)

Implements org.hibernate.tuple.Tuplizer.getPropertyValues.

Extract the current values contained on the given entity.
public boolean
hasParentProperty()

Implements org.hibernate.tuple.component.ComponentTuplizer.hasParentProperty.

Does the component managed by this tuplizer contain a parent property?
public Object
instantiate()

Implements org.hibernate.tuple.Tuplizer.instantiate.

This method does not populate the component parent
public boolean
isInstance(Object
The object to be checked.
object
)

Implements org.hibernate.tuple.Tuplizer.isInstance.

Is the given object considered an instance of the the entity (accounting for entity-mode) managed by this tuplizer.
public boolean
isMethodOf(Method
The method which to check against the managed component.
method
)

Implements org.hibernate.tuple.component.ComponentTuplizer.isMethodOf.

Is the given method available via the managed component as a property getter?
protected void
public void
setParent(Object
The component instance on which to set the parent.
component
,
Object
The parent to be set on the component.
parent
,
SessionFactoryImplementor
The current session factory.
factory
)

Implements org.hibernate.tuple.component.ComponentTuplizer.setParent.

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
Set the value of the parent property.
public void
setPropertyValues(Object
The entity.
component
,
Object[]
The values to be injected.
values
)

Implements org.hibernate.tuple.Tuplizer.setPropertyValues.

Inject the given values into the given entity.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

gettersback to summary
protected final Getter[] getters
hasCustomAccessorsback to summary
protected final boolean hasCustomAccessors
instantiatorback to summary
protected final Instantiator instantiator
propertySpanback to summary
protected final int propertySpan
settersback to summary
protected final Setter[] setters

Constructor Detail

AbstractComponentTuplizerback to summary
protected AbstractComponentTuplizer(Component component)

Method Detail

buildGetterback to summary
protected abstract Getter buildGetter(Component component, Property prop)
buildInstantiatorback to summary
protected abstract Instantiator buildInstantiator(Component component)
buildSetterback to summary
protected abstract Setter buildSetter(Component component, Property prop)
getGetterback to summary
public Getter getGetter(int i)

Implements org.hibernate.tuple.Tuplizer.getGetter.

Doc from org.hibernate.tuple.Tuplizer.getGetter.

Retrieve the getter for the specified property.

Parameters
i:int

The property index.

Returns:Getter

The property getter.

getParentback to summary
public Object getParent(Object component)

Implements org.hibernate.tuple.component.ComponentTuplizer.getParent.

Doc from org.hibernate.tuple.component.ComponentTuplizer.getParent.

Retrieve the current value of the parent property.

Parameters
component:Object

The component instance from which to extract the parent property value.

Returns:Object

The current value of the parent property.

getPropertyValueback to summary
public Object getPropertyValue(Object component, int i) throws HibernateException

Implements org.hibernate.tuple.Tuplizer.getPropertyValue.

Doc from org.hibernate.tuple.Tuplizer.getPropertyValue.

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

Parameters
component:Object

The entity from which to extract the property value.

i:int

The index of the property for which to extract the value.

Returns:Object

The current value of the given property on the given entity.

getPropertyValuesback to summary
public Object[] getPropertyValues(Object component) throws HibernateException

Implements org.hibernate.tuple.Tuplizer.getPropertyValues.

Doc from org.hibernate.tuple.Tuplizer.getPropertyValues.

Extract the current values contained on the given entity.

Parameters
component:Object

The entity from which to extract values.

Returns:Object[]

The current property values.

hasParentPropertyback to summary
public boolean hasParentProperty()

Implements org.hibernate.tuple.component.ComponentTuplizer.hasParentProperty.

Doc from org.hibernate.tuple.component.ComponentTuplizer.hasParentProperty.

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

Returns:boolean

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

instantiateback to summary
public Object instantiate() throws HibernateException

Implements org.hibernate.tuple.Tuplizer.instantiate.

This method does not populate the component parent

Returns:Object

Doc from org.hibernate.tuple.Tuplizer.instantiate.

The new, empty entity instance.

isInstanceback to summary
public boolean isInstance(Object object)

Implements org.hibernate.tuple.Tuplizer.isInstance.

Doc from org.hibernate.tuple.Tuplizer.isInstance.

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

Parameters
object:Object

The object to be checked.

Returns:boolean

True if the object is considered as an instance of this entity within the given mode.

isMethodOfback to summary
public boolean isMethodOf(Method method)

Implements org.hibernate.tuple.component.ComponentTuplizer.isMethodOf.

Doc from org.hibernate.tuple.component.ComponentTuplizer.isMethodOf.

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

Parameters
method:Method

The method which to check against the managed component.

Returns:boolean

True if the managed component is available from the managed component; else false.

setComponentClassback to summary
protected void setComponentClass(Component component)
setParentback to summary
public void setParent(Object component, Object parent, SessionFactoryImplementor factory)

Implements org.hibernate.tuple.component.ComponentTuplizer.setParent.

Doc from org.hibernate.tuple.component.ComponentTuplizer.setParent.

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Set the value of the parent property.

Parameters
component:Object

The component instance on which to set the parent.

parent:Object

The parent to be set on the component.

factory:SessionFactoryImplementor

The current session factory.

setPropertyValuesback to summary
public void setPropertyValues(Object component, Object[] values) throws HibernateException

Implements org.hibernate.tuple.Tuplizer.setPropertyValues.

Doc from org.hibernate.tuple.Tuplizer.setPropertyValues.

Inject the given values into the given entity.

Parameters
component:Object

The entity.

values:Object[]

The values to be injected.