|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) E28847-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
org.eclipse.persistence.jpa.internal.jpql.parser.AnonymousExpressionVisitor
org.eclipse.persistence.jpa.internal.jpql.AbstractVisitor
public abstract class AbstractVisitor
An abstract class that provides helper methods for quick access to the JPQLQueryContext
's methods.
Nested Class Summary | |
---|---|
private static class |
AbstractVisitor.CollectionExpressionVisitor This visitor retrieves the CollectionExpression if it is visited. |
private static class |
AbstractVisitor.ManagedTypeVisitor |
private static class |
AbstractVisitor.NullExpressionVisitor This visitor checks to see if the visited expression is NullExpression . |
Field Summary | |
---|---|
private AbstractVisitor.CollectionExpressionVisitor |
collectionExpressionVisitor This visitor determines whether the visited Expression is the CollectionExpression . |
private AbstractVisitor.ManagedTypeVisitor |
managedTypeVisitor This visitor simply determines what type of IManagedType that was visited. |
private AbstractVisitor.NullExpressionVisitor |
nullExpressionVisitor This visitor determines whether the visited Expression is the NullExpression . |
protected JPQLQueryContext |
queryContext The context used to query information about the query. |
Constructor Summary | |
---|---|
protected |
AbstractVisitor(JPQLQueryContext queryContext) Creates a new AbstractVisitor . |
Method Summary | |
---|---|
protected CollectionExpression |
collectionExpression(Expression expression) Casts the given Expression to a CollectionExpression if it is actually an object of that type. |
private AbstractVisitor.CollectionExpressionVisitor |
collectionExpressionVisitor() |
void |
dispose() Disposes of the internal data. |
protected IEmbeddable |
embeddable(IManagedType managedType) Returns the given IManagedType if it is an IEmbeddable . |
protected IEntity |
entity(IManagedType managedType) Returns the given IManagedType if it is an IEntity . |
protected IJPAVersion |
getJPAVersion() Returns the version of the Java Persistence this entity for which it was defined. |
protected IManagedType |
getManagedType(IType type) Retrieves the entity for the given type. |
protected IManagedType |
getManagedType(java.lang.String abstractSchemaName) Retrieves the entity with the given abstract schema name, which can also be the entity class name. |
protected IMapping |
getMapping(Expression expression) Returns the IMapping for the field represented by the given Expession . |
protected IManagedTypeProvider |
getProvider() Retrieves the provider of managed types. |
protected IQuery |
getQuery() Returns the external form of the JPQL query. |
protected java.lang.String |
getQueryExpression() Returns the string representation of the JPQL query. |
protected Resolver |
getResolver(Expression expression) Creates or retrieved the cached Resolver for the given Expression . |
protected IType |
getType(java.lang.Class<?> type) Retrieves the external type for the given Java type. |
protected IType |
getType(Expression expression) Returns the IType of the given Expression . |
protected IType |
getType(java.lang.String name) Retrieves the external class for the given fully qualified class name. |
protected ITypeDeclaration |
getTypeDeclaration(Expression expression) Returns the ITypeDeclaration of the field handled by this Resolver . |
protected TypeHelper |
getTypeHelper() Returns a helper that gives access to the most common types . |
protected ITypeRepository |
getTypeRepository() Returns the type repository for the application. |
protected void |
initialize() Initializes this class. |
protected boolean |
isEclipseLinkPlatform() Determines whether the platform is EclipseLink. |
protected boolean |
isEmbeddable(IManagedType managedType) Determines whether the given IManagedType is an IEmbeddable . |
protected boolean |
isEntity(IManagedType managedType) Determines whether the given IManagedType is an IEntity . |
protected boolean |
isJavaPlatform() Determines whether the platform is pure JPA (generic). |
protected boolean |
isMappedSuperclass(IManagedType managedType) Determines whether the given IManagedType is an IMappedSuperclass . |
protected boolean |
isNull(Expression expression) Determines whether the given Expression is the NullExpression . |
private AbstractVisitor.ManagedTypeVisitor |
managedTypeVisitor() |
protected IMappedSuperclass |
mappedSuperclass(IManagedType managedType) Returns the given IManagedType if it is an IMappedSuperclass . |
private AbstractVisitor.NullExpressionVisitor |
nullExpressionVisitor() |
protected abstract void |
visit(Expression expression) Blindly visit the given Expression . |
Methods inherited from class org.eclipse.persistence.jpa.internal.jpql.parser.AnonymousExpressionVisitor |
---|
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private AbstractVisitor.CollectionExpressionVisitor collectionExpressionVisitor
Expression
is the CollectionExpression
.private AbstractVisitor.ManagedTypeVisitor managedTypeVisitor
IManagedType
that was visited.private AbstractVisitor.NullExpressionVisitor nullExpressionVisitor
Expression
is the NullExpression
.protected final JPQLQueryContext queryContext
Constructor Detail |
---|
protected AbstractVisitor(JPQLQueryContext queryContext)
AbstractVisitor
.
queryContext
- The context used to query information about the queryMethod Detail |
---|
protected final CollectionExpression collectionExpression(Expression expression)
Expression
to a CollectionExpression
if it is actually an object of that type.expression
- The Expression
to castExpression
if it is a CollectionExpression
or null
if it is any other objectprivate AbstractVisitor.CollectionExpressionVisitor collectionExpressionVisitor()
public void dispose()
protected IEmbeddable embeddable(IManagedType managedType)
IManagedType
if it is an IEmbeddable
.managedType
- The IManagedType
to check if it's an IEmbeddable
IManagedType
cast as IEmbeddable
or null
if it is not an IEmbeddable
protected IEntity entity(IManagedType managedType)
IManagedType
if it is an IEntity
.managedType
- The IManagedType
to check if it's an IEntity
IManagedType
cast as IEntity
or null
if it is not an IEntity
protected IJPAVersion getJPAVersion()
protected IManagedType getManagedType(IType type)
type
- The type that is used as a managed typenull
otherwiseprotected IManagedType getManagedType(java.lang.String abstractSchemaName)
abstractSchemaName
- The abstract schema name, which can be different from the entity class name but by default, it's the samenull
if none could be foundprotected IMapping getMapping(Expression expression)
IMapping
for the field represented by the given Expession
.expression
- The Expression
representing a state field path expression or a collection-valued path expressionIMapping
or null
if none existsprotected IManagedTypeProvider getProvider()
protected IQuery getQuery()
protected java.lang.String getQueryExpression()
null
string representation of the JPQL queryprotected Resolver getResolver(Expression expression)
Resolver
for the given Expression
. The Resolver
can return the IType
and ITypeDeclaration
of the Expression
and either the IManagedType
or the IMapping
.expression
- The Expression
for which its Resolver
will be retrievedResolver
for the given Expression
protected IType getType(java.lang.Class<?> type)
type
- The Java type to wrap with an external formprotected IType getType(Expression expression)
IType
of the given Expression
.expression
- The Expression
for which its type will be calculatedIType
that was resolved by this Resolver
or the IType
for IType.UNRESOLVABLE_TYPE
if it could not be resolvedprotected IType getType(java.lang.String name)
typeName
- The fully qualified class name of the class to retrieveprotected ITypeDeclaration getTypeDeclaration(Expression expression)
ITypeDeclaration
of the field handled by this Resolver
.expression
- The Expression
for which its type declaration will be calculatedITypeDeclaration
that was resolved by this Resolver
or the ITypeDeclaration
for IType.UNRESOLVABLE_TYPE
if it could not be resolvedprotected TypeHelper getTypeHelper()
types
.IType
protected ITypeRepository getTypeRepository()
ITypes
protected void initialize()
protected boolean isEclipseLinkPlatform()
true
if the platform is EclipseLink; false
if it's pure JPA (generic)protected boolean isEmbeddable(IManagedType managedType)
IManagedType
is an IEmbeddable
.managedType
- The IManagedType
to check if it's an IEmbeddable
true
if the given IManagedType
is an IEmbeddable
; false
otherwiseprotected boolean isEntity(IManagedType managedType)
IManagedType
is an IEntity
.managedType
- The IManagedType
to check if it's an IEntity
true
if the given IManagedType
is an IEntity
; false
otherwiseprotected boolean isJavaPlatform()
true
if the platform is pure JPA; false
if it's EclipseLinkprotected boolean isMappedSuperclass(IManagedType managedType)
IManagedType
is an IMappedSuperclass
.managedType
- The IManagedType
to check if it's an IMappedSuperclass
true
if the given IManagedType
is an IMappedSuperclass
; false
otherwiseprotected final boolean isNull(Expression expression)
Expression
is the NullExpression
.expression
- The Expression
to visittrue
if the given Expression
is NullExpression
; false
otherwiseprivate AbstractVisitor.ManagedTypeVisitor managedTypeVisitor()
protected IMappedSuperclass mappedSuperclass(IManagedType managedType)
IManagedType
if it is an IMappedSuperclass
.managedType
- The IManagedType
to check if it's an IMappedSuperclass
IManagedType
cast as IMappedSuperclass
or null
if it is not an IMappedSuperclass
private AbstractVisitor.NullExpressionVisitor nullExpressionVisitor()
protected abstract void visit(Expression expression)
Expression
.visit
in class AnonymousExpressionVisitor
expression
- The Expression
to visit
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |