Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013

com.healthmarketscience.jackcess.query
Class Query

java.lang.Object
  extended by com.healthmarketscience.jackcess.query.Query
Direct Known Subclasses:
BaseSelectQuery, DataDefinitionQuery, PassthroughQuery, UnionQuery, UpdateQuery

public abstract class Query
extends java.lang.Object

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 Query.AppendableList<E>
           
static class Query.Row
          Struct containing the information from a single row of the system query table.
protected static class Query.RowFilter
           
protected static class Query.RowFormatter
           
static class Query.Type
           
 
Field Summary
protected static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
protected Query(java.lang.String name, java.util.List<Query.Row> rows, int objectId, Query.Type type)
           
 
Method Summary
static Query create(int objectFlag, java.lang.String name, java.util.List<Query.Row> rows, int objectId)
          Creates a concrete Query instance from the given query data.
protected static java.util.List<Query.Row> filterRowsByFlag(java.util.List<Query.Row> rows, short flag)
           
protected static java.util.List<Query.Row> filterRowsByNotFlag(java.util.List<Query.Row> rows, short flag)
           
protected  java.util.List<Query.Row> getColumnRows()
           
protected  Query.Row getFlagRow()
           
protected  java.lang.String getFromRemoteDbPath()
           
protected  java.lang.String getFromRemoteDbType()
           
protected  java.util.List<java.lang.String> getFromTables()
           
protected  java.util.List<Query.Row> getGroupByRows()
           
protected  Query.Row getHavingRow()
           
protected static int getIntValue(java.lang.Integer i, int def)
           
protected  java.util.List<Query.Row> getJoinRows()
           
 java.lang.String getName()
          Returns the name of the query.
 int getObjectFlag()
           
 int getObjectId()
          Returns the unique object id of the query.
protected  java.util.List<Query.Row> getOrderByRows()
           
protected  java.util.List<java.lang.String> getOrderings()
           
 java.lang.String getOwnerAccessType()
           
protected  java.util.List<Query.Row> getParameterRows()
           
 java.util.List<java.lang.String> getParameters()
           
protected  Query.Row getRemoteDatabaseRow()
           
protected  Query.Row getRowByAttribute(java.lang.Byte attribute)
           
 java.util.List<Query.Row> getRows()
          Returns the rows from the system query table from which the query information was derived.
protected  java.util.List<Query.Row> getRowsByAttribute(java.lang.Byte attribute)
           
protected static short getShortValue(java.lang.Short s, int def)
           
protected  java.util.List<Query.Row> getTableRows()
           
 Query.Type getType()
          Returns the type of the query.
protected  Query.Row getTypeRow()
           
protected static Query.Row getUniqueRow(java.util.List<Query.Row> rows)
           
protected  java.lang.String getWhereExpression()
           
protected  Query.Row getWhereRow()
           
protected  boolean hasFlag(int flagMask)
           
protected static boolean hasFlag(Query.Row row, int flagMask)
           
protected  boolean supportsStandardClauses()
           
protected static java.lang.StringBuilder toAlias(java.lang.StringBuilder builder, java.lang.String alias)
           
protected static java.lang.StringBuilder toOptionalQuotedExpr(java.lang.StringBuilder builder, java.lang.String fullExpr, boolean isIdentifier)
           
protected static java.lang.StringBuilder toQuotedExpr(java.lang.StringBuilder builder, java.lang.String expr)
           
protected static java.lang.StringBuilder toRemoteDb(java.lang.StringBuilder builder, java.lang.String remoteDbPath, java.lang.String remoteDbType)
           
protected  void toSQLParameterString(java.lang.StringBuilder builder)
           
 java.lang.String toSQLString()
          Returns the actual SQL string which this query data represents.
protected abstract  void toSQLString(java.lang.StringBuilder builder)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.commons.logging.Log LOG
Constructor Detail

Query

protected Query(java.lang.String name,
                java.util.List<Query.Row> rows,
                int objectId,
                Query.Type type)
Method Detail

getName

public java.lang.String getName()
Returns the name of the query.


getType

public Query.Type getType()
Returns the type of the query.


getObjectId

public int getObjectId()
Returns the unique object id of the query.


getObjectFlag

public int getObjectFlag()

getRows

public java.util.List<Query.Row> getRows()
Returns the rows from the system query table from which the query information was derived.


getRowsByAttribute

protected java.util.List<Query.Row> getRowsByAttribute(java.lang.Byte attribute)

getRowByAttribute

protected Query.Row getRowByAttribute(java.lang.Byte attribute)

getTypeRow

protected Query.Row getTypeRow()

getParameterRows

protected java.util.List<Query.Row> getParameterRows()

getFlagRow

protected Query.Row getFlagRow()

getRemoteDatabaseRow

protected Query.Row getRemoteDatabaseRow()

getTableRows

protected java.util.List<Query.Row> getTableRows()

getColumnRows

protected java.util.List<Query.Row> getColumnRows()

getJoinRows

protected java.util.List<Query.Row> getJoinRows()

getWhereRow

protected Query.Row getWhereRow()

getGroupByRows

protected java.util.List<Query.Row> getGroupByRows()

getHavingRow

protected Query.Row getHavingRow()

getOrderByRows

protected java.util.List<Query.Row> getOrderByRows()

toSQLString

protected abstract void toSQLString(java.lang.StringBuilder builder)

toSQLParameterString

protected void toSQLParameterString(java.lang.StringBuilder builder)

getParameters

public java.util.List<java.lang.String> getParameters()

getFromTables

protected java.util.List<java.lang.String> getFromTables()

getFromRemoteDbPath

protected java.lang.String getFromRemoteDbPath()

getFromRemoteDbType

protected java.lang.String getFromRemoteDbType()

getWhereExpression

protected java.lang.String getWhereExpression()

getOrderings

protected java.util.List<java.lang.String> getOrderings()

getOwnerAccessType

public java.lang.String getOwnerAccessType()

hasFlag

protected boolean hasFlag(int flagMask)

supportsStandardClauses

protected boolean supportsStandardClauses()

toSQLString

public java.lang.String toSQLString()
Returns the actual SQL string which this query data represents.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

create

public static Query create(int objectFlag,
                           java.lang.String name,
                           java.util.List<Query.Row> rows,
                           int objectId)
Creates a concrete Query instance from the given query data.

Parameters:
objectFlag - the flag indicating the type of the query
name - the name of the query
rows - the rows from the system query table containing the data describing this query
objectId - the unique object id of this query
Returns:
a Query instance for the given query data

getUniqueRow

protected static Query.Row getUniqueRow(java.util.List<Query.Row> rows)

filterRowsByFlag

protected static java.util.List<Query.Row> filterRowsByFlag(java.util.List<Query.Row> rows,
                                                            short flag)

filterRowsByNotFlag

protected static java.util.List<Query.Row> filterRowsByNotFlag(java.util.List<Query.Row> rows,
                                                               short flag)

hasFlag

protected static boolean hasFlag(Query.Row row,
                                 int flagMask)

getShortValue

protected static short getShortValue(java.lang.Short s,
                                     int def)

getIntValue

protected static int getIntValue(java.lang.Integer i,
                                 int def)

toOptionalQuotedExpr

protected static java.lang.StringBuilder toOptionalQuotedExpr(java.lang.StringBuilder builder,
                                                              java.lang.String fullExpr,
                                                              boolean isIdentifier)

toQuotedExpr

protected static java.lang.StringBuilder toQuotedExpr(java.lang.StringBuilder builder,
                                                      java.lang.String expr)

toRemoteDb

protected static java.lang.StringBuilder toRemoteDb(java.lang.StringBuilder builder,
                                                    java.lang.String remoteDbPath,
                                                    java.lang.String remoteDbType)

toAlias

protected static java.lang.StringBuilder toAlias(java.lang.StringBuilder builder,
                                                 java.lang.String alias)

Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013