public abstract class QueryImpl extends Object implements Query
toSQLString()
method can be used to convert this object into
the actual SQL string which this query data represents.Modifier and Type | Class and Description |
---|---|
protected static class |
QueryImpl.AppendableList<E> |
static class |
QueryImpl.Row
Struct containing the information from a single row of the system query
table.
|
protected static class |
QueryImpl.RowFilter |
protected static class |
QueryImpl.RowFormatter |
Query.Type
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
LOG |
Modifier | Constructor and Description |
---|---|
protected |
QueryImpl(String name,
List<QueryImpl.Row> rows,
int objectId,
int objectFlag,
Query.Type type) |
Modifier and Type | Method and Description |
---|---|
static QueryImpl |
create(int objectFlag,
String name,
List<QueryImpl.Row> rows,
int objectId)
Creates a concrete Query instance from the given query data.
|
protected static List<QueryImpl.Row> |
filterRowsByFlag(List<QueryImpl.Row> rows,
short flag) |
protected static List<QueryImpl.Row> |
filterRowsByNotFlag(List<QueryImpl.Row> rows,
short flag) |
protected List<QueryImpl.Row> |
getColumnRows() |
protected QueryImpl.Row |
getFlagRow() |
protected String |
getFromRemoteDbPath() |
protected String |
getFromRemoteDbType() |
protected List<String> |
getFromTables() |
protected List<QueryImpl.Row> |
getGroupByRows() |
protected QueryImpl.Row |
getHavingRow() |
protected static int |
getIntValue(Integer i,
int def) |
protected List<QueryImpl.Row> |
getJoinRows() |
String |
getName()
Returns the name of the query.
|
int |
getObjectFlag() |
int |
getObjectId()
Returns the unique object id of the query.
|
protected List<QueryImpl.Row> |
getOrderByRows() |
protected List<String> |
getOrderings() |
String |
getOwnerAccessType() |
protected List<QueryImpl.Row> |
getParameterRows() |
List<String> |
getParameters()
Returns the rows from the system query table from which the query
information was derived.
|
protected QueryImpl.Row |
getRemoteDatabaseRow() |
protected QueryImpl.Row |
getRowByAttribute(Byte attribute) |
List<QueryImpl.Row> |
getRows()
Returns the rows from the system query table from which the query
information was derived.
|
protected List<QueryImpl.Row> |
getRowsByAttribute(Byte attribute) |
protected static short |
getShortValue(Short s,
int def) |
protected List<QueryImpl.Row> |
getTableRows() |
Query.Type |
getType()
Returns the type of the query.
|
QueryImpl.Row |
getTypeRow() |
protected QueryImpl.Row |
getUniqueRow(List<QueryImpl.Row> rows) |
protected String |
getWhereExpression() |
protected QueryImpl.Row |
getWhereRow() |
protected boolean |
hasFlag(int flagMask) |
protected static boolean |
hasFlag(QueryImpl.Row row,
int flagMask) |
boolean |
isHidden()
Whether or not this query has been marked as hidden.
|
protected static boolean |
isQuoted(String expr) |
protected boolean |
supportsStandardClauses() |
protected static StringBuilder |
toAlias(StringBuilder builder,
String alias) |
protected static StringBuilder |
toOptionalQuotedExpr(StringBuilder builder,
String fullExpr,
boolean isIdentifier) |
protected static StringBuilder |
toQuotedExpr(StringBuilder builder,
String expr) |
protected static StringBuilder |
toRemoteDb(StringBuilder builder,
String remoteDbPath,
String remoteDbType) |
protected void |
toSQLParameterString(StringBuilder builder) |
String |
toSQLString()
Returns the actual SQL string which this query data represents.
|
protected abstract void |
toSQLString(StringBuilder builder) |
String |
toString() |
protected QueryImpl(String name, List<QueryImpl.Row> rows, int objectId, int objectFlag, Query.Type type)
public String getName()
public Query.Type getType()
public boolean isHidden()
Query
public int getObjectId()
getObjectId
in interface Query
public int getObjectFlag()
getObjectFlag
in interface Query
public List<QueryImpl.Row> getRows()
protected List<QueryImpl.Row> getRowsByAttribute(Byte attribute)
protected QueryImpl.Row getRowByAttribute(Byte attribute)
public QueryImpl.Row getTypeRow()
protected List<QueryImpl.Row> getParameterRows()
protected QueryImpl.Row getFlagRow()
protected QueryImpl.Row getRemoteDatabaseRow()
protected List<QueryImpl.Row> getTableRows()
protected List<QueryImpl.Row> getColumnRows()
protected List<QueryImpl.Row> getJoinRows()
protected QueryImpl.Row getWhereRow()
protected List<QueryImpl.Row> getGroupByRows()
protected QueryImpl.Row getHavingRow()
protected List<QueryImpl.Row> getOrderByRows()
protected abstract void toSQLString(StringBuilder builder)
protected void toSQLParameterString(StringBuilder builder)
public List<String> getParameters()
Query
getParameters
in interface Query
protected String getFromRemoteDbPath()
protected String getFromRemoteDbType()
protected String getWhereExpression()
public String getOwnerAccessType()
getOwnerAccessType
in interface Query
protected boolean hasFlag(int flagMask)
protected boolean supportsStandardClauses()
public String toSQLString()
toSQLString
in interface Query
public static QueryImpl create(int objectFlag, String name, List<QueryImpl.Row> rows, int objectId)
objectFlag
- the flag indicating the type of the queryname
- the name of the queryrows
- the rows from the system query table containing the data
describing this queryobjectId
- the unique object id of this queryprotected QueryImpl.Row getUniqueRow(List<QueryImpl.Row> rows)
protected static List<QueryImpl.Row> filterRowsByFlag(List<QueryImpl.Row> rows, short flag)
protected static List<QueryImpl.Row> filterRowsByNotFlag(List<QueryImpl.Row> rows, short flag)
protected static boolean hasFlag(QueryImpl.Row row, int flagMask)
protected static short getShortValue(Short s, int def)
protected static int getIntValue(Integer i, int def)
protected static StringBuilder toOptionalQuotedExpr(StringBuilder builder, String fullExpr, boolean isIdentifier)
protected static StringBuilder toQuotedExpr(StringBuilder builder, String expr)
protected static boolean isQuoted(String expr)
protected static StringBuilder toRemoteDb(StringBuilder builder, String remoteDbPath, String remoteDbType)
protected static StringBuilder toAlias(StringBuilder builder, String alias)
Copyright © 2005–2018. All rights reserved.