Berkeley DB
version 4.8.30

com.sleepycat.persist.model
Class EntityMetadata

java.lang.Object
  extended by 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.

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.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Berkeley DB
version 4.8.30

Copyright (c) 1996-2009 Oracle. All rights reserved.