Class AnnotationMetaEntity
- java.lang.Object
-
- org.hibernate.jpamodelgen.annotation.AnnotationMeta
-
- org.hibernate.jpamodelgen.annotation.AnnotationMetaEntity
-
- All Implemented Interfaces:
ImportContext
,Metamodel
public class AnnotationMetaEntity extends AnnotationMeta
Class used to collect meta information about an annotated type (entity, embeddable or mapped superclass). Also repurposed for any type with "auxiliary" annotations like@NamedQuery
,@FetchProfile
,@Find
, or@HQL
. We do not distinguish these two kinds of thing, since an entity class may@NamedQuery
or@FetchProfile
annotations. Entities may not, however, have methods annotated@Find
or@HQL
, since entity classes are usually concrete classes.
-
-
Constructor Summary
Constructors Constructor Description AnnotationMetaEntity(TypeElement element, Context context, boolean managed)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AnnotationMetaEntity
create(TypeElement element, Context context, boolean lazilyInitialised, boolean managed)
String
generateImports()
Context
getContext()
TypeElement
getElement()
AccessTypeInformation
getEntityAccessTypeInfo()
List<MetaAttribute>
getMembers()
@Nullable String
getMemberType(String entityType, String memberName)
String
getPackageName()
String
getQualifiedName()
String
getSimpleName()
String
importType(String fqcn)
Add fqcn to the import list.protected void
init()
boolean
isImplementation()
boolean
isInjectable()
boolean
isMetaComplete()
void
mergeInMembers(Metamodel other)
String
staticImport(String fqcn, String member)
String
toString()
-
-
-
Constructor Detail
-
AnnotationMetaEntity
public AnnotationMetaEntity(TypeElement element, Context context, boolean managed)
-
-
Method Detail
-
create
public static AnnotationMetaEntity create(TypeElement element, Context context, boolean lazilyInitialised, boolean managed)
-
getEntityAccessTypeInfo
public AccessTypeInformation getEntityAccessTypeInfo()
-
getContext
public final Context getContext()
-
isImplementation
public boolean isImplementation()
-
getSimpleName
public final String getSimpleName()
-
getQualifiedName
public final String getQualifiedName()
-
getPackageName
public final String getPackageName()
-
getMembers
public List<MetaAttribute> getMembers()
-
isMetaComplete
public boolean isMetaComplete()
-
mergeInMembers
public void mergeInMembers(Metamodel other)
-
generateImports
public final String generateImports()
-
importType
public final String importType(String fqcn)
Description copied from interface:ImportContext
Add fqcn to the import list. Returns fqcn as needed in source code. Attempts to handle fqcn with array and generics references.e.g.
java.util.Collection<org.marvel.Hulk>
importsjava.util.Collection
and returnsCollection
org.marvel.Hulk[]
importsorg.marvel.Hulk
and returnsHulk
- Parameters:
fqcn
- Fully qualified class name of the type to import.- Returns:
- import string
-
getElement
public final TypeElement getElement()
-
isInjectable
public boolean isInjectable()
-
init
protected final void init()
-
-