com.sleepycat.persist.impl
Interface EntityOutput


public interface EntityOutput

Used for writing object fields.

Unlike TupleOutput, Strings should be passed to writeObject(java.lang.Object, com.sleepycat.persist.impl.Format) when using this class.

Note that currently there is only one implementation of EntityOutput: RecordOutput. There is no RawObjectOutput implemention because we currently have no need to convert from persistent objects to RawObject instances. The EntityOutput interface is only for symmetry with EntityInput and in case we need RawObjectOutput in the future.


Method Summary
 void registerPriKeyObject(java.lang.Object o)
          Called via Accessor.writeSecKeyFields for a primary key field with a reference type.
 void writeArrayLength(int length)
          Called by ObjectArrayFormat and PrimitiveArrayFormat to write the array length.
 TupleOutput writeBigInteger(java.math.BigInteger val)
           
 TupleOutput writeBoolean(boolean val)
           
 TupleOutput writeByte(int val)
           
 TupleOutput writeChar(int val)
           
 void writeEnumConstant(java.lang.String[] names, int index)
          Called by EnumFormat to write the given index of the enum constant.
 TupleOutput writeInt(int val)
           
 void writeKeyObject(java.lang.Object o, Format fieldFormat)
          Called for a primary key field or composite key field with a reference type.
 TupleOutput writeLong(long val)
           
 void writeObject(java.lang.Object o, Format fieldFormat)
          Called via Accessor to write all fields with reference types, except for the primary key field and composite key fields (see writeKeyObject below).
 TupleOutput writeShort(int val)
           
 TupleOutput writeSortedDouble(double val)
           
 TupleOutput writeSortedFloat(float val)
           
 TupleOutput writeString(java.lang.String val)
           
 

Method Detail

writeObject

void writeObject(java.lang.Object o,
                 Format fieldFormat)
Called via Accessor to write all fields with reference types, except for the primary key field and composite key fields (see writeKeyObject below).


writeKeyObject

void writeKeyObject(java.lang.Object o,
                    Format fieldFormat)
Called for a primary key field or composite key field with a reference type.


registerPriKeyObject

void registerPriKeyObject(java.lang.Object o)
Called via Accessor.writeSecKeyFields for a primary key field with a reference type. This method must be called before writing any other fields.


writeArrayLength

void writeArrayLength(int length)
Called by ObjectArrayFormat and PrimitiveArrayFormat to write the array length.


writeEnumConstant

void writeEnumConstant(java.lang.String[] names,
                       int index)
Called by EnumFormat to write the given index of the enum constant.


writeString

TupleOutput writeString(java.lang.String val)

writeChar

TupleOutput writeChar(int val)

writeBoolean

TupleOutput writeBoolean(boolean val)

writeByte

TupleOutput writeByte(int val)

writeShort

TupleOutput writeShort(int val)

writeInt

TupleOutput writeInt(int val)

writeLong

TupleOutput writeLong(long val)

writeSortedFloat

TupleOutput writeSortedFloat(float val)

writeSortedDouble

TupleOutput writeSortedDouble(double val)

writeBigInteger

TupleOutput writeBigInteger(java.math.BigInteger val)