|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.healthmarketscience.jackcess.impl.query.QueryImpl
public abstract class QueryImpl
Base class for classes which encapsulate information about an Access query.
The toSQLString() method can be used to convert this object into
the actual SQL string which this query data represents.
| Nested Class Summary | |
|---|---|
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
|
| Nested classes/interfaces inherited from interface com.healthmarketscience.jackcess.query.Query |
|---|
Query.Type |
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
LOG
|
| Constructor Summary | |
|---|---|
protected |
QueryImpl(String name,
List<QueryImpl.Row> rows,
int objectId,
int objectFlag,
Query.Type type)
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log LOG
| Constructor Detail |
|---|
protected QueryImpl(String name,
List<QueryImpl.Row> rows,
int objectId,
int objectFlag,
Query.Type type)
| Method Detail |
|---|
public String getName()
getName in interface Querypublic Query.Type getType()
getType in interface Querypublic boolean isHidden()
Query
isHidden in interface Querypublic int getObjectId()
getObjectId in interface Querypublic int getObjectFlag()
getObjectFlag in interface Querypublic 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 Queryprotected List<String> getFromTables()
protected String getFromRemoteDbPath()
protected String getFromRemoteDbType()
protected String getWhereExpression()
protected List<String> getOrderings()
public String getOwnerAccessType()
getOwnerAccessType in interface Queryprotected boolean hasFlag(int flagMask)
protected boolean supportsStandardClauses()
public String toSQLString()
toSQLString in interface Querypublic String toString()
toString in class Object
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 query
protected 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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||