com.sleepycat.persist.impl
Interface Catalog

All Known Implementing Classes:
PersistCatalog, ReadOnlyCatalog, SimpleCatalog

interface Catalog

Catalog operation interface used by format classes.

Author:
Mark Hayes
See Also:
PersistCatalog, SimpleCatalog, ReadOnlyCatalog

Field Summary
static int BETA_VERSION
           
static int CURRENT_VERSION
           
 
Method Summary
 java.lang.Object convertRawObject(RawObject o, java.util.IdentityHashMap converted)
           
 Format createFormat(java.lang.Class type, java.util.Map<java.lang.String,Format> newFormats)
           
 Format createFormat(java.lang.String clsName, java.util.Map<java.lang.String,Format> newFormats)
           
 Format getFormat(java.lang.Class cls)
          Returns a format for a given class, or throws an exception.
 Format getFormat(int formatId)
          Returns a format for a given ID, or throws an exception.
 Format getFormat(java.lang.String className)
          Returns a format by class name.
 int getInitVersion(Format format, boolean forReader)
          See above.
 boolean isRawAccess()
           
 

Field Detail

BETA_VERSION

static final int BETA_VERSION
See Also:
Constant Field Values

CURRENT_VERSION

static final int CURRENT_VERSION
See Also:
Constant Field Values
Method Detail

getInitVersion

int getInitVersion(Format format,
                   boolean forReader)
See above.


getFormat

Format getFormat(int formatId)
Returns a format for a given ID, or throws an exception. This method is used when reading an object from the byte array format.

Throws:
java.lang.IllegalStateException - if the formatId does not correspond to a persistent class. This is an internal consistency error.

getFormat

Format getFormat(java.lang.Class cls)
Returns a format for a given class, or throws an exception. This method is used when writing an object that was passed in by the user.

Throws:
java.lang.IllegalArgumentException - if the class is not persistent. This is a user error.

getFormat

Format getFormat(java.lang.String className)
Returns a format by class name. Unlike getFormat(Class), the format will not be created if it is not already known.


createFormat

Format createFormat(java.lang.String clsName,
                    java.util.Map<java.lang.String,Format> newFormats)
See Also:
PersistCatalog.createFormat(java.lang.String, java.util.Map)

createFormat

Format createFormat(java.lang.Class type,
                    java.util.Map<java.lang.String,Format> newFormats)
See Also:
PersistCatalog.createFormat(java.lang.String, java.util.Map)

isRawAccess

boolean isRawAccess()
See Also:
PersistCatalog.isRawAccess()

convertRawObject

java.lang.Object convertRawObject(RawObject o,
                                  java.util.IdentityHashMap converted)
See Also:
PersistCatalog.convertRawObject(com.sleepycat.persist.raw.RawObject, java.util.IdentityHashMap)


Copyright 2004,2008 Oracle. All rights reserved.