public class AnnotationModel extends EntityModel
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.
| Constructor and Description |
|---|
AnnotationModel()
Constructs a model for annotated entity classes.
|
| Modifier and Type | Method and Description |
|---|---|
ClassMetadata |
getClassMetadata(java.lang.String className)
Returns the metadata for a given persistent class name, including proxy
classes and entity classes.
|
EntityMetadata |
getEntityMetadata(java.lang.String className)
Returns the metadata for a given entity class name.
|
java.util.Set<java.lang.String> |
getKnownClasses()
Returns the names of all known persistent classes.
|
java.util.Set<java.lang.String> |
getKnownSpecialClasses()
Returns the names of all known persistent enum and array classes that
may be used to store persistent data.
|
classForName, convertRawObject, getAllRawTypes, getAllRawTypeVersions, getRawType, getRawTypeVersion, isOpen, registerClass, resolveClass, setCatalogpublic AnnotationModel()
public java.util.Set<java.lang.String> getKnownClasses()
EntityModelgetKnownClasses in class EntityModelpublic java.util.Set<java.lang.String> getKnownSpecialClasses()
EntityModelEntityModel.getKnownClasses(), which does not return enum and array classes
because they have no metadata.getKnownSpecialClasses in class EntityModelpublic EntityMetadata getEntityMetadata(java.lang.String className)
EntityModelgetEntityMetadata in class EntityModelclassName - the class name.public ClassMetadata getClassMetadata(java.lang.String className)
EntityModelgetClassMetadata in class EntityModelclassName - the class name.Copyright (c) 1996, 2016 Oracle and/or its affiliates. All rights reserved.