Package org.hibernate.tuple.component
Class PojoComponentTuplizer
java.lang.Object
org.hibernate.tuple.component.AbstractComponentTuplizer
org.hibernate.tuple.component.PojoComponentTuplizer
- All Implemented Interfaces:
Serializable,ComponentTuplizer,Tuplizer
A
ComponentTuplizer specific to the pojo entity mode.- See Also:
-
Field Summary
Fields inherited from class org.hibernate.tuple.component.AbstractComponentTuplizer
getters, hasCustomAccessors, instantiator, propertySpan, setters -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected GetterbuildGetter(Component component, Property prop) protected InstantiatorbuildInstantiator(Component component) protected SetterbuildSetter(Component component, Property prop) Return the pojo class managed by this tuplizer.Retreive the current value of the parent property.Object[]getPropertyValues(Object component) Extract the current values contained on the given entity.booleanDoes the component managed by this tuuplizer contain a parent property?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 org.hibernate.tuple.component.AbstractComponentTuplizer
getGetter, getPropertyValue, instantiate, isInstance
-
Constructor Details
-
PojoComponentTuplizer
-
-
Method Details
-
getMappedClass
Description copied from interface:TuplizerReturn the pojo class managed by this tuplizer. Need to determine how to best handle this for the Tuplizers for EntityModes other than POJO. todo : be really nice to not have this here since it is essentially pojo specific...- Returns:
- The persistent class.
-
getPropertyValues
Description copied from interface:TuplizerExtract the current values contained on the given entity.- Specified by:
getPropertyValuesin interfaceTuplizer- Overrides:
getPropertyValuesin classAbstractComponentTuplizer- Parameters:
component- The entity from which to extract values.- Returns:
- The current property values.
- Throws:
HibernateException
-
setPropertyValues
Description copied from interface:TuplizerInject the given values into the given entity.- Specified by:
setPropertyValuesin interfaceTuplizer- Overrides:
setPropertyValuesin classAbstractComponentTuplizer- Parameters:
component- The entity.values- The values to be injected.- Throws:
HibernateException
-
getParent
Description copied from interface:ComponentTuplizerRetreive the current value of the parent property.- Specified by:
getParentin interfaceComponentTuplizer- Overrides:
getParentin classAbstractComponentTuplizer- 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- Overrides:
hasParentPropertyin classAbstractComponentTuplizer- 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- Overrides:
isMethodOfin classAbstractComponentTuplizer- 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- Overrides:
setParentin classAbstractComponentTuplizer- 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.
-
buildInstantiator
- Specified by:
buildInstantiatorin classAbstractComponentTuplizer
-
buildGetter
- Specified by:
buildGetterin classAbstractComponentTuplizer
-
buildSetter
- Specified by:
buildSetterin classAbstractComponentTuplizer
-