public abstract class AbstractComponentTuplizer extends Object implements ComponentTuplizer
Support for tuplizers relating to components.
Type | Property and Description |
---|---|
boolean |
hasParent
Does the component managed by this tuuplizer contain a parent property?
|
Modifier and Type | Field and Description |
---|---|
protected Getter[] |
getters |
protected boolean |
hasCustomAccessors |
protected Instantiator |
instantiator |
protected int |
propertySpan |
protected Setter[] |
setters |
Modifier | Constructor and Description |
---|---|
protected |
AbstractComponentTuplizer(Component component) |
Modifier and Type | Method and Description |
---|---|
protected abstract Getter |
buildGetter(Component component,
Property prop) |
protected abstract Instantiator |
buildInstantiator(Component component) |
protected abstract Setter |
buildSetter(Component component,
Property prop) |
Getter |
getGetter(int i)
Retrieve the getter for the specified property.
|
Object |
getParent(Object component)
Retrieve 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?
|
protected void |
setComponentClass(Component component) |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMappedClass
public boolean hasParentProperty
hasParentProperty
in interface ComponentTuplizer
protected final Getter[] getters
protected final Setter[] setters
protected final int propertySpan
protected final Instantiator instantiator
protected final boolean hasCustomAccessors
protected AbstractComponentTuplizer(Component component)
protected abstract Instantiator buildInstantiator(Component component)
public Object getPropertyValue(Object component, int i) throws HibernateException
Tuplizer
Extract the value of a particular property from the given entity.
getPropertyValue
in interface Tuplizer
component
- The entity from which to extract the property value.i
- The index of the property for which to extract the value.HibernateException
public Object[] getPropertyValues(Object component) throws HibernateException
Tuplizer
Extract the current values contained on the given entity.
getPropertyValues
in interface Tuplizer
component
- The entity from which to extract values.HibernateException
public boolean isInstance(Object object)
Tuplizer
Is the given object considered an instance of the the entity (acconting for entity-mode) managed by this tuplizer.
isInstance
in interface Tuplizer
object
- The object to be checked.public void setPropertyValues(Object component, Object[] values) throws HibernateException
Tuplizer
Inject the given values into the given entity.
setPropertyValues
in interface Tuplizer
component
- The entity.values
- The values to be injected.HibernateException
public Object instantiate() throws HibernateException
This method does not populate the component parent
instantiate
in interface Tuplizer
HibernateException
public Object getParent(Object component)
ComponentTuplizer
Retrieve the current value of the parent property.
getParent
in interface ComponentTuplizer
component
- The component instance from which to extract the parent
property value.public boolean hasParentProperty()
ComponentTuplizer
Does the component managed by this tuuplizer contain a parent property?
hasParentProperty
in interface ComponentTuplizer
public boolean isMethodOf(Method method)
ComponentTuplizer
Is the given method available via the managed component as a property getter?
isMethodOf
in interface ComponentTuplizer
method
- The method which to check against the managed component.public void setParent(Object component, Object parent, SessionFactoryImplementor factory)
ComponentTuplizer
Set the value of the parent property.
setParent
in interface ComponentTuplizer
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 Getter getGetter(int i)
Tuplizer
Retrieve the getter for the specified property.
protected void setComponentClass(Component component)
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.