Apache Geode Native .NET Reference 1.15.0
|
#include <ReflectionBasedAutoSerializer.hpp>
Inherits Apache::Geode::Client::IPdxSerializer.
Public Member Functions | |
virtual Object ^ | CreateObject (String^ className, Cache^ cache) |
Overirde this method to create default instance of className
Otherwise it will create instance using zer arg public constructor More... | |
virtual Object ^ | FromData (String^ o, IPdxReader^ reader) |
Deserialize this object. More... | |
virtual String ^ | GetFieldName (FieldInfo^ fi, Type^ type) |
Controls the field name that will be used in pdx for a field being auto serialized. More... | |
virtual FieldType | GetFieldType (FieldInfo^ fi, Type^ type) |
Controls what pdx field type will be used when auto serializing. More... | |
virtual bool | IsFieldIncluded (FieldInfo^ fi, Type^ type) |
Controls what fields of a class will be auto serialized by this serializer. More... | |
virtual bool | IsIdentityField (FieldInfo^ fi, Type^ type) |
Controls what fields of a class that is auto serialized will be marked as pdx identity fields. More... | |
virtual Object ^ | ReadTransform (FieldInfo^ fi, Type^ type, Object^ serializeValue) |
Controls what field value is read during auto deserialization. More... | |
virtual bool | ToData (Object^ o, IPdxWriter^ writer) |
Serializes this object in geode PDX format. More... | |
virtual Object ^ | WriteTransform (FieldInfo^ fi, Type^ type, Object^ originalValue) |
Controls what field value is written during auto serialization. More... | |
This class uses .NET reflection in conjunction with IPdxSerializer to perform automatic serialization of domain objects. The implication is that the domain classes do not need to implement the interface. This implementation will serialize all relevant fields. This will not serialize the fields which has defined attribute NonSerialized. This will not serialize the static, literal and readonly fields.
|
virtual |
Overirde this method to create default instance of
Otherwise it will create instance using zer arg public constructor
className | name of the class to create default instance |
|
virtual |
Deserialize this object.
classname | the classname whose object need to de-serialize |
reader | the IPdxReader stream to use for reading the object data |
Implements Apache::Geode::Client::IPdxSerializer.
|
virtual |
Controls the field name that will be used in pdx for a field being auto serialized.
Override this method to customize the field names that will be generated by auto serialization. It allows you to convert a local, language dependent name, to a more portable name. The returned name is the one that will show up in a IPdxInstance and that one that will need to be used to access the field when doing a query.
The default implementation returns the name obtained from fi
.
This method is only called the first time it sees a new class. The result will be remembered and used the next time the same class is seen.
fi | the field whose name is returned. |
<param name"type"> type the original class being serialized that owns this field.
|
virtual |
Controls what pdx field type will be used when auto serializing.
Override this method to customize what pdx field type will be used for a given domain class field.
The default implementation uses type of field.
This method is only called the first time it sees a new class. The result will be remembered and used the next time the same class is seen.
fi | the field whose pdx field type needs to be determined |
type | the original class being serialized that owns this field. |
|
virtual |
Controls what fields of a class will be auto serialized by this serializer.
Override this method to customize what fields of a class will be auto serialized. The default implementation:
All other fields are included. This method is only called the first time it sees a new class. The result will be remembered and used the next time the same class is seen.
fi | the field being considered for serialization |
type | the original class being serialized that owns this field. |
|
virtual |
Controls what fields of a class that is auto serialized will be marked as pdx identity fields.
Override this method to customize what fields of an auto serialized class will be identity fields. Identity fields are used when a IPdxInstance computes its hash code and checks to see if it is equal to another object.
The default implementation only marks fields that match an "#identity=" pattern as identity fields.
This method is only called the first time it sees a new class. The result will be remembered and used the next time the same class is seen.
fi | the field to test to see if it is an identity field. |
type | the original class being serialized that owns this field. |
|
virtual |
Controls what field value is read during auto deserialization.
Override this method to customize the data that will be read during auto deserialization. This method will only be called if transformFieldValue
returned true.
fi | the field in question |
type | the original class being serialized that owns this field. Note that this field may have been inherited from a super class by this class. |
the value of the field that was serialized for this field.
|
virtual |
Serializes this object in geode PDX format.
o | the object which need to serialize |
writer | the IPdxWriter object to use for serializing the object |
Implements Apache::Geode::Client::IPdxSerializer.
|
virtual |
Controls what field value is written during auto serialization.
Override this method to customize the data that will be written during auto serialization.
fi | the field in question |
type | the original class being serialized that owns this field. |
originalValue | the value of the field that was read from the domain object. |