public abstract class AbstractComponentTuplizer extends Object implements ComponentTuplizer
| 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 tuplizer 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 (accounting
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, waitgetMappedClassprotected 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
TuplizergetPropertyValue in interface Tuplizercomponent - The entity from which to extract the property value.i - The index of the property for which to extract the value.HibernateExceptionpublic Object[] getPropertyValues(Object component) throws HibernateException
TuplizergetPropertyValues in interface Tuplizercomponent - The entity from which to extract values.HibernateExceptionpublic boolean isInstance(Object object)
TuplizerisInstance in interface Tuplizerobject - The object to be checked.public void setPropertyValues(Object component, Object[] values) throws HibernateException
TuplizersetPropertyValues in interface Tuplizercomponent - The entity.values - The values to be injected.HibernateExceptionpublic Object instantiate() throws HibernateException
instantiate in interface TuplizerHibernateExceptionpublic Object getParent(Object component)
ComponentTuplizergetParent in interface ComponentTuplizercomponent - The component instance from which to extract the parent
property value.public boolean hasParentProperty()
ComponentTuplizerhasParentProperty in interface ComponentTuplizerpublic boolean isMethodOf(Method method)
ComponentTuplizerisMethodOf in interface ComponentTuplizermethod - The method which to check against the managed component.public void setParent(Object component, Object parent, SessionFactoryImplementor factory)
ComponentTuplizersetParent in interface ComponentTuplizercomponent - The component instance on which to set the parent.parent - The parent to be set on the component.factory - The current session factory.public Getter getGetter(int i)
Tuplizerprotected void setComponentClass(Component component)
Copyright © 2001-2022 Red Hat, Inc. All Rights Reserved.