public abstract class PropertySerializabilityEvaluatorBase extends Object implements PropertySerializabilityEvaluator
determinePropertyType(Object)
, which should suffice for most
use cases.Modifier and Type | Field and Description |
---|---|
protected PropertySerializerTrie |
serializableProperties |
Constructor and Description |
---|
PropertySerializabilityEvaluatorBase() |
Modifier and Type | Method and Description |
---|---|
PropertyType |
determinePropertyType(Object propertyValue)
Determines the type of a object
|
protected boolean |
evaluateCompleteMatch(SerializationState state,
Object containingObject,
PropertySerializabilityMetadata metadata,
String childPropertyName,
Object childPropertyValue)
Evaluates whether a property is serializable when all properties in the serialization state have been matched up with the properties
defined in the data dictionary.
|
protected boolean |
evaluatePartialMatch(SerializationState state,
int lastMatchedStateIndex,
Object containingObject,
PropertySerializabilityMetadata metadata,
String childPropertyName,
Object childPropertyValue)
Evaluates whether a property is serializable when only some of the properties in the serialization state have been matched up with the
serializable properties specified in the data dictionary.
|
void |
initializeEvaluatorForDataObject(Object businessObject) |
void |
initializeEvaluatorForDocument(Document document)
Initializes the evaluator so that calls to
PropertySerializabilityEvaluator.isPropertySerializable(SerializationState, Object, String, Object) and
PropertySerializabilityEvaluator.determinePropertyType(Object) will function properly |
protected boolean |
isPrimitiveObject(Object object)
Whether the object represents a primitive
|
boolean |
isPropertySerializable(SerializationState state,
Object containingObject,
String childPropertyName,
Object childPropertyValue)
Returns whether a child property of a given containing object should be serialized, based on the metadata provided in the data dictionary.
|
protected PropertySerializerTrie serializableProperties
public PropertySerializabilityEvaluatorBase()
public void initializeEvaluatorForDocument(Document document)
PropertySerializabilityEvaluator
PropertySerializabilityEvaluator.isPropertySerializable(SerializationState, Object, String, Object)
and
PropertySerializabilityEvaluator.determinePropertyType(Object)
will function properlyinitializeEvaluatorForDocument
in interface PropertySerializabilityEvaluator
document
- the document instancepublic void initializeEvaluatorForDataObject(Object businessObject)
initializeEvaluatorForDataObject
in interface PropertySerializabilityEvaluator
public PropertyType determinePropertyType(Object propertyValue)
PropertySerializabilityEvaluator
determinePropertyType
in interface PropertySerializabilityEvaluator
PropertySerializabilityEvaluator.determinePropertyType(java.lang.Object)
public boolean isPropertySerializable(SerializationState state, Object containingObject, String childPropertyName, Object childPropertyValue)
isPropertySerializable
in interface PropertySerializabilityEvaluator
state
- Information about the properties that have been serialized so farcontainingObject
- The object containing the reference to childPropertyValuechildPropertyName
- The name property to determine whether to serialize, relative to containingObject (i.e. not a nested attribute)childPropertyValue
- If serializable, this property would be serialized by the serializer service.PropertySerializabilityEvaluator.isPropertySerializable(SerializationState, Object, String, Object)
protected boolean evaluateCompleteMatch(SerializationState state, Object containingObject, PropertySerializabilityMetadata metadata, String childPropertyName, Object childPropertyValue)
state
- containingObject
- metadata
- childPropertyName
- childPropertyValue
- protected boolean evaluatePartialMatch(SerializationState state, int lastMatchedStateIndex, Object containingObject, PropertySerializabilityMetadata metadata, String childPropertyName, Object childPropertyValue)
state
- lastMatchedStateIndex
- the index of the state parameter that represents the last matched propertycontainingObject
- the object containing the child propertymetadata
- metadata of the last matched propertychildPropertyName
- the name of the child property that we are going to determine whether it is serializablechildPropertyValue
- the value of the child property that we are going to determine whether it is serializableprotected boolean isPrimitiveObject(Object object)
object
- Copyright © 2005–2014 The Kuali Foundation. All rights reserved.