Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


org.eclipse.persistence.jpa.internal.jpql.parser
Class ExpressionFactory

java.lang.Object
  extended by org.eclipse.persistence.jpa.internal.jpql.parser.ExpressionFactory

All Implemented Interfaces:
java.lang.Comparable<ExpressionFactory>
Direct Known Subclasses:
AbsExpressionFactory, AbstractLiteralExpressionFactory, AbstractSchemaNameFactory, AllOrAnyExpressionFactory, AndExpressionFactory, ArithmeticExpressionFactory, AvgFunctionFactory, BadExpressionFactory, BetweenExpressionFactory, CaseExpressionFactory, CoalesceExpressionFactory, CollectionMemberDeclarationFactory, CollectionMemberExpressionFactory, CollectionValuedPathExpressionFactory, ComparisonExpressionFactory, ConcatExpressionFactory, ConstructorExpressionFactory, CountFunctionFactory, DateTimeFactory, DeleteClauseFactory, DeleteStatementFactory, EmptyCollectionComparisonExpressionFactory, EntryExpressionFactory, ExistsExpressionFactory, FromClauseFactory, FuncExpressionFactory, GeneralIdentificationExpressionFactory, GroupByClauseFactory, GroupByItemFactory, HavingClauseFactory, IdentificationVariableDeclarationFactory, IdentificationVariableFactory, IndexExpressionFactory, InExpressionFactory, InternalOrderByItemFactory, IsExpressionFactory, JoinFactory, KeywordExpressionFactory, LengthExpressionFactory, LikeExpressionFactory, LocateExpressionFactory, LowerExpressionFactory, MaxFunctionFactory, MinFunctionFactory, ModExpressionFactory, NotExpressionFactory, NullComparisonExpressionFactory, NullIfExpressionFactory, ObjectExpressionFactory, OrderByClauseFactory, OrderByItemFactory, OrExpressionFactory, PreLiteralExpressionFactory, RangeVariableDeclarationFactory, ResultVariableFactory, SelectClauseFactory, SelectStatementFactory, SimpleSelectStatementFactory, SizeExpressionFactory, SqrtExpressionFactory, StringLiteralFactory, SubstringExpressionFactory, SumFunctionFactory, TreatExpressionFactory, TrimExpressionFactory, TypeExpressionFactory, UnknownExpressionFactory, UpdateClauseFactory, UpdateItemFactory, UpdateStatementFactory, UpperExpressionFactory, WhenClauseFactory, WhereClauseFactory

abstract class ExpressionFactory
extends java.lang.Object
implements java.lang.Comparable<ExpressionFactory>

An ExpressionFactory is responsible to parse a portion of JPQL query that starts with one of the factory's identifiers.

Since:
2.3
Version:
2.3
Author:
Pascal Filion

Field Summary
private  java.lang.String id
          The unique identifier of this ExpressionFactory.
private  java.lang.String[] identifiers
          The JPQL identifiers handled by this factory.

 

Constructor Summary
ExpressionFactory(java.lang.String id, java.lang.String... identifiers)
          Creates a new ExpressionFactory.

 

Method Summary
(package private) abstract  AbstractExpression buildExpression(AbstractExpression parent, WordParser wordParser, java.lang.String word, JPQLQueryBNF queryBNF, AbstractExpression expression, boolean tolerant)
          Creates a new Expression.
 int compareTo(ExpressionFactory expressionFactory)
          
 boolean equals(java.lang.Object object)
          
(package private)  java.lang.String getId()
          Returns the unique identifier of this ExpressionFactory.
(package private)  IJPAVersion getVersion()
          Returns the supported JPA version.
 int hashCode()
          
(package private)  java.lang.String[] identifiers()
          Returns the JPQL identifiers handled by this factory.
 java.lang.String toString()
          

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Field Detail

id

private final java.lang.String id
The unique identifier of this ExpressionFactory.

identifiers

private final java.lang.String[] identifiers
The JPQL identifiers handled by this factory.

Constructor Detail

ExpressionFactory

ExpressionFactory(java.lang.String id,
                  java.lang.String... identifiers)
Creates a new ExpressionFactory.
Parameters:
id - The unique identifier of this ExpressionFactory
identifiers - The JPQL identifiers handled by this factory

Method Detail

buildExpression

abstract AbstractExpression buildExpression(AbstractExpression parent,
                                            WordParser wordParser,
                                            java.lang.String word,
                                            JPQLQueryBNF queryBNF,
                                            AbstractExpression expression,
                                            boolean tolerant)
Creates a new Expression.
Parameters:
parent - The parent expression
wordParser - The text to parse based on the current position of the cursor
word - The current word to parse
queryBNF - The BNF grammar that was used to identifier this factory to be capable to parse a portion of the query
expression - During the parsing, it is possible the first part of an expression was parsed which needs to be used as a sub-expression of the newly created expression
Returns:
A new Expression representing a portion or the totality of the given text

compareTo

public final int compareTo(ExpressionFactory expressionFactory)
Specified by:
compareTo in interface java.lang.Comparable<ExpressionFactory>

equals

public final boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

getId

final java.lang.String getId()
Returns the unique identifier of this ExpressionFactory.
Returns:
The identifier used to register this ExpressionFactory with ExpressionRegistry

getVersion

IJPAVersion getVersion()
Returns the supported JPA version.
Returns:
The version for which this factory can support

hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

identifiers

final java.lang.String[] identifiers()
Returns the JPQL identifiers handled by this factory.
Returns:
The list of JPQL identifiers this factory knows how to parse

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.