com.sleepycat.persist.impl
Class EntityOutput
java.lang.Object
java.io.OutputStream
com.sleepycat.util.FastOutputStream
com.sleepycat.bind.tuple.TupleOutput
com.sleepycat.persist.impl.EntityOutput
- All Implemented Interfaces:
- Closeable, Flushable
public class EntityOutput
- extends TupleOutput
Used for writing object fields.
Although this class extends TupleOutput, not all TupleOutput methods
should be called. See Format for which methods should be called. In
particular, Strings should be passed to writeObject(java.lang.Object, com.sleepycat.persist.impl.Format)
in this
class.
- Author:
- Mark Hayes
Constructor Summary |
EntityOutput(Catalog catalog,
boolean rawAccess)
Creates a new output with an empty/null VisitedObjects set. |
Method Summary |
void |
registerPriKeyObject(Object o)
Called via Accessor.writeSecKeyFields for a primary key field with a
reference type. |
void |
writeKeyObject(Object o,
Format fieldFormat)
Called for a primary key field or composite key field with a reference
type. |
void |
writeObject(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). |
Methods inherited from class com.sleepycat.bind.tuple.TupleOutput |
writeBoolean, writeByte, writeBytes, writeBytes, writeChar, writeChars, writeChars, writeDouble, writeFloat, writeInt, writeLong, writePackedInt, writeShort, writeSortedDouble, writeSortedFloat, writeString, writeString, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort |
Methods inherited from class com.sleepycat.util.FastOutputStream |
addSize, getBufferBytes, getBufferLength, getBufferOffset, makeSpace, reset, size, toByteArray, toString, toString, write, write, write, writeFast, writeFast, writeFast, writeTo |
PRI_KEY_VISITED_OFFSET
static final int PRI_KEY_VISITED_OFFSET
- See Also:
- Constant Field Values
EntityOutput
EntityOutput(Catalog catalog,
boolean rawAccess)
- Creates a new output with an empty/null VisitedObjects set.
writeObject
public void writeObject(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
public void writeKeyObject(Object o,
Format fieldFormat)
- Called for a primary key field or composite key field with a reference
type.
registerPriKeyObject
public void registerPriKeyObject(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.
Copyright 2004-2006 Sleepycat, Inc. All Rights Reserved.