Spring Boot for VMware GemFire
Package org.springframework.geode.pdx
Class ObjectPdxInstanceAdapter
java.lang.Object
org.springframework.geode.pdx.ObjectPdxInstanceAdapter
- All Implemented Interfaces:
Serializable,org.apache.geode.cache.Document,org.apache.geode.pdx.PdxInstance
- Since:
- 1.3.0
- See Also:
-
PropertyDescriptorFieldPdxInstanceWritablePdxInstanceBeanWrapperPropertyAccessorPropertyAccessorFactory- Serialized Form
-
Field Summary
FieldsFields inherited from interface org.apache.geode.cache.Document
FIELD_NOT_FOUND -
Constructor Summary
ConstructorsConstructorDescriptionObjectPdxInstanceAdapter(Object target) Constructs a new instance ofObjectPdxInstanceAdapterinitialized with the givenObject. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.geode.pdx.WritablePdxInstancestatic ObjectPdxInstanceAdapterFactory method used to construct a new instance of theObjectPdxInstanceAdapterfrom the given targetObject.protected org.springframework.beans.BeanWrapperReturns theClass.getName()of the underlying, targetObject.Returns thevaluefor thepropertyidentified by the givenfield nameon the underlying, targetObject.Returns the targetObjectbeing adapted by thisPdxInstance.booleanbooleanDetermines whether thisPdxInstancecan be deserialized back into anObject.booleanisEnum()booleanisIdentityField(String fieldName) Determines whether the givenfield nameis an identifier for thisPdxInstance.static Objectunwrap(org.apache.geode.pdx.PdxInstance pdxInstance) Null-safe factory method used to unwrap the givenPdxInstance, returning the underlying, targetObjectupon which thisPdxInstanceis based.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.geode.cache.Document
foreach, getAndCheckFieldMethods inherited from interface org.apache.geode.pdx.PdxInstance
equals, hashCode, toString
-
Field Details
-
CLASS_PROPERTY_NAME
- See Also:
-
ID_PROPERTY_NAME
- See Also:
-
-
Constructor Details
-
ObjectPdxInstanceAdapter
Constructs a new instance ofObjectPdxInstanceAdapterinitialized with the givenObject.- Parameters:
target-Objectto adapt as aPdxInstance; must not be null.- Throws:
IllegalArgumentException- ifObjectis null.- See Also:
-
-
Method Details
-
from
Factory method used to construct a new instance of theObjectPdxInstanceAdapterfrom the given targetObject.- Parameters:
target-Objectto adapt as aPdxInstance; must not be null.- Returns:
- a new instance of
ObjectPdxInstanceAdapter. - Throws:
IllegalArgumentException- ifObjectis null.- See Also:
-
unwrap
Null-safe factory method used to unwrap the givenPdxInstance, returning the underlying, targetObjectupon which thisPdxInstanceis based.- Parameters:
pdxInstance-PdxInstanceto unwrap.- Returns:
- the underlying, target
Objectfrom the givenPdxInstance. - See Also:
-
PdxInstance
-
getBeanWrapper
@NonNull protected org.springframework.beans.BeanWrapper getBeanWrapper()Returns aBeanWrapperwrapping the targetObjectin order to access theObjectas a Java bean using JavaBeans conventions.- Returns:
- a
BeanWrapperfor the targetObject; never null. - See Also:
-
BeanWrapper
-
getClassName
Returns theClass.getName()of the underlying, targetObject.- Specified by:
getClassNamein interfaceorg.apache.geode.pdx.PdxInstance- Returns:
- the
Class.getName()of the underlying, targetObject. - See Also:
-
isDeserializable
public boolean isDeserializable()Determines whether thisPdxInstancecan be deserialized back into anObject. This method effectively returns true since thisPdxInstanceimplementation is an adapter for an underlying, targetObjectin the first place.- Specified by:
isDeserializablein interfaceorg.apache.geode.pdx.PdxInstance- Returns:
- a boolean value indicating whether this
PdxInstancecan be deserialized back into anObject. - See Also:
-
isEnum
public boolean isEnum()- Specified by:
isEnumin interfaceorg.apache.geode.pdx.PdxInstance- Returns:
- a boolean value indicating whether the underlying, target
Objectis anenumerated valuetype. - See Also:
-
getField
Returns thevaluefor thepropertyidentified by the givenfield nameon the underlying, targetObject.- Specified by:
getFieldin interfaceorg.apache.geode.cache.Document- Specified by:
getFieldin interfaceorg.apache.geode.pdx.PdxInstance- Parameters:
fieldName-Stringcontaining the name of the field to get thevaluefor.- Returns:
- the
valuefor thepropertyidentified by the givenfield nameon the underlying, targetObject. - See Also:
-
PropertyAccessor.getPropertyValue(String)getBeanWrapper()
-
getFieldNames
- Specified by:
getFieldNamesin interfaceorg.apache.geode.cache.Document- Returns:
- a
Listoffield names/propertiesserialized in the PDX bytes for the underlying, targetObject. - See Also:
-
BeanWrapper.getPropertyDescriptors()PropertyDescriptorgetBeanWrapper()
-
isIdentityField
Determines whether the givenfield nameis an identifier for thisPdxInstance.- Specified by:
isIdentityFieldin interfaceorg.apache.geode.pdx.PdxInstance- Parameters:
fieldName-Stringcontaining the name of the field to evaluate.- Returns:
- a boolean value indicating whether the given
field nameis an identifier for thisPdxInstance. - See Also:
-
resolveIdentityFieldNameFromProperty(BeanWrapper)
-
getObject
Returns the targetObjectbeing adapted by thisPdxInstance. -
createWriter
public org.apache.geode.pdx.WritablePdxInstance createWriter()- Specified by:
createWriterin interfaceorg.apache.geode.pdx.PdxInstance
-
hasField
- Specified by:
hasFieldin interfaceorg.apache.geode.cache.Document- Parameters:
fieldName-Stringcontaining the name of the field to match against apropertyfrom the underlying, targetObject.- Returns:
- a boolean value that determines whether the given
field nameis apropertyon the underlying, targetObject. - See Also:
-