public class QueryParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ABS |
static int |
AND |
static int |
ARG |
static int |
AS |
static int |
ASC |
static int |
BETWEEN |
static int |
BOTH |
static int |
BY |
static int |
CONCAT |
static int |
CONCAT_OP |
static int |
CURRENT_DATE |
static int |
CURRENT_TIME |
static int |
CURRENT_TIMESTAMP |
static int |
DELETE |
static int |
DESC |
static int |
DISTINCT |
static int |
DOUBLE |
static int |
EMPTY |
static int |
EQ |
static int |
ESCAPE |
static int |
EXTERNAL_DOT |
static int |
FALSE |
static int |
FETCH |
static int |
FROM |
static int |
GE |
static int |
GROUP |
static int |
GT |
static int |
HAVING |
static int |
IDENTIFIER |
static int |
IN |
static int |
INNER |
static int |
INTEGER |
static int |
IS |
static int |
JOIN |
static int |
LE |
static int |
LEADING |
static int |
LEFT |
static int |
LENGTH |
static int |
LIKE |
static int |
LIMIT |
static int |
LOCATE |
static int |
LONG |
static int |
LOWER |
static int |
LT |
static int |
MAX |
static int |
MEMBER |
static int |
MIN |
static int |
MOD |
static int |
NAMED_ARG |
static int |
NE |
static int |
NEW |
static int |
NOT |
static int |
NOT_NULL |
static int |
NULL |
static int |
OF |
static int |
OFFSET |
static int |
OR |
static int |
ORDER |
static int |
OUTER |
static int |
SELECT |
static int |
SET |
static int |
SIZE |
static int |
SQRT |
static int |
STRING |
static int |
SUBSTRING |
static int |
SUM |
static int |
THIS |
static int |
TRAILING |
static int |
TRIM |
static int |
TRUE |
static int |
UNKNOWN |
static int |
UPDATE |
static int |
UPPER |
static int |
WHERE |
Constructor and Description |
---|
QueryParser(java.lang.String query)
Creates the query parser.
|
Modifier and Type | Method and Description |
---|---|
void |
addArg(ArgExpr arg)
Adds a new argument
|
FromItem |
addFromItem(AmberTable table)
Adds a new FromItem.
|
FromItem |
addFromItem(AmberTable table,
java.lang.String id)
Adds a new FromItem.
|
FromItem |
addFromItem(EntityType entityType,
AmberTable table)
Adds a new FromItem.
|
FromItem |
addFromItem(EntityType entityType,
AmberTable table,
java.lang.String id)
Adds a new FromItem.
|
PathExpr |
addPath(PathExpr path)
Adds an entity path
|
FromItem |
createDependentFromItem(FromItem item,
LinkColumns link)
Adds a new FromItem.
|
java.lang.String |
createTableName()
Returns a unique table name
|
QueryParseException |
error(java.lang.String msg)
Creates an error.
|
int |
generateSQLArg()
Generates a new arg.
|
java.lang.String |
getQuery()
Returns the query string
|
AbstractQuery |
getSelectQuery()
Returns the query string
|
boolean |
isDerbyDBMS()
Returns true for Derby-like DBMS.
|
boolean |
isPostgresDBMS()
Returns true for Postgres-like DBMS.
|
AbstractQuery |
parse()
Parses the query.
|
void |
setLazyResult(boolean isLazy)
Sets true for lazy loading.
|
void |
setPersistenceUnit(AmberPersistenceUnit persistenceUnit)
Sets the persistence unit.
|
java.lang.String |
toString()
Returns a debuggable description of the select.
|
public static final int IDENTIFIER
public static final int INTEGER
public static final int LONG
public static final int DOUBLE
public static final int STRING
public static final int TRUE
public static final int FALSE
public static final int UNKNOWN
public static final int MEMBER
public static final int OF
public static final int EMPTY
public static final int NULL
public static final int FROM
public static final int IN
public static final int SELECT
public static final int UPDATE
public static final int DELETE
public static final int DISTINCT
public static final int WHERE
public static final int AS
public static final int SET
public static final int ORDER
public static final int GROUP
public static final int BY
public static final int ASC
public static final int DESC
public static final int LIMIT
public static final int OFFSET
public static final int JOIN
public static final int INNER
public static final int LEFT
public static final int OUTER
public static final int FETCH
public static final int BETWEEN
public static final int LIKE
public static final int ESCAPE
public static final int IS
public static final int CONCAT_OP
public static final int EQ
public static final int NE
public static final int LT
public static final int LE
public static final int GT
public static final int GE
public static final int AND
public static final int OR
public static final int NOT
public static final int LENGTH
public static final int LOCATE
public static final int ABS
public static final int SQRT
public static final int MOD
public static final int SIZE
public static final int MAX
public static final int MIN
public static final int SUM
public static final int CONCAT
public static final int LOWER
public static final int UPPER
public static final int SUBSTRING
public static final int TRIM
public static final int BOTH
public static final int LEADING
public static final int TRAILING
public static final int CURRENT_DATE
public static final int CURRENT_TIME
public static final int CURRENT_TIMESTAMP
public static final int EXTERNAL_DOT
public static final int ARG
public static final int NAMED_ARG
public static final int NEW
public static final int THIS
public static final int NOT_NULL
public static final int HAVING
public boolean isDerbyDBMS()
public boolean isPostgresDBMS()
public void setPersistenceUnit(AmberPersistenceUnit persistenceUnit)
public void setLazyResult(boolean isLazy)
public java.lang.String getQuery()
public AbstractQuery getSelectQuery()
public int generateSQLArg()
public AbstractQuery parse() throws AmberException
AmberException
public FromItem addFromItem(AmberTable table)
public FromItem addFromItem(EntityType entityType, AmberTable table)
public java.lang.String createTableName()
public FromItem addFromItem(AmberTable table, java.lang.String id)
public FromItem addFromItem(EntityType entityType, AmberTable table, java.lang.String id)
public FromItem createDependentFromItem(FromItem item, LinkColumns link)
public void addArg(ArgExpr arg)
public QueryParseException error(java.lang.String msg)
public java.lang.String toString()
toString
in class java.lang.Object