public abstract class ExpressionFactory extends java.lang.Object implements java.lang.Comparable<ExpressionFactory>
ExpressionFactory
is responsible to parse a portion of JPQL query that starts
with one of the factory's identifiers.
Provisional API: This interface is part of an interim API that is still under development and
expected to change significantly before reaching stability. It is available at this early stage
to solicit feedback from pioneering adopters on the understanding that any code that uses this
API will almost certainly be broken (repeatedly) as the API evolves.Modifier and Type | Method and Description |
---|---|
int |
compareTo(ExpressionFactory expressionFactory) |
boolean |
equals(java.lang.Object object) |
ExpressionRegistry |
getExpressionRegistry()
Returns the registry containing the
JPQLQueryBNFs and the ExpressionFactories that are used
to properly parse a JPQL query. |
java.lang.String |
getFallBackExpressionFactoryId()
Returns the unique identifier of the
ExpressionFactory to use when this one cannot
create the right Expression based on the JPQL fragment to parse. |
java.lang.String |
getId()
Returns the unique identifier of this
ExpressionFactory . |
int |
hashCode() |
java.lang.String[] |
identifiers()
Returns the JPQL identifiers handled by this factory.
|
void |
setFallBackExpressionFactory(java.lang.String expressionFactoryId)
Sets the unique identifier of the
ExpressionFactory to use when this one cannot create
the right Expression based on the JPQL fragment to parse. |
java.lang.String |
toString() |
public final int compareTo(ExpressionFactory expressionFactory)
compareTo
in interface java.lang.Comparable<ExpressionFactory>
public final boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public final ExpressionRegistry getExpressionRegistry()
JPQLQueryBNFs
and the ExpressionFactories
that are used
to properly parse a JPQL query.public java.lang.String getFallBackExpressionFactoryId()
ExpressionFactory
to use when this one cannot
create the right Expression
based on the JPQL fragment to parse.
Note: Only PreLiteralExpressionFactory
and LiteralExpressionFactory
currently
support this feature.
A good example is JoinCollectionValuedPathExpressionFactory
giving the fallback
factory to PreLiteralExpressionFactory
, which in return gives it to LiteralExpressionFactory
. This allows parsing incomplete queries correctly but changes the
object being created, rather than creating an IdentificationVariable
, an AbstractSchemaName
is instead.
ExpressionFactory
public final java.lang.String getId()
ExpressionFactory
.ExpressionFactory
with ExpressionRegistry
public final int hashCode()
hashCode
in class java.lang.Object
public final java.lang.String[] identifiers()
public void setFallBackExpressionFactory(java.lang.String expressionFactoryId)
ExpressionFactory
to use when this one cannot create
the right Expression
based on the JPQL fragment to parse.
Note: Only PreLiteralExpressionFactory
and LiteralExpressionFactory
currently
support this feature.
A good example is JoinCollectionValuedPathExpressionFactory
giving the fallback
factory to PreLiteralExpressionFactory
, which in return gives it to LiteralExpressionFactory
. This allows parsing incomplete queries correctly but changes the
object being created, rather than creating an IdentificationVariable
, an AbstractSchemaName
is instead.
fallbackExpressionFactoryId
- The unique identifier of the ExpressionFactory
public final java.lang.String toString()
toString
in class java.lang.Object
EclipseLink 2.4.2, "build v20130514-5956486" API Reference