|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.persist.model.ClassMetadata
public class ClassMetadata
The metadata for a persistent class. A persistent class may be specified
with the Entity
or Persistent
annotation.
ClassMetadata
objects are thread-safe. Multiple threads may
safely call the methods of a shared ClassMetadata
object.
This and other metadata classes are classes rather than interfaces to allow adding properties to the model at a future date without causing incompatibilities. Any such property will be given a default value and its use will be optional.
Constructor Summary | |
---|---|
ClassMetadata(java.lang.String className,
int version,
java.lang.String proxiedClassName,
boolean entityClass,
PrimaryKeyMetadata primaryKey,
java.util.Map<java.lang.String,SecondaryKeyMetadata> secondaryKeys,
java.util.List<FieldMetadata> compositeKeyFields)
Used by an EntityModel to construct persistent class metadata. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object other)
|
java.lang.String |
getClassName()
Returns the name of the persistent class. |
java.util.List<FieldMetadata> |
getCompositeKeyFields()
Returns an unmodifiable list of metadata for the fields making up a composite key, or null if this is a not a composite key class. |
PrimaryKeyMetadata |
getPrimaryKey()
Returns the primary key metadata for a key declared in this class, or null if none is declared. |
java.lang.String |
getProxiedClassName()
Returns the class name of the proxied class if this class is a PersistentProxy , or null otherwise. |
java.util.Map<java.lang.String,SecondaryKeyMetadata> |
getSecondaryKeys()
Returns an unmodifiable map of field name to secondary key metadata for all secondary keys declared in this class, or null if no secondary keys are declared in this class. |
int |
getVersion()
Returns the version of this persistent class. |
int |
hashCode()
|
(package private) static int |
hashCode(java.lang.Object o)
|
boolean |
isEntityClass()
Returns whether this class is an entity class. |
(package private) static boolean |
nullOrEqual(java.lang.Object o1,
java.lang.Object o2)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassMetadata(java.lang.String className, int version, java.lang.String proxiedClassName, boolean entityClass, PrimaryKeyMetadata primaryKey, java.util.Map<java.lang.String,SecondaryKeyMetadata> secondaryKeys, java.util.List<FieldMetadata> compositeKeyFields)
EntityModel
to construct persistent class metadata.
Method Detail |
---|
public java.lang.String getClassName()
public int getVersion()
Entity.version()
or Persistent.version()
annotation.
public java.lang.String getProxiedClassName()
PersistentProxy
, or null otherwise.
public boolean isEntityClass()
public PrimaryKeyMetadata getPrimaryKey()
PrimaryKey
annotation.
public java.util.Map<java.lang.String,SecondaryKeyMetadata> getSecondaryKeys()
SecondaryKey
annotations.
public java.util.List<FieldMetadata> getCompositeKeyFields()
KeyField
annotation. When the
composite key class does not implement Comparable
, the order of
the fields is the relative sort order.
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
static boolean nullOrEqual(java.lang.Object o1, java.lang.Object o2)
static int hashCode(java.lang.Object o)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |