ExpressionFactory is responsible to parse a portion of JPQL query which starts
with one of the factory's JPQL 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 | Field and Description |
|---|---|
| private ExpressionRegistry | expressionRegistry
The |
| private final String | id
The unique identifier of this |
| private String[] | identifiers
The JPQL identifiers handled by this factory. |
| Access | Constructor and Description |
|---|---|
| protected | ExpressionFactory(String
The unique identifier of this id, String... ExpressionFactoryThe JPQL identifiers handled by this factory identifiers)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | addIdentifier(String
The JPQL identifier this factory will parse identifier)Adds the given JPQL identifier to this factory. |
| pack-priv void | addIdentifiers(String...
The JPQL identifiers this factory will parse identifiers)Adds the given JPQL identifiers to this factory. |
| protected abstract AbstractExpression | Returns: A newAbstractExpression representing the portion or the totality of the
text held by WordParser starting at the cursor positionThe parent parent, WordParser AbstractExpressionThe text to parse based on the current position of the cursor wordParser, String The current word being parsed word, JPQLQueryBNF The BNF grammar that was used to identifier this factory to be capable to
parse a portion of the query queryBNF, AbstractExpression 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 expression, boolean tolerant)Creates a new |
| public final int | compareTo(ExpressionFactory
the object to be compared. expressionFactory)Implements java. |
| public final boolean | equals(Object
the reference object with which to compare. object)Overrides java. |
| public final ExpressionRegistry | Returns: The registry containing the information related to the JPQL grammarReturns the registry containing the |
| public final String | |
| public final int | |
| public final String[] | Returns: The list of JPQL identifiers this factory knows how to parseReturns the JPQL identifiers handled by this factory. |
| pack-priv final void | setExpressionRegistry(ExpressionRegistry
The registry for a given JPQL grammar expressionRegistry)Sets the backpointer to the |
| public final String |
| expressionRegistry | back to summary |
|---|---|
| private ExpressionRegistry expressionRegistry The | |
| id | back to summary |
|---|---|
| private final String id The unique identifier of this | |
| identifiers | back to summary |
|---|---|
| private String[] identifiers The JPQL identifiers handled by this factory. | |
| ExpressionFactory | back to summary |
|---|---|
| protected ExpressionFactory(String id, String... identifiers) Creates a new
| |
| addIdentifier | back to summary |
|---|---|
| pack-priv void addIdentifier(String identifier) Adds the given JPQL identifier to this factory.
| |
| addIdentifiers | back to summary |
|---|---|
| pack-priv void addIdentifiers(String... identifiers) Adds the given JPQL identifiers to this factory.
| |
| buildExpression | back to summary |
|---|---|
| protected abstract AbstractExpression buildExpression(AbstractExpression parent, WordParser wordParser, String word, JPQLQueryBNF queryBNF, AbstractExpression expression, boolean tolerant) Creates a new
| |
| compareTo | back to summary |
|---|---|
| public final int compareTo(ExpressionFactory expressionFactory) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| equals | back to summary |
|---|---|
| public final boolean equals(Object object) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getExpressionRegistry | back to summary |
|---|---|
| public final ExpressionRegistry getExpressionRegistry() Returns the registry containing the
| |
| getId | back to summary |
|---|---|
| public final String getId() Returns the unique identifier of this
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| identifiers | back to summary |
|---|---|
| public final String[] identifiers() Returns the JPQL identifiers handled by this factory.
| |
| setExpressionRegistry | back to summary |
|---|---|
| pack-priv final void setExpressionRegistry(ExpressionRegistry expressionRegistry) Sets the backpointer to the
| |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Doc from java. Returns a string representation of the object. | |