class RecordInput extends TupleInput implements EntityInput
Modifier and Type | Field and Description |
---|---|
(package private) static int |
PRI_KEY_VISITED_OFFSET |
(package private) static java.lang.String |
PROHIBIT_NESTED_REF_MSG |
(package private) static java.lang.Object |
PROHIBIT_REF_OBJECT |
(package private) static int |
PROHIBIT_REF_OFFSET |
(package private) static int |
VISITED_INIT_SIZE |
buf, len, mark, off
Constructor and Description |
---|
RecordInput(Catalog catalog,
boolean rawAccess,
DatabaseEntry priKeyEntry,
int priKeyFormatId,
byte[] buffer,
int offset,
int length)
Creates a new input with a empty/null visited map.
|
Modifier and Type | Method and Description |
---|---|
Catalog |
getCatalog()
Returns the Catalog associated with this input.
|
(package private) KeyLocation |
getKeyLocation(Format fieldFormat)
Called when copying secondary keys, for an input that is positioned on
the secondary key field.
|
boolean |
isRawAccess()
Return whether this input is in raw mode, i.e., whether it is returning
raw instances.
|
int |
readArrayLength()
Called by ObjectArrayFormat and PrimitiveArrayFormat to read the array
length.
|
int |
readEnumConstant(java.lang.String[] names)
Called by EnumFormat to read and return index of the enum constant.
|
java.lang.Object |
readKeyObject(Format format)
Called for a primary key field or a composite key field with a reference
type.
|
java.lang.Object |
readObject()
Called via Accessor to read all fields with reference types, except for
the primary key field and composite key fields (see readKeyObject
below).
|
java.lang.Object |
readStringObject()
Called for a String field, that is not a primary key field or a
composite key field with a reference type.
|
void |
registerEntity(java.lang.Object entity,
int initialOffset)
Registers the top level entity before reading it, to allow nested fields
to reference their parent entity.
|
void |
registerEntityFormat(Format entityFormat)
Registers the entity format before reading it, so that old-format String
fields can be read properly.
|
void |
registerPriKeyObject(java.lang.Object o)
Called via Accessor.readSecKeyFields for a primary key field with a
reference type.
|
void |
registerPriStringKeyObject(java.lang.Object o)
Called via Accessor.readSecKeyFields for a primary String key field.
|
boolean |
setRawAccess(boolean rawAccessParam)
Changes raw mode and returns the original mode, which is normally
restored later.
|
void |
skipField(Format declaredFormat)
Called via PersistKeyCreator to skip fields prior to the secondary key
field.
|
getBigDecimalByteLength, getBigIntegerByteLength, getPackedIntByteLength, getPackedLongByteLength, getSortedBigDecimalByteLength, getSortedPackedIntByteLength, getSortedPackedLongByteLength, getStringByteLength, readBigDecimal, readBigInteger, readBoolean, readByte, readBytes, readBytes, readChar, readChars, readChars, readDouble, readFloat, readInt, readLong, readPackedInt, readPackedLong, readShort, readSortedBigDecimal, readSortedDouble, readSortedFloat, readSortedPackedInt, readSortedPackedLong, readString, readString, readString, readUnsignedByte, readUnsignedInt, readUnsignedShort
available, getBufferBytes, getBufferLength, getBufferOffset, mark, markSupported, read, read, read, readFast, readFast, readFast, reset, skip, skipFast
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
readBigInteger, readBoolean, readByte, readChar, readInt, readLong, readShort, readSortedBigDecimal, readSortedDouble, readSortedFloat, readString
static final int VISITED_INIT_SIZE
static final int PRI_KEY_VISITED_OFFSET
static final int PROHIBIT_REF_OFFSET
static final java.lang.Object PROHIBIT_REF_OBJECT
static final java.lang.String PROHIBIT_NESTED_REF_MSG
RecordInput(Catalog catalog, boolean rawAccess, DatabaseEntry priKeyEntry, int priKeyFormatId, byte[] buffer, int offset, int length)
public Catalog getCatalog()
EntityInput
getCatalog
in interface EntityInput
EntityInput.getCatalog()
public boolean isRawAccess()
EntityInput
isRawAccess
in interface EntityInput
EntityInput.isRawAccess()
public boolean setRawAccess(boolean rawAccessParam)
EntityInput
setRawAccess
in interface EntityInput
EntityInput.setRawAccess(boolean)
public java.lang.Object readObject() throws RefreshException
EntityInput
readObject
in interface EntityInput
RefreshException
EntityInput.readObject()
public java.lang.Object readKeyObject(Format format) throws RefreshException
EntityInput
For such key fields, no formatId is present nor can the object already be present in the visited object set.
readKeyObject
in interface EntityInput
RefreshException
EntityInput.readKeyObject(com.sleepycat.persist.impl.Format)
public java.lang.Object readStringObject() throws RefreshException
EntityInput
For the new String format, no formatId is present nor can the object already be present in the visited object set. For the old String format, this method simply calls readObject for compatibility.
readStringObject
in interface EntityInput
RefreshException
EntityInput.readStringObject()
KeyLocation getKeyLocation(Format fieldFormat) throws RefreshException
RefreshException
public void registerPriKeyObject(java.lang.Object o)
EntityInput
registerPriKeyObject
in interface EntityInput
EntityInput.registerPriKeyObject(java.lang.Object)
public void registerPriStringKeyObject(java.lang.Object o)
EntityInput
registerPriStringKeyObject
in interface EntityInput
EntityInput.registerPriKeyObject(java.lang.Object)
public void registerEntity(java.lang.Object entity, int initialOffset)
public void registerEntityFormat(Format entityFormat)
public void skipField(Format declaredFormat) throws RefreshException
EntityInput
skipField
in interface EntityInput
RefreshException
EntityInput.skipField(com.sleepycat.persist.impl.Format)
public int readArrayLength()
EntityInput
readArrayLength
in interface EntityInput
public int readEnumConstant(java.lang.String[] names)
EntityInput
readEnumConstant
in interface EntityInput
Copyright (c) 2004-2012 Oracle. All rights reserved.