接口 Tuplizer
-
- 所有已知子接口:
ComponentTuplizer,EntityTuplizer
- 所有已知实现类:
AbstractComponentTuplizer,AbstractEntityTuplizer,DynamicMapComponentTuplizer,DynamicMapEntityTuplizer,PojoComponentTuplizer,PojoEntityTuplizer
public interface TuplizerA tuplizer defines the contract for things which know how to manage a particular representation of a piece of data, given that representation'sEntityMode(the entity-mode essentially defining which representation). If that given piece of data is thought of as a data structure, then a tuplizer is the thing which knows how to- create such a data structure appropriately
- extract values from and inject values into such a data structure
- create the data structure by calling the POJO's constructor
- extract and inject values through getters/setter, or by direct field access, etc
Elementas the data structure and know how to access the values as either nestedElements or asAttributes.- 作者:
- Steve Ebersole
- 另请参阅:
EntityTuplizer,ComponentTuplizer
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 GettergetGetter(int i)Retrieve the getter for the specified property.ClassgetMappedClass()Return the pojo class managed by this tuplizer.ObjectgetPropertyValue(Object entity, int i)Extract the value of a particular property from the given entity.Object[]getPropertyValues(Object entity)Extract the current values contained on the given entity.Objectinstantiate()Generate a new, empty entity.booleanisInstance(Object object)Is the given object considered an instance of the the entity (accounting for entity-mode) managed by this tuplizer.voidsetPropertyValues(Object entity, Object[] values)Inject the given values into the given entity.
-
-
-
方法详细资料
-
getPropertyValues
Object[] getPropertyValues(Object entity)
Extract the current values contained on the given entity.- 参数:
entity- The entity from which to extract values.- 返回:
- The current property values.
-
setPropertyValues
void setPropertyValues(Object entity, Object[] values)
Inject the given values into the given entity.- 参数:
entity- The entity.values- The values to be injected.
-
getPropertyValue
Object getPropertyValue(Object entity, int i)
Extract the value of a particular property from the given entity.- 参数:
entity- The entity from which to extract the property value.i- The index of the property for which to extract the value.- 返回:
- The current value of the given property on the given entity.
-
instantiate
Object instantiate()
Generate a new, empty entity.- 返回:
- The new, empty entity instance.
-
isInstance
boolean isInstance(Object object)
Is the given object considered an instance of the the entity (accounting for entity-mode) managed by this tuplizer.- 参数:
object- The object to be checked.- 返回:
- True if the object is considered as an instance of this entity within the given mode.
-
getMappedClass
Class getMappedClass()
Return 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...- 返回:
- The persistent class.
-
getGetter
Getter getGetter(int i)
Retrieve the getter for the specified property.- 参数:
i- The property index.- 返回:
- The property getter.
-
-