|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.jpa.jpql.parser.AbstractExpression org.eclipse.persistence.jpa.jpql.parser.AbstractEncapsulatedExpression org.eclipse.persistence.jpa.jpql.parser.AbstractDoubleEncapsulatedExpression org.eclipse.persistence.jpa.jpql.parser.DatabaseType
public final class DatabaseType
This expression represents the database specific data type, which may include size and scale.
database_type ::= data_type_literal [( [numeric_literal [, numeric_literal]] )]
data_type_literal ::= [CHAR, VARCHAR, NUMERIC, INTEGER, DATE, TIME, TIMESTAMP, etc]
Example: CASE(e.name AS VARCHAR(20))
Field Summary |
---|
Fields inherited from class org.eclipse.persistence.jpa.jpql.parser.AbstractExpression |
---|
COMMA, DOT, DOUBLE_QUOTE, LEFT_CURLY_BRACKET, LEFT_PARENTHESIS, NOT_DEFINED, RIGHT_CURLY_BRACKET, RIGHT_PARENTHESIS, SINGLE_QUOTE, SPACE, UNDERSCORE |
Constructor Summary | |
---|---|
DatabaseType(AbstractExpression parent,
java.lang.String databaseType)
Creates a new DatabaseType . |
Method Summary | |
---|---|
void |
accept(ExpressionVisitor visitor)
Visits this Expression by the given visitor . |
JPQLQueryBNF |
getQueryBNF()
Returns the BNF of this Expression . |
protected boolean |
isSecondExpressionOptional()
Determines whether the second expression is optional or not. |
java.lang.String |
parameterExpressionBNF(int index)
Returns the BNF to be used to parse one of the encapsulated expression. |
protected java.lang.String |
parseIdentifier(WordParser wordParser)
Parses the identifier of this expression. |
protected boolean |
shouldParseRightParenthesis(WordParser wordParser,
boolean tolerant)
Determines whether the right parenthesis should be parsed or not by this expression. |
Methods inherited from class org.eclipse.persistence.jpa.jpql.parser.AbstractDoubleEncapsulatedExpression |
---|
acceptChildren, addChildrenTo, addOrderedEncapsulatedExpressionTo, buildCollectionExpression, findQueryBNF, getFirstExpression, getSecondExpression, hasComma, hasEncapsulatedExpression, hasFirstExpression, hasSecondExpression, hasSpaceAfterComma, isParsingComplete, parseEncapsulatedExpression, removeEncapsulatedExpression, toParsedTextEncapsulatedExpression |
Methods inherited from class org.eclipse.persistence.jpa.jpql.parser.AbstractEncapsulatedExpression |
---|
addOrderedChildrenTo, areLogicalIdentifiersSupported, getActualIdentifier, getIdentifier, hasLeftParenthesis, hasRightParenthesis, hasSpaceAfterIdentifier, parse, toParsedText |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DatabaseType(AbstractExpression parent, java.lang.String databaseType)
DatabaseType
.
parent
- The parent of this expressionidentifier
- The database typeMethod Detail |
---|
public void accept(ExpressionVisitor visitor)
Expression
by the given visitor
.
visitor
- The ExpressionVisitor
to visit this objectpublic JPQLQueryBNF getQueryBNF()
Expression
.
JPQLQueryBNF
, which represents the grammar of this Expression
protected boolean isSecondExpressionOptional()
isSecondExpressionOptional
in class AbstractDoubleEncapsulatedExpression
true
if the second expression is optional; false
if it is
requiredpublic java.lang.String parameterExpressionBNF(int index)
parameterExpressionBNF
in class AbstractDoubleEncapsulatedExpression
index
- The position of the encapsulated Expression
that needs to be parsed
within the parenthesis, which starts at position 0
protected java.lang.String parseIdentifier(WordParser wordParser)
parseIdentifier
in class AbstractEncapsulatedExpression
protected boolean shouldParseRightParenthesis(WordParser wordParser, boolean tolerant)
shouldParseRightParenthesis
in class AbstractEncapsulatedExpression
wordParser
- The text to parse based on the current position of the cursortolerant
- Determines whether the parsing system should be tolerant, meaning if it should
try to parse invalid or incomplete queries
true
if the right parenthesis should be owned by this expression if it
is the next character to scan; false
otherwise
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |