public abstract class AbstractComponentTuplizer extends Object implements ComponentTuplizer
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)
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.
|
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
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 comonent.factory
- The current session factory.Copyright © 2016 JBoss by Red Hat. All rights reserved.