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

## com.sleepycat.persist.model
Class EntityMetadata

    java.lang.Object
      com.sleepycat.persist.model.EntityMetadata

All Implemented Interfaces:
  Serializable

    public class EntityMetadata

extends Object
implements Serializable

The metadata for a persistent entity class. An entity class may be specified with the `Entity` annotation.

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

Author:
  Mark Hayes
See Also:
  Serialized Form

Constructor Summary
`EntityMetadata(String className, PrimaryKeyMetadata primaryKey, Map<String,SecondaryKeyMetadata> secondaryKeys)` Used by an `EntityModel` to construct entity metadata.

Method Summary
`boolean` | `equals(Object other)`
`String` | `getClassName()` Returns the name of the entity class.
`PrimaryKeyMetadata` | `getPrimaryKey()` Returns the primary key metadata for this entity.
`Map<String,SecondaryKeyMetadata>` | `getSecondaryKeys()` Returns an unmodifiable map of key name to secondary key metadata, or an empty map if no secondary keys are defined for this entity.

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

Constructor Detail

### EntityMetadata

    public EntityMetadata(String className,
                          PrimaryKeyMetadata primaryKey,
                          Map<String,SecondaryKeyMetadata> secondaryKeys)

  Used by an `EntityModel` to construct entity metadata.

Method Detail

### getClassName

    public String getClassName()

  Returns the name of the entity class.

### getPrimaryKey

    public PrimaryKeyMetadata getPrimaryKey()

  Returns the primary key metadata for this entity. Note that the primary key field may be declared in this class or in a subclass. This metadata may be specified using the `PrimaryKey` annotation.

### getSecondaryKeys

    public Map<String,SecondaryKeyMetadata> getSecondaryKeys()

  Returns an unmodifiable map of key name to secondary key metadata, or an empty map if no secondary keys are defined for this entity. The returned map contains a mapping for each secondary key of this entity, including secondary keys declared in subclasses and superclasses. This metadata may be specified using `SecondaryKey` annotations.

### equals

    public boolean equals(Object other)

  Overrides:
    `equals` in class `Object`

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

Copyright(c) 1996-2006 Oracle Corporation - All rights reserved.