Package org.hibernate.tuple.component
Class AbstractComponentTuplizer
java.lang.Object
org.hibernate.tuple.component.AbstractComponentTuplizer
- All Implemented Interfaces:
Serializable,ComponentTuplizer,Tuplizer
- Direct Known Subclasses:
Dom4jComponentTuplizer,DynamicMapComponentTuplizer,PojoComponentTuplizer
Support for tuplizers relating to components.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Getter[]protected final booleanprotected final Instantiatorprotected final intprotected final Setter[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract GetterbuildGetter(Component component, Property prop) protected abstract InstantiatorbuildInstantiator(Component component) protected abstract SetterbuildSetter(Component component, Property prop) getGetter(int i) Retrieve the getter for the specified property.Retreive the current value of the parent property.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.booleanDoes the component managed by this tuuplizer contain a parent property?This method does not populate the component parentbooleanisInstance(Object object) Is the given object considered an instance of the the entity (acconting for entity-mode) managed by this tuplizer.booleanisMethodOf(Method method) Is the given method available via the managed component as a property getter?voidsetParent(Object component, Object parent, SessionFactoryImplementor factory) Set the value of the parent property.voidsetPropertyValues(Object component, Object[] values) Inject the given values into the given entity.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.tuple.Tuplizer
getMappedClass
-
Field Details
-
getters
-
setters
-
propertySpan
protected final int propertySpan -
instantiator
-
hasCustomAccessors
protected final boolean hasCustomAccessors
-
-
Constructor Details
-
AbstractComponentTuplizer
-
-
Method Details
-
buildInstantiator
-
buildGetter
-
buildSetter
-
getPropertyValue
Description copied from interface:TuplizerExtract the value of a particular property from the given entity.- Specified by:
getPropertyValuein interfaceTuplizer- Parameters:
component- The entity from which to extract the property value.i- The index of the property for which to extract the value.- Returns:
- The current value of the given property on the given entity.
- Throws:
HibernateException
-
getPropertyValues
Description copied from interface:TuplizerExtract the current values contained on the given entity.- Specified by:
getPropertyValuesin interfaceTuplizer- Parameters:
component- The entity from which to extract values.- Returns:
- The current property values.
- Throws:
HibernateException
-
isInstance
Description copied from interface:TuplizerIs the given object considered an instance of the the entity (acconting for entity-mode) managed by this tuplizer.- Specified by:
isInstancein interfaceTuplizer- Parameters:
object- The object to be checked.- Returns:
- True if the object is considered as an instance of this entity within the given mode.
-
setPropertyValues
Description copied from interface:TuplizerInject the given values into the given entity.- Specified by:
setPropertyValuesin interfaceTuplizer- Parameters:
component- The entity.values- The values to be injected.- Throws:
HibernateException
-
instantiate
This method does not populate the component parent- Specified by:
instantiatein interfaceTuplizer- Returns:
- The new, empty entity instance.
- Throws:
HibernateException
-
getParent
Description copied from interface:ComponentTuplizerRetreive the current value of the parent property.- Specified by:
getParentin interfaceComponentTuplizer- Parameters:
component- The component instance from which to extract the parent property value.- Returns:
- The current value of the parent property.
-
hasParentProperty
public boolean hasParentProperty()Description copied from interface:ComponentTuplizerDoes the component managed by this tuuplizer contain a parent property?- Specified by:
hasParentPropertyin interfaceComponentTuplizer- Returns:
- True if the component does contain a parent property; false otherwise.
-
isMethodOf
Description copied from interface:ComponentTuplizerIs the given method available via the managed component as a property getter?- Specified by:
isMethodOfin interfaceComponentTuplizer- Parameters:
method- The method which to check against the managed component.- Returns:
- True if the managed component is available from the managed component; else false.
-
setParent
Description copied from interface:ComponentTuplizerSet the value of the parent property.- Specified by:
setParentin interfaceComponentTuplizer- Parameters:
component- The component instance on which to set the parent.parent- The parent to be set on the comonent.factory- The current session factory.
-
getGetter
Description copied from interface:TuplizerRetrieve the getter for the specified property.
-