Class MetamodelImpl
java.lang.Object
org.apache.openjpa.persistence.meta.MetamodelImpl
- All Implemented Interfaces:
- jakarta.persistence.metamodel.Metamodel,- Resolver
public class MetamodelImpl
extends Object
implements jakarta.persistence.metamodel.Metamodel, Resolver
Adapts JPA Metamodel to OpenJPA meta-data repository.
- Author:
- Pinaki Poddar
- 
Constructor SummaryConstructorsConstructorDescriptionMetamodelImpl(MetaDataRepository repos) Constructs a model with the current content of the supplied non-null repository.
- 
Method SummaryModifier and TypeMethodDescriptionclassForName(String name, String[] imports) Resolve the type represented by the given class name.<X> jakarta.persistence.metamodel.EmbeddableType<X>embeddable(Class<X> clazz) Return the metamodel embeddable type representing the embeddable class.<X> jakarta.persistence.metamodel.EntityType<X>Return the metamodel entity type representing the entity.<X> jakarta.persistence.metamodel.EntityType<X>entityImpl(Class<X> clazz) Return the function listener for the given tag, or null if none.Return the OpenJPA configuration.Set<jakarta.persistence.metamodel.EmbeddableType<?>>Return the metamodel embeddable types.Set<jakarta.persistence.metamodel.EntityType<?>>Return the metamodel entity types.getFilterListener(String tag) Return the filter listener for the given tag, or null if none.Set<jakarta.persistence.metamodel.ManagedType<?>>Return the metamodel managed types.static jakarta.persistence.metamodel.Type.PersistenceTypeTheQueryContextfor which this resolver was created<X> jakarta.persistence.metamodel.Type<X>Return the type representing the basic, entity, mapped superclass, or embeddable class.<X> jakarta.persistence.metamodel.ManagedType<X>managedType(Class<X> clazz) Return the metamodel managed type representing the entity, mapped superclass, or embeddable class.<X> voidpopulate(AbstractManagedType<X> type) Populate the static fields of the canonical type.<T> Set<T>unmodifiableSet(Collection<T> coll) 
- 
Constructor Details- 
MetamodelImplConstructs a model with the current content of the supplied non-null repository.
 
- 
- 
Method Details- 
getRepository
- 
embeddableReturn the metamodel embeddable type representing the embeddable class.- Specified by:
- embeddablein interface- jakarta.persistence.metamodel.Metamodel
- Parameters:
- cls- the type of the represented embeddable class
- Returns:
- the metamodel embeddable type
- Throws:
- IllegalArgumentException- if not an embeddable class
 
- 
entityReturn the metamodel entity type representing the entity.- Specified by:
- entityin interface- jakarta.persistence.metamodel.Metamodel
- Parameters:
- cls- the type of the represented entity
- Returns:
- the metamodel entity type
- Throws:
- IllegalArgumentException- if not an entity
 
- 
entityImpl
- 
getEmbeddablesReturn the metamodel embeddable types.- Specified by:
- getEmbeddablesin interface- jakarta.persistence.metamodel.Metamodel
- Returns:
- the metamodel embeddable types
 
- 
getEntitiesReturn the metamodel entity types.- Specified by:
- getEntitiesin interface- jakarta.persistence.metamodel.Metamodel
- Returns:
- the metamodel entity types
 
- 
getManagedTypesReturn the metamodel managed types.- Specified by:
- getManagedTypesin interface- jakarta.persistence.metamodel.Metamodel
- Returns:
- the metamodel managed types
 
- 
managedTypeReturn the metamodel managed type representing the entity, mapped superclass, or embeddable class.- Specified by:
- managedTypein interface- jakarta.persistence.metamodel.Metamodel
- Parameters:
- cls- the type of the represented managed class
- Returns:
- the metamodel managed type
- Throws:
- IllegalArgumentException- if not a managed class
 
- 
getTypeReturn the type representing the basic, entity, mapped superclass, or embeddable class. This method differs from #type(Class) as it also creates a basic or pesudo type for the given class argument if not already available in this receiver.- Parameters:
- cls- the type of the represented managed class
- Returns:
- the metamodel managed type
- Throws:
- IllegalArgumentException- if not a managed class
 
- 
getPersistenceTypepublic static jakarta.persistence.metamodel.Type.PersistenceType getPersistenceType(ClassMetaData meta) 
- 
unmodifiableSet
- 
populatePopulate the static fields of the canonical type.
- 
classForNameDescription copied from interface:ResolverResolve the type represented by the given class name. This will test the type against the namespace of the Query and the declared imports, and will properly handle primitives and java.lang types as well. Returns null if the name does not match a known type.- Specified by:
- classForNamein interface- Resolver
 
- 
getAggregateListenerDescription copied from interface:ResolverReturn the function listener for the given tag, or null if none.- Specified by:
- getAggregateListenerin interface- Resolver
 
- 
getConfigurationDescription copied from interface:ResolverReturn the OpenJPA configuration.- Specified by:
- getConfigurationin interface- Resolver
 
- 
getFilterListenerDescription copied from interface:ResolverReturn the filter listener for the given tag, or null if none.- Specified by:
- getFilterListenerin interface- Resolver
 
- 
getQueryContextDescription copied from interface:ResolverTheQueryContextfor which this resolver was created- Specified by:
- getQueryContextin interface- Resolver
 
 
-