Package com.sleepycat.persist.model
Class EntityMetadata
java.lang.Object
com.sleepycat.persist.model.EntityMetadata
- All Implemented Interfaces:
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:
-
Constructor Summary
ConstructorsConstructorDescriptionEntityMetadata(String className, PrimaryKeyMetadata primaryKey, Map<String, SecondaryKeyMetadata> secondaryKeys) Used by anEntityModelto construct entity metadata. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the name of the entity class.Returns the primary key metadata for this entity.Returns an unmodifiable map of key name to secondary key metadata, or an empty map if no secondary keys are defined for this entity.inthashCode()
-
Constructor Details
-
EntityMetadata
public EntityMetadata(String className, PrimaryKeyMetadata primaryKey, Map<String, SecondaryKeyMetadata> secondaryKeys) Used by anEntityModelto construct entity metadata.
-
-
Method Details
-
getClassName
Returns the name of the entity class. -
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 thePrimaryKeyannotation. -
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 usingSecondaryKeyannotations. -
equals
-
hashCode
public int hashCode()
-