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

Method Summary
 Format createFormat(java.lang.Class type, 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.
 

Method Detail

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(int), the format will not be created if it is not already known.


createFormat

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


Copyright 2004-2006 Sleepycat, Inc. All Rights Reserved.