Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 3.3.69
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sleepycat.persist.model
Class AnnotationModel

    java.lang.Object
      com.sleepycat.persist.model.EntityModel
          com.sleepycat.persist.model.AnnotationModel

    public class AnnotationModel

extends EntityModel

The default annotation-based entity model. An `AnnotationModel` is based on annotations that are specified for entity classes and their key fields.

`AnnotationModel` objects are thread-safe. Multiple threads may safely call the methods of a shared `AnnotationModel` object.

The set of persistent classes in the annotation model is the set of all classes with the `Persistent` or `Entity` annotation.

The annotations used to define persistent classes are: `Entity`, `Persistent`, `PrimaryKey`, `SecondaryKey` and `KeyField`. A good starting point is `Entity`.

Author:
  Mark Hayes

Constructor Summary
`AnnotationModel()` Constructs a model for annotated entity classes.

Method Summary
`ClassMetadata` | `getClassMetadata(String className)` Returns the metadata for a given persistent class name, including proxy classes and entity classes.
`EntityMetadata` | `getEntityMetadata(String className)` Returns the metadata for a given entity class name.
`Set<String>` | `getKnownClasses()` Returns the names of all known persistent classes.

Methods inherited from class com.sleepycat.persist.model.EntityModel
`classForName, convertRawObject, getAllRawTypeVersions, getRawType, getRawTypeVersion, isOpen, registerClass`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AnnotationModel

    public AnnotationModel()

  Constructs a model for annotated entity classes.

Method Detail

### getKnownClasses

    public Set<String> getKnownClasses()

  Description copied from class: `EntityModel`
  Returns the names of all known persistent classes. A type becomes known when an instance of the type is stored for the first time or metadata or type information is queried for a specific class name.

  Specified by:
    `getKnownClasses` in class `EntityModel`
  Returns:
    an unmodifiable set of class names.

### getEntityMetadata

    public EntityMetadata getEntityMetadata(String className)

  Description copied from class: `EntityModel`
  Returns the metadata for a given entity class name.

  Specified by:
    `getEntityMetadata` in class `EntityModel`
  Returns:
    the metadata or null if the class is not an entity class or does not exist.

### getClassMetadata

    public ClassMetadata getClassMetadata(String className)

  Description copied from class: `EntityModel`
  Returns the metadata for a given persistent class name, including proxy classes and entity classes.

  Specified by:
    `getClassMetadata` in class `EntityModel`
  Returns:
    the metadata or null if the class is not persistent or does not exist.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 3.3.69
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2004,2008 Oracle. All rights reserved.