Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   * See the file LICENSE for redistribution information.
   * Copyright (c) 2002, 2013 Oracle and/or its affiliates.  All rights reserved.
  package com.sleepycat.persist.impl;
 import java.util.Map;
Catalog operation interface used by format classes.

Mark Hayes
See also:
 interface Catalog {
      * The catalog version is returned by getInitVersion and is the version of
      * the serialized format classes loaded from the stored catalog.  When a
      * field is added, for example, the version can be checked to determine how
      * to initialize the field in Format.initialize.
      * -1: The version is considered to be -1 when reading the beta version of
      * the catalog data.  At this point no version field was stored, but we can
      * distinguish the beta stored format.  See PersistCatalog.
      * 0: The first released version of the catalog data, after beta.  At this
      * point no version field was stored, but it is initialized to zero when
      * the PersistCatalog.Data object is de-serialized.
      * 1: Add the ComplexFormat.ConvertFieldReader.oldFieldNum field. [#15797]
     static final int BETA_VERSION = -1;
     static final int CURRENT_VERSION = 1;

See above.
     int getInitVersion(Format formatboolean forReader);

Returns a format for a given ID, or throws an exception. This method is used when reading an object from the byte array format.

expectStored is true if reading a record from a database, and therefore the format ID is expected to be stored also. If the format ID is not stored, a RefreshException is thrown.
java.lang.IllegalStateException if the formatId does not correspond to a persistent class. This is an internal consistency error.
     Format getFormat(int formatIdboolean expectStored)
         throws RefreshException;

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.

checkEntitySubclassIndexes is true if we're expecting this format to be an entity subclass and therefore subclass secondary indexes should be opened.
java.lang.IllegalArgumentException if the class is not persistent. This is a user error.
     Format getFormat(Class clsboolean checkEntitySubclassIndexes)
         throws RefreshException;

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

     Format createFormat(String clsNameMap<StringFormatnewFormats);

     Format createFormat(Class typeMap<StringFormatnewFormats);

     boolean isRawAccess();

        throws RefreshException;

    Class resolveClass(String clsName)
        throws ClassNotFoundException;

    Class resolveKeyClass(String clsName);
New to GrepCode? Check out our FAQ X