GemStone::GemFire::Cache::Generic::IPdxInstanceFactory Interface Reference

Inherited by GemStone::GemFire::Cache::Generic::Internal::PdxInstanceFactoryImpl [private].


Detailed Description

PdxInstanceFactory gives you a way to create PdxInstances. Call the write methods to populate the field data and then call Create to produce an actual instance that contains the data. To create a factory call IRegionService.CreatePdxInstanceFactory. A factory can only create a single instance. To create multiple instances create multiple factories or use IPdxInstance.CreateWriter to create subsequent instances.

Public Member Functions

IPdxInstanceCreate ()
IPdxInstanceFactoryMarkIdentityField (String^ fieldName)
IPdxInstanceFactoryWriteArrayOfByteArrays (String^ fieldName, array< array< Byte >^>^value)
IPdxInstanceFactoryWriteBoolean (String^ fieldName, Boolean value)
IPdxInstanceFactoryWriteBooleanArray (String^ fieldName, array< Boolean >^value)
IPdxInstanceFactoryWriteByte (String^ fieldName, SByte value)
IPdxInstanceFactoryWriteByteArray (String^ fieldName, array< Byte >^value)
IPdxInstanceFactoryWriteChar (String^ fieldName, Char value)
IPdxInstanceFactoryWriteCharArray (String^ fieldName, array< Char >^value)
IPdxInstanceFactoryWriteDate (String^ fieldName, System::DateTime value)
IPdxInstanceFactoryWriteDouble (String^ fieldName, double value)
IPdxInstanceFactoryWriteDoubleArray (String^ fieldName, array< double >^value)
IPdxInstanceFactoryWriteField (String^ fieldName, Object^ fieldValue, Type^ fieldType)
IPdxInstanceFactoryWriteFloat (String^ fieldName, float value)
IPdxInstanceFactoryWriteFloatArray (String^ fieldName, array< float >^value)
IPdxInstanceFactoryWriteInt (String^ fieldName, Int32 value)
IPdxInstanceFactoryWriteIntArray (String^ fieldName, array< Int32 >^value)
IPdxInstanceFactoryWriteLong (String^ fieldName, Int64 value)
IPdxInstanceFactoryWriteLongArray (String^ fieldName, array< Int64 >^value)
IPdxInstanceFactoryWriteObject (String^ fieldName, Object^ value)
IPdxInstanceFactoryWriteObjectArray (String^ fieldName, System::Collections::Generic::List< Object^ >^value)
IPdxInstanceFactoryWriteShort (String^ fieldName, Int16 value)
IPdxInstanceFactoryWriteShortArray (String^ fieldName, array< Int16 >^value)
IPdxInstanceFactoryWriteString (String^ fieldName, String^ value)
IPdxInstanceFactoryWriteStringArray (String^ fieldName, array< String^ >^value)

Member Function Documentation

IPdxInstance ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::Create (  ) 

Create a IPdxInstance . The instance will contain any data written to this factory using the write methods.

Returns:
the created instance
Exceptions:
IllegalStateException if called more than once

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::MarkIdentityField ( String^   fieldName  ) 

Indicate that the named field should be included in hashCode and equals checks of this object on a server that is accessing IPdxInstance or when a client executes a query on a server.

The fields that are marked as identity fields are used to generate the hashCode and equals methods of PdxInstance. Because of this, the identity fields should themselves either be primitives, or implement hashCode and equals.

If no fields are set as identity fields, then all fields will be used in hashCode and equals checks.

The identity fields should make marked after they are written using a write/// method.

Parameters:
fieldName the name of the field to mark as an identity field.
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has not already been written.

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteArrayOfByteArrays ( String^   fieldName,
array< array< Byte >^>^  value 
)

Writes the named field with the given value to the serialized form. The fields type is byte[][].

Java byte[][] is mapped to .NET System.Byte[][].

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteBoolean ( String^   fieldName,
Boolean  value 
)

Writes the named field with the given value to the serialized form. The fields type is boolean.

Java boolean is mapped to .NET System.Boolean.

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteBooleanArray ( String^   fieldName,
array< Boolean >^  value 
)

Writes the named field with the given value to the serialized form. The fields type is boolean[].

Java boolean[] is mapped to .NET System.Boolean[].

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteByte ( String^   fieldName,
SByte  value 
)

Writes the named field with the given value to the serialized form. The fields type is sbyte.

Java byte is mapped to .NET System.SByte.

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteByteArray ( String^   fieldName,
array< Byte >^  value 
)

Writes the named field with the given value to the serialized form. The fields type is byte[].

Java byte[] is mapped to .NET System.Byte[].

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteChar ( String^   fieldName,
Char  value 
)

Writes the named field with the given value to the serialized form. The fields type is char.

Java char is mapped to .NET System.Char.

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteCharArray ( String^   fieldName,
array< Char >^  value 
)

Writes the named field with the given value to the serialized form. The fields type is char[].

Java char[] is mapped to .NET System.Char[].

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteDate ( String^   fieldName,
System::DateTime  value 
)

Writes the named field with the given value to the serialized form. The fields type is Date.

Java Date is mapped to .NET System.DateTime.

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteDouble ( String^   fieldName,
double  value 
)

Writes the named field with the given value to the serialized form. The fields type is double.

Java double is mapped to .NET System.Double.

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteDoubleArray ( String^   fieldName,
array< double >^  value 
)

Writes the named field with the given value to the serialized form. The fields type is double[].

Java double[] is mapped to .NET System.Double[].

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteField ( String^   fieldName,
Object^   fieldValue,
Type^   fieldType 
)

Writes the named field with the given value and type to the serialized form. This method uses the fieldType to determine which writeXXX method it should call. If it can not find a specific match to a writeXXX method it will call WriteObject. This method may serialize objects that are not portable to non-java languages.

The fieldTypes maps to a specific method.

Parameters:
fieldName the name of the field to write

Parameters:
fieldValue the value of the field to write; this parameter's class must extend the fieldType
fieldType the type of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteFloat ( String^   fieldName,
float  value 
)

Writes the named field with the given value to the serialized form. The fields type is float.

Java float is mapped to .NET System.Single(float).

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteFloatArray ( String^   fieldName,
array< float >^  value 
)

Writes the named field with the given value to the serialized form. The fields type is float[].

Java float[] is mapped to .NET System.Single[] or float[].

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteInt ( String^   fieldName,
Int32  value 
)

Writes the named field with the given value to the serialized form. The fields type is int.

Java int is mapped to .NET System.Int32.

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteIntArray ( String^   fieldName,
array< Int32 >^  value 
)

Writes the named field with the given value to the serialized form. The fields type is int[].

Java int[] is mapped to .NET System.Int32[].

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteLong ( String^   fieldName,
Int64  value 
)

Writes the named field with the given value to the serialized form. The fields type is long.

Java long is mapped to .NET System.Int64.

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteLongArray ( String^   fieldName,
array< Int64 >^  value 
)

Writes the named field with the given value to the serialized form. The fields type is long[].

Java long[] is mapped to .NET System.Int64[].

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteObject ( String^   fieldName,
Object^   value 
)

Writes the named field with the given value to the serialized form. The fields type is Object.

It is best to use one of the other writeXXX methods if your field type will always be XXX. This method allows the field value to be anything that is an instance of Object. This gives you more flexibility but more space is used to store the serialized field.

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteObjectArray ( String^   fieldName,
System::Collections::Generic::List< Object^ >^  value 
)

Writes the named field with the given value to the serialized form. The fields type is Object[]. Java Object[] is mapped to .NET System.Collections.Generic.List<Object>.

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteShort ( String^   fieldName,
Int16  value 
)

Writes the named field with the given value to the serialized form. The fields type is short.

Java short is mapped to .NET System.Int16.

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteShortArray ( String^   fieldName,
array< Int16 >^  value 
)

Writes the named field with the given value to the serialized form. The fields type is short[].

Java short[] is mapped to .NET System.Int16[].

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteString ( String^   fieldName,
String^   value 
)

Writes the named field with the given value to the serialized form. The fields type is String.

Java String is mapped to .NET System.String.

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written

IPdxInstanceFactory ^ GemStone::GemFire::Cache::Generic::IPdxInstanceFactory::WriteStringArray ( String^   fieldName,
array< String^ >^  value 
)

Writes the named field with the given value to the serialized form. The fields type is String[].

Java String[] is mapped to .NET System.String[].

Parameters:
fieldName the name of the field to write
value the value of the field to write
Returns:
this PdxInstanceFactory
Exceptions:
IllegalStateException if the named field has already been written


GemFire C++ Cache .NET API Documentation