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, wait
getMappedClass
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
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
getPropertyValues
in interface Tuplizer
component
- The entity from which to extract values.HibernateException
public boolean isInstance(Object object)
Tuplizer
isInstance
in interface Tuplizer
object
- The object to be checked.public void setPropertyValues(Object component, Object[] values) throws HibernateException
Tuplizer
setPropertyValues
in interface Tuplizer
component
- The entity.values
- The values to be injected.HibernateException
public Object instantiate() throws HibernateException
instantiate
in interface Tuplizer
HibernateException
public Object getParent(Object component)
ComponentTuplizer
getParent
in interface ComponentTuplizer
component
- The component instance from which to extract the parent
property value.public boolean hasParentProperty()
ComponentTuplizer
hasParentProperty
in interface ComponentTuplizer
public boolean isMethodOf(Method method)
ComponentTuplizer
isMethodOf
in interface ComponentTuplizer
method
- The method which to check against the managed component.public void setParent(Object component, Object parent, SessionFactoryImplementor factory)
ComponentTuplizer
setParent
in interface ComponentTuplizer
component
- 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)
Tuplizer
protected void setComponentClass(Component component)
Copyright © 2001-2021 Red Hat, Inc. All Rights Reserved.