|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.persistence.meta.MetamodelImpl
public class MetamodelImpl
Adapts JPA Metamodel to OpenJPA meta-data repository.
Constructor Summary | |
---|---|
MetamodelImpl(MetaDataRepository repos)
Constructs a model with the current content of the supplied non-null repository. |
Method Summary | ||
---|---|---|
(package private) static PluralAttribute.CollectionType |
categorizeCollection(Class<?> cls)
|
|
Class |
classForName(String name,
String[] imports)
Resolve the type represented by the given class name. |
|
|
embeddable(Class<X> clazz)
Return the metamodel embeddable type representing the embeddable class. |
|
|
entity(Class<X> clazz)
Return the metamodel entity type representing the entity. |
|
AggregateListener |
getAggregateListener(String tag)
Return the function listener for the given tag, or null if none. |
|
OpenJPAConfiguration |
getConfiguration()
Return the OpenJPA configuration. |
|
Set<EmbeddableType<?>> |
getEmbeddables()
Return the metamodel embeddable types. |
|
Set<EntityType<?>> |
getEntities()
Return the metamodel entity types. |
|
FilterListener |
getFilterListener(String tag)
Return the filter listener for the given tag, or null if none. |
|
Set<ManagedType<?>> |
getManagedTypes()
Return the metamodel managed types. |
|
(package private) ParameterizedType |
getParameterziedType(Field mf)
Gets the parameterized type of the given field after validating. |
|
static Type.PersistenceType |
getPersistenceType(ClassMetaData meta)
|
|
QueryContext |
getQueryContext()
The QueryContext for which this resolver was created |
|
MetaDataRepository |
getRepository()
|
|
|
getType(Class<X> cls)
Return the type representing the basic, entity, mapped superclass, or embeddable class. |
|
|
managedType(Class<X> clazz)
Return the metamodel managed type representing the entity, mapped superclass, or embeddable class. |
|
|
populate(AbstractManagedType<X> type)
Populate the static fields of the canonical type. |
|
(package private) String |
toTypeName(Type type)
Pretty prints a Type. |
|
|
unmodifiableSet(Collection<T> coll)
|
|
(package private) void |
validate(Field metaField,
FieldMetaData fmd)
Validates the given field of the meta class matches the given FieldMetaData and |
|
(package private)
|
validate(Field mField,
Members.Member<X,Y> member)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetamodelImpl(MetaDataRepository repos)
Method Detail |
---|
public MetaDataRepository getRepository()
public <X> EmbeddableType<X> embeddable(Class<X> clazz)
embeddable
in interface Metamodel
cls
- the type of the represented embeddable class
IllegalArgumentException
- if not an embeddable classpublic <X> EntityType<X> entity(Class<X> clazz)
entity
in interface Metamodel
cls
- the type of the represented entity
IllegalArgumentException
- if not an entitypublic Set<EmbeddableType<?>> getEmbeddables()
getEmbeddables
in interface Metamodel
public Set<EntityType<?>> getEntities()
getEntities
in interface Metamodel
public Set<ManagedType<?>> getManagedTypes()
getManagedTypes
in interface Metamodel
public <X> ManagedType<X> managedType(Class<X> clazz)
managedType
in interface Metamodel
cls
- the type of the represented managed class
IllegalArgumentException
- if not a managed classpublic <X> Type<X> getType(Class<X> cls)
cls
- the type of the represented managed class
IllegalArgumentException
- if not a managed classpublic static Type.PersistenceType getPersistenceType(ClassMetaData meta)
public <T> Set<T> unmodifiableSet(Collection<T> coll)
static PluralAttribute.CollectionType categorizeCollection(Class<?> cls)
public <X> void populate(AbstractManagedType<X> type)
ParameterizedType getParameterziedType(Field mf)
String toTypeName(Type type)
void validate(Field metaField, FieldMetaData fmd)
X
- Y
- mField
- member
- <X,Y> void validate(Field mField, Members.Member<X,Y> member)
public Class classForName(String name, String[] imports)
Resolver
classForName
in interface Resolver
public AggregateListener getAggregateListener(String tag)
Resolver
getAggregateListener
in interface Resolver
public OpenJPAConfiguration getConfiguration()
Resolver
getConfiguration
in interface Resolver
public FilterListener getFilterListener(String tag)
Resolver
getFilterListener
in interface Resolver
public QueryContext getQueryContext()
Resolver
QueryContext
for which this resolver was created
getQueryContext
in interface Resolver
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |