com.sleepycat.persist.impl
Class RawAbstractInput

java.lang.Object
  extended by com.sleepycat.persist.impl.AbstractInput
      extended by com.sleepycat.persist.impl.RawAbstractInput
All Implemented Interfaces:
EntityInput
Direct Known Subclasses:
RawArrayInput, RawComplexInput, RawSingleInput

abstract class RawAbstractInput
extends AbstractInput

Base class for EntityInput implementations that type-check RawObject instances and convert them to regular persistent objects, via the Format.convertRawObject method. The subclass implements readNext which should call checkAndConvert before returning the final value.

Author:
Mark Hayes

Field Summary
 
Fields inherited from class com.sleepycat.persist.impl.AbstractInput
catalog, rawAccess
 
Constructor Summary
RawAbstractInput(Catalog catalog, boolean rawAccess, java.util.IdentityHashMap converted)
           
 
Method Summary
(package private)  java.lang.Object checkAndConvert(java.lang.Object o, Format declaredFormat)
           
(package private) static Format checkRawType(Catalog catalog, java.lang.Object o, Format declaredFormat)
           
 int readArrayLength()
          Called by ObjectArrayFormat and PrimitiveArrayFormat to read the array length.
 java.math.BigInteger readBigInteger()
           
 boolean readBoolean()
           
 byte readByte()
           
 char readChar()
           
 int readEnumConstant(java.lang.String[] names)
          Called by EnumFormat to read and return index of the enum constant.
 int readInt()
           
 java.lang.Object readKeyObject(Format format)
          Called for a primary key field or a composite key field with a reference type.
 long readLong()
           
(package private) abstract  java.lang.Object readNext()
           
 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).
 short readShort()
           
 double readSortedDouble()
           
 float readSortedFloat()
           
 java.lang.String readString()
           
 void registerPriKeyObject(java.lang.Object o)
          Called via Accessor.readSecKeyFields for a primary key field with a reference type.
 void skipField(Format declaredFormat)
          Called via PersistKeyCreator to skip fields prior to the secondary key field.
 
Methods inherited from class com.sleepycat.persist.impl.AbstractInput
getCatalog, isRawAccess, setRawAccess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RawAbstractInput

RawAbstractInput(Catalog catalog,
                 boolean rawAccess,
                 java.util.IdentityHashMap converted)
Method Detail

readObject

public java.lang.Object readObject()
Description copied from interface: EntityInput
Called via Accessor to read all fields with reference types, except for the primary key field and composite key fields (see readKeyObject below).


readKeyObject

public java.lang.Object readKeyObject(Format format)
Description copied from interface: EntityInput
Called for a primary key field or a composite key field with a reference type.

For such key fields, no formatId is present nor can the object already be present in the visited object set.


registerPriKeyObject

public void registerPriKeyObject(java.lang.Object o)
Description copied from interface: EntityInput
Called via Accessor.readSecKeyFields for a primary key field with a reference type. This method must be called before reading any other fields.


readArrayLength

public int readArrayLength()
Description copied from interface: EntityInput
Called by ObjectArrayFormat and PrimitiveArrayFormat to read the array length.


readEnumConstant

public int readEnumConstant(java.lang.String[] names)
Description copied from interface: EntityInput
Called by EnumFormat to read and return index of the enum constant.


skipField

public void skipField(Format declaredFormat)
Description copied from interface: EntityInput
Called via PersistKeyCreator to skip fields prior to the secondary key field. Also called during class evolution so skip deleted fields.


readNext

abstract java.lang.Object readNext()

checkAndConvert

java.lang.Object checkAndConvert(java.lang.Object o,
                                 Format declaredFormat)

checkRawType

static Format checkRawType(Catalog catalog,
                           java.lang.Object o,
                           Format declaredFormat)

readString

public java.lang.String readString()

readChar

public char readChar()

readBoolean

public boolean readBoolean()

readByte

public byte readByte()

readShort

public short readShort()

readInt

public int readInt()

readLong

public long readLong()

readSortedFloat

public float readSortedFloat()

readSortedDouble

public double readSortedDouble()

readBigInteger

public java.math.BigInteger readBigInteger()


Copyright 2004,2008 Oracle. All rights reserved.