org.sandev.tools.JDBC
Class THD_QueryProcessor

java.lang.Object
  extended by org.sandev.tools.JDBC.THD_QueryProcessor

public class THD_QueryProcessor
extends java.lang.Object

A SandQueryMessage processor for standard SQL. AUTOGENERATED FILE, DO NOT EDIT DIRECTLY.
source: declared in build
generator: org.sandev.generator.SQLQueryProcessorGenerator
time: Jul 31, 2008 4:34:17 PM


Field Summary
static java.lang.String accountQueryConnector
          The static connector phrase for all AccountQuery processing
static java.lang.String accountQueryPreamble
          The static preamble for all AccountQuery processing
static java.lang.String dataManagementQueryConnector
          The static connector phrase for all DataManagementQuery processing
static java.lang.String dataManagementQueryPreamble
          The static preamble for all DataManagementQuery processing
static java.lang.String externalPlanQueryConnector
          The static connector phrase for all ExternalPlanQuery processing
static java.lang.String externalPlanQueryPreamble
          The static preamble for all ExternalPlanQuery processing
static java.lang.String heapAssociationQueryConnector
          The static connector phrase for all HeapAssociationQuery processing
static java.lang.String heapAssociationQueryPreamble
          The static preamble for all HeapAssociationQuery processing
static java.lang.String heapAttributesQueryConnector
          The static connector phrase for all HeapAttributesQuery processing
static java.lang.String heapAttributesQueryPreamble
          The static preamble for all HeapAttributesQuery processing
static java.lang.String planComponentQueryConnector
          The static connector phrase for all PlanComponentQuery processing
static java.lang.String planComponentQueryPreamble
          The static preamble for all PlanComponentQuery processing
static java.lang.String planQueryConnector
          The static connector phrase for all PlanQuery processing
static java.lang.String planQueryPreamble
          The static preamble for all PlanQuery processing
static java.lang.String roleQueryConnector
          The static connector phrase for all RoleQuery processing
static java.lang.String roleQueryPreamble
          The static preamble for all RoleQuery processing
static java.lang.String systemStatusQueryConnector
          The static connector phrase for all SystemStatusQuery processing
static java.lang.String systemStatusQueryPreamble
          The static preamble for all SystemStatusQuery processing
static java.lang.String taskPhaseQueryConnector
          The static connector phrase for all TaskPhaseQuery processing
static java.lang.String taskPhaseQueryPreamble
          The static preamble for all TaskPhaseQuery processing
static java.lang.String taskQueryConnector
          The static connector phrase for all TaskQuery processing
static java.lang.String taskQueryPreamble
          The static preamble for all TaskQuery processing
static java.lang.String taskTypeQueryConnector
          The static connector phrase for all TaskTypeQuery processing
static java.lang.String taskTypeQueryPreamble
          The static preamble for all TaskTypeQuery processing
 
Constructor Summary
THD_QueryProcessor()
           
 
Method Summary
static void debug(org.sandev.basics.DataManager.DataManagerNode dm, java.lang.String text)
          Debug dump the given text
static org.sandev.TaskHeap.sandmessages.AccountCollection doAccountQuery(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.Connection conn, org.sandev.TaskHeap.sandmessages.AccountQuery query)
          Process a AccountQuery.
static org.sandev.TaskHeap.sandmessages.DataManagementCollection doDataManagementQuery(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.Connection conn, org.sandev.TaskHeap.sandmessages.DataManagementQuery query)
          Process a DataManagementQuery.
static org.sandev.TaskHeap.sandmessages.ExternalPlanCollection doExternalPlanQuery(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.Connection conn, org.sandev.TaskHeap.sandmessages.ExternalPlanQuery query)
          Process a ExternalPlanQuery.
static org.sandev.TaskHeap.sandmessages.HeapAssociationCollection doHeapAssociationQuery(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.Connection conn, org.sandev.TaskHeap.sandmessages.HeapAssociationQuery query)
          Process a HeapAssociationQuery.
static org.sandev.TaskHeap.sandmessages.HeapAttributesCollection doHeapAttributesQuery(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.Connection conn, org.sandev.TaskHeap.sandmessages.HeapAttributesQuery query)
          Process a HeapAttributesQuery.
static org.sandev.TaskHeap.sandmessages.PlanComponentCollection doPlanComponentQuery(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.Connection conn, org.sandev.TaskHeap.sandmessages.PlanComponentQuery query)
          Process a PlanComponentQuery.
static org.sandev.TaskHeap.sandmessages.PlanCollection doPlanQuery(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.Connection conn, org.sandev.TaskHeap.sandmessages.PlanQuery query)
          Process a PlanQuery.
static org.sandev.basics.structs.SandCollectionMessage doQuery(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.Connection conn, org.sandev.basics.structs.SandQueryMessage query)
          Process the specified query and return the result.
static org.sandev.TaskHeap.sandmessages.RoleCollection doRoleQuery(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.Connection conn, org.sandev.TaskHeap.sandmessages.RoleQuery query)
          Process a RoleQuery.
static org.sandev.TaskHeap.sandmessages.SystemStatusCollection doSystemStatusQuery(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.Connection conn, org.sandev.TaskHeap.sandmessages.SystemStatusQuery query)
          Process a SystemStatusQuery.
static org.sandev.TaskHeap.sandmessages.TaskPhaseCollection doTaskPhaseQuery(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.Connection conn, org.sandev.TaskHeap.sandmessages.TaskPhaseQuery query)
          Process a TaskPhaseQuery.
static org.sandev.TaskHeap.sandmessages.TaskCollection doTaskQuery(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.Connection conn, org.sandev.TaskHeap.sandmessages.TaskQuery query)
          Process a TaskQuery.
static org.sandev.TaskHeap.sandmessages.TaskTypeCollection doTaskTypeQuery(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.Connection conn, org.sandev.TaskHeap.sandmessages.TaskTypeQuery query)
          Process a TaskTypeQuery.
static java.lang.String formatNumber(double dbl)
          All numbers come out of the StreamTokenizer as a double value, which doesn't help for matching because looking for 1.0 when the field is an integer type is generally illegal.
static org.sandev.TaskHeap.sandmessages.AccountCollection getAccountCollection(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.ResultSet rs)
          Given a result set, return a AccountCollection for it.
static java.lang.String getAccountPrefixedAttr(java.lang.String attr)
          Prefix a Account attribute appropriately so that the resulting WHERE clause is unambiguous.
static void getAccountSQL(java.lang.StringBuffer buf, java.util.List list)
          Workhorse method for the general getAccountSQL method and subselect processing
static void getAccountSQL(java.lang.StringBuffer buf, java.util.List list, int orderSense, long uidAfter)
          Given a AccountQuery, return the SQL for it.
protected static java.lang.String getAggregateFunctionSQL(org.sandev.basics.structs.SandQueryMessage query)
          Return the select clause of the aggregate query, or null if anything is wrong.
static org.sandev.TaskHeap.sandmessages.DataManagementCollection getDataManagementCollection(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.ResultSet rs)
          Given a result set, return a DataManagementCollection for it.
static java.lang.String getDataManagementPrefixedAttr(java.lang.String attr)
          Prefix a DataManagement attribute appropriately so that the resulting WHERE clause is unambiguous.
static void getDataManagementSQL(java.lang.StringBuffer buf, java.util.List list)
          Workhorse method for the general getDataManagementSQL method and subselect processing
static void getDataManagementSQL(java.lang.StringBuffer buf, java.util.List list, int orderSense, long uidAfter)
          Given a DataManagementQuery, return the SQL for it.
static org.sandev.TaskHeap.sandmessages.ExternalPlanCollection getExternalPlanCollection(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.ResultSet rs)
          Given a result set, return a ExternalPlanCollection for it.
static java.lang.String getExternalPlanPrefixedAttr(java.lang.String attr)
          Prefix a ExternalPlan attribute appropriately so that the resulting WHERE clause is unambiguous.
static void getExternalPlanSQL(java.lang.StringBuffer buf, java.util.List list)
          Workhorse method for the general getExternalPlanSQL method and subselect processing
static void getExternalPlanSQL(java.lang.StringBuffer buf, java.util.List list, int orderSense, long uidAfter)
          Given a ExternalPlanQuery, return the SQL for it.
static org.sandev.TaskHeap.sandmessages.HeapAssociationCollection getHeapAssociationCollection(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.ResultSet rs)
          Given a result set, return a HeapAssociationCollection for it.
static java.lang.String getHeapAssociationPrefixedAttr(java.lang.String attr)
          Prefix a HeapAssociation attribute appropriately so that the resulting WHERE clause is unambiguous.
static void getHeapAssociationSQL(java.lang.StringBuffer buf, java.util.List list)
          Workhorse method for the general getHeapAssociationSQL method and subselect processing
static void getHeapAssociationSQL(java.lang.StringBuffer buf, java.util.List list, int orderSense, long uidAfter)
          Given a HeapAssociationQuery, return the SQL for it.
static org.sandev.TaskHeap.sandmessages.HeapAttributesCollection getHeapAttributesCollection(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.ResultSet rs)
          Given a result set, return a HeapAttributesCollection for it.
static java.lang.String getHeapAttributesPrefixedAttr(java.lang.String attr)
          Prefix a HeapAttributes attribute appropriately so that the resulting WHERE clause is unambiguous.
static void getHeapAttributesSQL(java.lang.StringBuffer buf, java.util.List list)
          Workhorse method for the general getHeapAttributesSQL method and subselect processing
static void getHeapAttributesSQL(java.lang.StringBuffer buf, java.util.List list, int orderSense, long uidAfter)
          Given a HeapAttributesQuery, return the SQL for it.
static org.sandev.TaskHeap.sandmessages.PlanCollection getPlanCollection(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.ResultSet rs)
          Given a result set, return a PlanCollection for it.
static org.sandev.TaskHeap.sandmessages.PlanComponentCollection getPlanComponentCollection(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.ResultSet rs)
          Given a result set, return a PlanComponentCollection for it.
static java.lang.String getPlanComponentPrefixedAttr(java.lang.String attr)
          Prefix a PlanComponent attribute appropriately so that the resulting WHERE clause is unambiguous.
static void getPlanComponentSQL(java.lang.StringBuffer buf, java.util.List list)
          Workhorse method for the general getPlanComponentSQL method and subselect processing
static void getPlanComponentSQL(java.lang.StringBuffer buf, java.util.List list, int orderSense, long uidAfter)
          Given a PlanComponentQuery, return the SQL for it.
static java.lang.String getPlanPrefixedAttr(java.lang.String attr)
          Prefix a Plan attribute appropriately so that the resulting WHERE clause is unambiguous.
static void getPlanSQL(java.lang.StringBuffer buf, java.util.List list)
          Workhorse method for the general getPlanSQL method and subselect processing
static void getPlanSQL(java.lang.StringBuffer buf, java.util.List list, int orderSense, long uidAfter)
          Given a PlanQuery, return the SQL for it.
static org.sandev.TaskHeap.sandmessages.RoleCollection getRoleCollection(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.ResultSet rs)
          Given a result set, return a RoleCollection for it.
static java.lang.String getRolePrefixedAttr(java.lang.String attr)
          Prefix a Role attribute appropriately so that the resulting WHERE clause is unambiguous.
static void getRoleSQL(java.lang.StringBuffer buf, java.util.List list)
          Workhorse method for the general getRoleSQL method and subselect processing
static void getRoleSQL(java.lang.StringBuffer buf, java.util.List list, int orderSense, long uidAfter)
          Given a RoleQuery, return the SQL for it.
protected static java.io.StreamTokenizer getStreamToker(java.io.BufferedReader in)
          Factored method to return a new StreamTokenizer
static org.sandev.TaskHeap.sandmessages.SystemStatusCollection getSystemStatusCollection(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.ResultSet rs)
          Given a result set, return a SystemStatusCollection for it.
static java.lang.String getSystemStatusPrefixedAttr(java.lang.String attr)
          Prefix a SystemStatus attribute appropriately so that the resulting WHERE clause is unambiguous.
static void getSystemStatusSQL(java.lang.StringBuffer buf, java.util.List list)
          Workhorse method for the general getSystemStatusSQL method and subselect processing
static void getSystemStatusSQL(java.lang.StringBuffer buf, java.util.List list, int orderSense, long uidAfter)
          Given a SystemStatusQuery, return the SQL for it.
static org.sandev.TaskHeap.sandmessages.TaskCollection getTaskCollection(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.ResultSet rs)
          Given a result set, return a TaskCollection for it.
static org.sandev.TaskHeap.sandmessages.TaskPhaseCollection getTaskPhaseCollection(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.ResultSet rs)
          Given a result set, return a TaskPhaseCollection for it.
static java.lang.String getTaskPhasePrefixedAttr(java.lang.String attr)
          Prefix a TaskPhase attribute appropriately so that the resulting WHERE clause is unambiguous.
static void getTaskPhaseSQL(java.lang.StringBuffer buf, java.util.List list)
          Workhorse method for the general getTaskPhaseSQL method and subselect processing
static void getTaskPhaseSQL(java.lang.StringBuffer buf, java.util.List list, int orderSense, long uidAfter)
          Given a TaskPhaseQuery, return the SQL for it.
static java.lang.String getTaskPrefixedAttr(java.lang.String attr)
          Prefix a Task attribute appropriately so that the resulting WHERE clause is unambiguous.
static void getTaskSQL(java.lang.StringBuffer buf, java.util.List list)
          Workhorse method for the general getTaskSQL method and subselect processing
static void getTaskSQL(java.lang.StringBuffer buf, java.util.List list, int orderSense, long uidAfter)
          Given a TaskQuery, return the SQL for it.
static org.sandev.TaskHeap.sandmessages.TaskTypeCollection getTaskTypeCollection(org.sandev.basics.DataManager.DataManagerNode dm, java.sql.ResultSet rs)
          Given a result set, return a TaskTypeCollection for it.
static java.lang.String getTaskTypePrefixedAttr(java.lang.String attr)
          Prefix a TaskType attribute appropriately so that the resulting WHERE clause is unambiguous.
static void getTaskTypeSQL(java.lang.StringBuffer buf, java.util.List list)
          Workhorse method for the general getTaskTypeSQL method and subselect processing
static void getTaskTypeSQL(java.lang.StringBuffer buf, java.util.List list, int orderSense, long uidAfter)
          Given a TaskTypeQuery, return the SQL for it.
protected static boolean handleClassSubselect(java.lang.String fieldspec, java.lang.StringBuffer buf, java.util.List clauses)
          For each entry in the clauses that specifies a class, create an appropriate subselect clause.
protected static long[] loadRefArray(java.lang.String tableName, java.lang.String parentField, java.lang.String childField, java.lang.String indexField, long parentID, java.sql.Connection conn)
          Given the name of the array relation, retrieve the child references.
static java.lang.String matchExprToSQL(java.lang.String attr, java.lang.String val)
          Setup for work
static java.lang.String matchExprToSQLWork(java.lang.String attr, java.io.StreamTokenizer st)
          Convert the specified expression into a SQL statement.
protected static void securityCheckValue(java.lang.String value)
          Make sure the given value isn't some kind of embedded SQL call trying to hack around in the db.
protected static void setFunctionResult(org.sandev.basics.structs.SandCollectionMessage coll, org.sandev.basics.structs.SandQueryMessage query, java.sql.ResultSet rs)
          Set the result field in the collection based on the fields from the query and the result we got back.
static java.lang.String wordquote(java.lang.String word)
          This method would still be necessary if we were using the parameter substitution in a prepared statement.
protected static boolean writeClassSubselect(java.lang.String fieldspec, java.lang.StringBuffer buf, java.lang.String classname, java.util.List subclause)
          Write a subselect for the given class, matching on the attribute and value specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

accountQueryPreamble

public static final java.lang.String accountQueryPreamble
The static preamble for all AccountQuery processing

See Also:
Constant Field Values

accountQueryConnector

public static final java.lang.String accountQueryConnector
The static connector phrase for all AccountQuery processing

See Also:
Constant Field Values

dataManagementQueryPreamble

public static final java.lang.String dataManagementQueryPreamble
The static preamble for all DataManagementQuery processing

See Also:
Constant Field Values

dataManagementQueryConnector

public static final java.lang.String dataManagementQueryConnector
The static connector phrase for all DataManagementQuery processing

See Also:
Constant Field Values

externalPlanQueryPreamble

public static final java.lang.String externalPlanQueryPreamble
The static preamble for all ExternalPlanQuery processing

See Also:
Constant Field Values

externalPlanQueryConnector

public static final java.lang.String externalPlanQueryConnector
The static connector phrase for all ExternalPlanQuery processing

See Also:
Constant Field Values

heapAssociationQueryPreamble

public static final java.lang.String heapAssociationQueryPreamble
The static preamble for all HeapAssociationQuery processing

See Also:
Constant Field Values

heapAssociationQueryConnector

public static final java.lang.String heapAssociationQueryConnector
The static connector phrase for all HeapAssociationQuery processing

See Also:
Constant Field Values

heapAttributesQueryPreamble

public static final java.lang.String heapAttributesQueryPreamble
The static preamble for all HeapAttributesQuery processing

See Also:
Constant Field Values

heapAttributesQueryConnector

public static final java.lang.String heapAttributesQueryConnector
The static connector phrase for all HeapAttributesQuery processing

See Also:
Constant Field Values

planComponentQueryPreamble

public static final java.lang.String planComponentQueryPreamble
The static preamble for all PlanComponentQuery processing

See Also:
Constant Field Values

planComponentQueryConnector

public static final java.lang.String planComponentQueryConnector
The static connector phrase for all PlanComponentQuery processing

See Also:
Constant Field Values

planQueryPreamble

public static final java.lang.String planQueryPreamble
The static preamble for all PlanQuery processing

See Also:
Constant Field Values

planQueryConnector

public static final java.lang.String planQueryConnector
The static connector phrase for all PlanQuery processing

See Also:
Constant Field Values

roleQueryPreamble

public static final java.lang.String roleQueryPreamble
The static preamble for all RoleQuery processing

See Also:
Constant Field Values

roleQueryConnector

public static final java.lang.String roleQueryConnector
The static connector phrase for all RoleQuery processing

See Also:
Constant Field Values

systemStatusQueryPreamble

public static final java.lang.String systemStatusQueryPreamble
The static preamble for all SystemStatusQuery processing

See Also:
Constant Field Values

systemStatusQueryConnector

public static final java.lang.String systemStatusQueryConnector
The static connector phrase for all SystemStatusQuery processing

See Also:
Constant Field Values

taskPhaseQueryPreamble

public static final java.lang.String taskPhaseQueryPreamble
The static preamble for all TaskPhaseQuery processing

See Also:
Constant Field Values

taskPhaseQueryConnector

public static final java.lang.String taskPhaseQueryConnector
The static connector phrase for all TaskPhaseQuery processing

See Also:
Constant Field Values

taskQueryPreamble

public static final java.lang.String taskQueryPreamble
The static preamble for all TaskQuery processing

See Also:
Constant Field Values

taskQueryConnector

public static final java.lang.String taskQueryConnector
The static connector phrase for all TaskQuery processing

See Also:
Constant Field Values

taskTypeQueryPreamble

public static final java.lang.String taskTypeQueryPreamble
The static preamble for all TaskTypeQuery processing

See Also:
Constant Field Values

taskTypeQueryConnector

public static final java.lang.String taskTypeQueryConnector
The static connector phrase for all TaskTypeQuery processing

See Also:
Constant Field Values
Constructor Detail

THD_QueryProcessor

public THD_QueryProcessor()
Method Detail

doQuery

public static org.sandev.basics.structs.SandCollectionMessage doQuery(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                      java.sql.Connection conn,
                                                                      org.sandev.basics.structs.SandQueryMessage query)
                                                               throws java.sql.SQLException
Process the specified query and return the result.

Throws:
java.sql.SQLException

doAccountQuery

public static org.sandev.TaskHeap.sandmessages.AccountCollection doAccountQuery(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                java.sql.Connection conn,
                                                                                org.sandev.TaskHeap.sandmessages.AccountQuery query)
                                                                         throws java.sql.SQLException
Process a AccountQuery. If ORDER BY is not specified, then the default ordering is by uniqueID. Each query contains two tests for the uniqueID key: the first checks it is greater than zero, which serves as an anchor test for subsequent join restrictions. The second test implements the uniqueIDAfter restriction as specified in the query. For dataset pagination to work, we need to return one more row than what was asked for in getMaxReturn for the query. Otherwise the pagination code won't know there is more data available. Support for query limiting varies, so we set the max both in the statement object parameter, and in the SQL itself. Just setting this in the statement object is not generally reliable. SQL query limitation is accomplished via trailing LIMIT N.

Throws:
java.sql.SQLException

getAccountSQL

public static void getAccountSQL(java.lang.StringBuffer buf,
                                 java.util.List list,
                                 int orderSense,
                                 long uidAfter)
                          throws java.sql.SQLException
Given a AccountQuery, return the SQL for it. The generated SQL is appended to the provided StringBuffer, the input match expressions for processing are contained in the sorted map. The attribute comparisons are case sensitive, the assumption is that these are generated from forms, so they should be consistent.

Throws:
java.sql.SQLException

getAccountSQL

public static void getAccountSQL(java.lang.StringBuffer buf,
                                 java.util.List list)
                          throws java.sql.SQLException
Workhorse method for the general getAccountSQL method and subselect processing

Throws:
java.sql.SQLException

getAccountPrefixedAttr

public static java.lang.String getAccountPrefixedAttr(java.lang.String attr)
Prefix a Account attribute appropriately so that the resulting WHERE clause is unambiguous. Inheritance hierarchy: BaseUserStruct AccountStruct


getAccountCollection

public static org.sandev.TaskHeap.sandmessages.AccountCollection getAccountCollection(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                      java.sql.ResultSet rs)
                                                                               throws java.sql.SQLException
Given a result set, return a AccountCollection for it. Note that reference arrays are NOT filled in here.

Throws:
java.sql.SQLException

doDataManagementQuery

public static org.sandev.TaskHeap.sandmessages.DataManagementCollection doDataManagementQuery(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                              java.sql.Connection conn,
                                                                                              org.sandev.TaskHeap.sandmessages.DataManagementQuery query)
                                                                                       throws java.sql.SQLException
Process a DataManagementQuery. If ORDER BY is not specified, then the default ordering is by uniqueID. Each query contains two tests for the uniqueID key: the first checks it is greater than zero, which serves as an anchor test for subsequent join restrictions. The second test implements the uniqueIDAfter restriction as specified in the query. For dataset pagination to work, we need to return one more row than what was asked for in getMaxReturn for the query. Otherwise the pagination code won't know there is more data available. Support for query limiting varies, so we set the max both in the statement object parameter, and in the SQL itself. Just setting this in the statement object is not generally reliable. SQL query limitation is accomplished via trailing LIMIT N.

Throws:
java.sql.SQLException

getDataManagementSQL

public static void getDataManagementSQL(java.lang.StringBuffer buf,
                                        java.util.List list,
                                        int orderSense,
                                        long uidAfter)
                                 throws java.sql.SQLException
Given a DataManagementQuery, return the SQL for it. The generated SQL is appended to the provided StringBuffer, the input match expressions for processing are contained in the sorted map. The attribute comparisons are case sensitive, the assumption is that these are generated from forms, so they should be consistent.

Throws:
java.sql.SQLException

getDataManagementSQL

public static void getDataManagementSQL(java.lang.StringBuffer buf,
                                        java.util.List list)
                                 throws java.sql.SQLException
Workhorse method for the general getDataManagementSQL method and subselect processing

Throws:
java.sql.SQLException

getDataManagementPrefixedAttr

public static java.lang.String getDataManagementPrefixedAttr(java.lang.String attr)
Prefix a DataManagement attribute appropriately so that the resulting WHERE clause is unambiguous. Inheritance hierarchy: DataManagementStruct


getDataManagementCollection

public static org.sandev.TaskHeap.sandmessages.DataManagementCollection getDataManagementCollection(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                                    java.sql.ResultSet rs)
                                                                                             throws java.sql.SQLException
Given a result set, return a DataManagementCollection for it. Note that reference arrays are NOT filled in here.

Throws:
java.sql.SQLException

doExternalPlanQuery

public static org.sandev.TaskHeap.sandmessages.ExternalPlanCollection doExternalPlanQuery(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                          java.sql.Connection conn,
                                                                                          org.sandev.TaskHeap.sandmessages.ExternalPlanQuery query)
                                                                                   throws java.sql.SQLException
Process a ExternalPlanQuery. If ORDER BY is not specified, then the default ordering is by uniqueID. Each query contains two tests for the uniqueID key: the first checks it is greater than zero, which serves as an anchor test for subsequent join restrictions. The second test implements the uniqueIDAfter restriction as specified in the query. For dataset pagination to work, we need to return one more row than what was asked for in getMaxReturn for the query. Otherwise the pagination code won't know there is more data available. Support for query limiting varies, so we set the max both in the statement object parameter, and in the SQL itself. Just setting this in the statement object is not generally reliable. SQL query limitation is accomplished via trailing LIMIT N.

Throws:
java.sql.SQLException

getExternalPlanSQL

public static void getExternalPlanSQL(java.lang.StringBuffer buf,
                                      java.util.List list,
                                      int orderSense,
                                      long uidAfter)
                               throws java.sql.SQLException
Given a ExternalPlanQuery, return the SQL for it. The generated SQL is appended to the provided StringBuffer, the input match expressions for processing are contained in the sorted map. The attribute comparisons are case sensitive, the assumption is that these are generated from forms, so they should be consistent.

Throws:
java.sql.SQLException

getExternalPlanSQL

public static void getExternalPlanSQL(java.lang.StringBuffer buf,
                                      java.util.List list)
                               throws java.sql.SQLException
Workhorse method for the general getExternalPlanSQL method and subselect processing

Throws:
java.sql.SQLException

getExternalPlanPrefixedAttr

public static java.lang.String getExternalPlanPrefixedAttr(java.lang.String attr)
Prefix a ExternalPlan attribute appropriately so that the resulting WHERE clause is unambiguous. Inheritance hierarchy: PlanComponentStruct ExternalPlanStruct


getExternalPlanCollection

public static org.sandev.TaskHeap.sandmessages.ExternalPlanCollection getExternalPlanCollection(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                                java.sql.ResultSet rs)
                                                                                         throws java.sql.SQLException
Given a result set, return a ExternalPlanCollection for it. Note that reference arrays are NOT filled in here.

Throws:
java.sql.SQLException

doHeapAssociationQuery

public static org.sandev.TaskHeap.sandmessages.HeapAssociationCollection doHeapAssociationQuery(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                                java.sql.Connection conn,
                                                                                                org.sandev.TaskHeap.sandmessages.HeapAssociationQuery query)
                                                                                         throws java.sql.SQLException
Process a HeapAssociationQuery. If ORDER BY is not specified, then the default ordering is by uniqueID. Each query contains two tests for the uniqueID key: the first checks it is greater than zero, which serves as an anchor test for subsequent join restrictions. The second test implements the uniqueIDAfter restriction as specified in the query. For dataset pagination to work, we need to return one more row than what was asked for in getMaxReturn for the query. Otherwise the pagination code won't know there is more data available. Support for query limiting varies, so we set the max both in the statement object parameter, and in the SQL itself. Just setting this in the statement object is not generally reliable. SQL query limitation is accomplished via trailing LIMIT N.

Throws:
java.sql.SQLException

getHeapAssociationSQL

public static void getHeapAssociationSQL(java.lang.StringBuffer buf,
                                         java.util.List list,
                                         int orderSense,
                                         long uidAfter)
                                  throws java.sql.SQLException
Given a HeapAssociationQuery, return the SQL for it. The generated SQL is appended to the provided StringBuffer, the input match expressions for processing are contained in the sorted map. The attribute comparisons are case sensitive, the assumption is that these are generated from forms, so they should be consistent.

Throws:
java.sql.SQLException

getHeapAssociationSQL

public static void getHeapAssociationSQL(java.lang.StringBuffer buf,
                                         java.util.List list)
                                  throws java.sql.SQLException
Workhorse method for the general getHeapAssociationSQL method and subselect processing

Throws:
java.sql.SQLException

getHeapAssociationPrefixedAttr

public static java.lang.String getHeapAssociationPrefixedAttr(java.lang.String attr)
Prefix a HeapAssociation attribute appropriately so that the resulting WHERE clause is unambiguous. Inheritance hierarchy: HeapAssociationStruct


getHeapAssociationCollection

public static org.sandev.TaskHeap.sandmessages.HeapAssociationCollection getHeapAssociationCollection(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                                      java.sql.ResultSet rs)
                                                                                               throws java.sql.SQLException
Given a result set, return a HeapAssociationCollection for it. Note that reference arrays are NOT filled in here.

Throws:
java.sql.SQLException

doHeapAttributesQuery

public static org.sandev.TaskHeap.sandmessages.HeapAttributesCollection doHeapAttributesQuery(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                              java.sql.Connection conn,
                                                                                              org.sandev.TaskHeap.sandmessages.HeapAttributesQuery query)
                                                                                       throws java.sql.SQLException
Process a HeapAttributesQuery. If ORDER BY is not specified, then the default ordering is by uniqueID. Each query contains two tests for the uniqueID key: the first checks it is greater than zero, which serves as an anchor test for subsequent join restrictions. The second test implements the uniqueIDAfter restriction as specified in the query. For dataset pagination to work, we need to return one more row than what was asked for in getMaxReturn for the query. Otherwise the pagination code won't know there is more data available. Support for query limiting varies, so we set the max both in the statement object parameter, and in the SQL itself. Just setting this in the statement object is not generally reliable. SQL query limitation is accomplished via trailing LIMIT N.

Throws:
java.sql.SQLException

getHeapAttributesSQL

public static void getHeapAttributesSQL(java.lang.StringBuffer buf,
                                        java.util.List list,
                                        int orderSense,
                                        long uidAfter)
                                 throws java.sql.SQLException
Given a HeapAttributesQuery, return the SQL for it. The generated SQL is appended to the provided StringBuffer, the input match expressions for processing are contained in the sorted map. The attribute comparisons are case sensitive, the assumption is that these are generated from forms, so they should be consistent.

Throws:
java.sql.SQLException

getHeapAttributesSQL

public static void getHeapAttributesSQL(java.lang.StringBuffer buf,
                                        java.util.List list)
                                 throws java.sql.SQLException
Workhorse method for the general getHeapAttributesSQL method and subselect processing

Throws:
java.sql.SQLException

getHeapAttributesPrefixedAttr

public static java.lang.String getHeapAttributesPrefixedAttr(java.lang.String attr)
Prefix a HeapAttributes attribute appropriately so that the resulting WHERE clause is unambiguous. Inheritance hierarchy: HeapAttributesStruct


getHeapAttributesCollection

public static org.sandev.TaskHeap.sandmessages.HeapAttributesCollection getHeapAttributesCollection(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                                    java.sql.ResultSet rs)
                                                                                             throws java.sql.SQLException
Given a result set, return a HeapAttributesCollection for it. Note that reference arrays are NOT filled in here.

Throws:
java.sql.SQLException

doPlanComponentQuery

public static org.sandev.TaskHeap.sandmessages.PlanComponentCollection doPlanComponentQuery(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                            java.sql.Connection conn,
                                                                                            org.sandev.TaskHeap.sandmessages.PlanComponentQuery query)
                                                                                     throws java.sql.SQLException
Process a PlanComponentQuery. If ORDER BY is not specified, then the default ordering is by uniqueID. Each query contains two tests for the uniqueID key: the first checks it is greater than zero, which serves as an anchor test for subsequent join restrictions. The second test implements the uniqueIDAfter restriction as specified in the query. For dataset pagination to work, we need to return one more row than what was asked for in getMaxReturn for the query. Otherwise the pagination code won't know there is more data available. Support for query limiting varies, so we set the max both in the statement object parameter, and in the SQL itself. Just setting this in the statement object is not generally reliable. SQL query limitation is accomplished via trailing LIMIT N.

Throws:
java.sql.SQLException

getPlanComponentSQL

public static void getPlanComponentSQL(java.lang.StringBuffer buf,
                                       java.util.List list,
                                       int orderSense,
                                       long uidAfter)
                                throws java.sql.SQLException
Given a PlanComponentQuery, return the SQL for it. The generated SQL is appended to the provided StringBuffer, the input match expressions for processing are contained in the sorted map. The attribute comparisons are case sensitive, the assumption is that these are generated from forms, so they should be consistent.

Throws:
java.sql.SQLException

getPlanComponentSQL

public static void getPlanComponentSQL(java.lang.StringBuffer buf,
                                       java.util.List list)
                                throws java.sql.SQLException
Workhorse method for the general getPlanComponentSQL method and subselect processing

Throws:
java.sql.SQLException

getPlanComponentPrefixedAttr

public static java.lang.String getPlanComponentPrefixedAttr(java.lang.String attr)
Prefix a PlanComponent attribute appropriately so that the resulting WHERE clause is unambiguous. Inheritance hierarchy: PlanComponentStruct


getPlanComponentCollection

public static org.sandev.TaskHeap.sandmessages.PlanComponentCollection getPlanComponentCollection(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                                  java.sql.ResultSet rs)
                                                                                           throws java.sql.SQLException
Given a result set, return a PlanComponentCollection for it. Note that reference arrays are NOT filled in here.

Throws:
java.sql.SQLException

doPlanQuery

public static org.sandev.TaskHeap.sandmessages.PlanCollection doPlanQuery(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                          java.sql.Connection conn,
                                                                          org.sandev.TaskHeap.sandmessages.PlanQuery query)
                                                                   throws java.sql.SQLException
Process a PlanQuery. If ORDER BY is not specified, then the default ordering is by uniqueID. Each query contains two tests for the uniqueID key: the first checks it is greater than zero, which serves as an anchor test for subsequent join restrictions. The second test implements the uniqueIDAfter restriction as specified in the query. For dataset pagination to work, we need to return one more row than what was asked for in getMaxReturn for the query. Otherwise the pagination code won't know there is more data available. Support for query limiting varies, so we set the max both in the statement object parameter, and in the SQL itself. Just setting this in the statement object is not generally reliable. SQL query limitation is accomplished via trailing LIMIT N.

Throws:
java.sql.SQLException

getPlanSQL

public static void getPlanSQL(java.lang.StringBuffer buf,
                              java.util.List list,
                              int orderSense,
                              long uidAfter)
                       throws java.sql.SQLException
Given a PlanQuery, return the SQL for it. The generated SQL is appended to the provided StringBuffer, the input match expressions for processing are contained in the sorted map. The attribute comparisons are case sensitive, the assumption is that these are generated from forms, so they should be consistent.

Throws:
java.sql.SQLException

getPlanSQL

public static void getPlanSQL(java.lang.StringBuffer buf,
                              java.util.List list)
                       throws java.sql.SQLException
Workhorse method for the general getPlanSQL method and subselect processing

Throws:
java.sql.SQLException

getPlanPrefixedAttr

public static java.lang.String getPlanPrefixedAttr(java.lang.String attr)
Prefix a Plan attribute appropriately so that the resulting WHERE clause is unambiguous. Inheritance hierarchy: PlanComponentStruct PlanStruct


getPlanCollection

public static org.sandev.TaskHeap.sandmessages.PlanCollection getPlanCollection(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                java.sql.ResultSet rs)
                                                                         throws java.sql.SQLException
Given a result set, return a PlanCollection for it. Note that reference arrays are NOT filled in here.

Throws:
java.sql.SQLException

doRoleQuery

public static org.sandev.TaskHeap.sandmessages.RoleCollection doRoleQuery(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                          java.sql.Connection conn,
                                                                          org.sandev.TaskHeap.sandmessages.RoleQuery query)
                                                                   throws java.sql.SQLException
Process a RoleQuery. If ORDER BY is not specified, then the default ordering is by uniqueID. Each query contains two tests for the uniqueID key: the first checks it is greater than zero, which serves as an anchor test for subsequent join restrictions. The second test implements the uniqueIDAfter restriction as specified in the query. For dataset pagination to work, we need to return one more row than what was asked for in getMaxReturn for the query. Otherwise the pagination code won't know there is more data available. Support for query limiting varies, so we set the max both in the statement object parameter, and in the SQL itself. Just setting this in the statement object is not generally reliable. SQL query limitation is accomplished via trailing LIMIT N.

Throws:
java.sql.SQLException

getRoleSQL

public static void getRoleSQL(java.lang.StringBuffer buf,
                              java.util.List list,
                              int orderSense,
                              long uidAfter)
                       throws java.sql.SQLException
Given a RoleQuery, return the SQL for it. The generated SQL is appended to the provided StringBuffer, the input match expressions for processing are contained in the sorted map. The attribute comparisons are case sensitive, the assumption is that these are generated from forms, so they should be consistent.

Throws:
java.sql.SQLException

getRoleSQL

public static void getRoleSQL(java.lang.StringBuffer buf,
                              java.util.List list)
                       throws java.sql.SQLException
Workhorse method for the general getRoleSQL method and subselect processing

Throws:
java.sql.SQLException

getRolePrefixedAttr

public static java.lang.String getRolePrefixedAttr(java.lang.String attr)
Prefix a Role attribute appropriately so that the resulting WHERE clause is unambiguous. Inheritance hierarchy: RoleStruct


getRoleCollection

public static org.sandev.TaskHeap.sandmessages.RoleCollection getRoleCollection(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                java.sql.ResultSet rs)
                                                                         throws java.sql.SQLException
Given a result set, return a RoleCollection for it. Note that reference arrays are NOT filled in here.

Throws:
java.sql.SQLException

doSystemStatusQuery

public static org.sandev.TaskHeap.sandmessages.SystemStatusCollection doSystemStatusQuery(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                          java.sql.Connection conn,
                                                                                          org.sandev.TaskHeap.sandmessages.SystemStatusQuery query)
                                                                                   throws java.sql.SQLException
Process a SystemStatusQuery. If ORDER BY is not specified, then the default ordering is by uniqueID. Each query contains two tests for the uniqueID key: the first checks it is greater than zero, which serves as an anchor test for subsequent join restrictions. The second test implements the uniqueIDAfter restriction as specified in the query. For dataset pagination to work, we need to return one more row than what was asked for in getMaxReturn for the query. Otherwise the pagination code won't know there is more data available. Support for query limiting varies, so we set the max both in the statement object parameter, and in the SQL itself. Just setting this in the statement object is not generally reliable. SQL query limitation is accomplished via trailing LIMIT N.

Throws:
java.sql.SQLException

getSystemStatusSQL

public static void getSystemStatusSQL(java.lang.StringBuffer buf,
                                      java.util.List list,
                                      int orderSense,
                                      long uidAfter)
                               throws java.sql.SQLException
Given a SystemStatusQuery, return the SQL for it. The generated SQL is appended to the provided StringBuffer, the input match expressions for processing are contained in the sorted map. The attribute comparisons are case sensitive, the assumption is that these are generated from forms, so they should be consistent.

Throws:
java.sql.SQLException

getSystemStatusSQL

public static void getSystemStatusSQL(java.lang.StringBuffer buf,
                                      java.util.List list)
                               throws java.sql.SQLException
Workhorse method for the general getSystemStatusSQL method and subselect processing

Throws:
java.sql.SQLException

getSystemStatusPrefixedAttr

public static java.lang.String getSystemStatusPrefixedAttr(java.lang.String attr)
Prefix a SystemStatus attribute appropriately so that the resulting WHERE clause is unambiguous. Inheritance hierarchy: SystemStatusStruct


getSystemStatusCollection

public static org.sandev.TaskHeap.sandmessages.SystemStatusCollection getSystemStatusCollection(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                                java.sql.ResultSet rs)
                                                                                         throws java.sql.SQLException
Given a result set, return a SystemStatusCollection for it. Note that reference arrays are NOT filled in here.

Throws:
java.sql.SQLException

doTaskPhaseQuery

public static org.sandev.TaskHeap.sandmessages.TaskPhaseCollection doTaskPhaseQuery(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                    java.sql.Connection conn,
                                                                                    org.sandev.TaskHeap.sandmessages.TaskPhaseQuery query)
                                                                             throws java.sql.SQLException
Process a TaskPhaseQuery. If ORDER BY is not specified, then the default ordering is by uniqueID. Each query contains two tests for the uniqueID key: the first checks it is greater than zero, which serves as an anchor test for subsequent join restrictions. The second test implements the uniqueIDAfter restriction as specified in the query. For dataset pagination to work, we need to return one more row than what was asked for in getMaxReturn for the query. Otherwise the pagination code won't know there is more data available. Support for query limiting varies, so we set the max both in the statement object parameter, and in the SQL itself. Just setting this in the statement object is not generally reliable. SQL query limitation is accomplished via trailing LIMIT N.

Throws:
java.sql.SQLException

getTaskPhaseSQL

public static void getTaskPhaseSQL(java.lang.StringBuffer buf,
                                   java.util.List list,
                                   int orderSense,
                                   long uidAfter)
                            throws java.sql.SQLException
Given a TaskPhaseQuery, return the SQL for it. The generated SQL is appended to the provided StringBuffer, the input match expressions for processing are contained in the sorted map. The attribute comparisons are case sensitive, the assumption is that these are generated from forms, so they should be consistent.

Throws:
java.sql.SQLException

getTaskPhaseSQL

public static void getTaskPhaseSQL(java.lang.StringBuffer buf,
                                   java.util.List list)
                            throws java.sql.SQLException
Workhorse method for the general getTaskPhaseSQL method and subselect processing

Throws:
java.sql.SQLException

getTaskPhasePrefixedAttr

public static java.lang.String getTaskPhasePrefixedAttr(java.lang.String attr)
Prefix a TaskPhase attribute appropriately so that the resulting WHERE clause is unambiguous. Inheritance hierarchy: TaskPhaseStruct


getTaskPhaseCollection

public static org.sandev.TaskHeap.sandmessages.TaskPhaseCollection getTaskPhaseCollection(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                          java.sql.ResultSet rs)
                                                                                   throws java.sql.SQLException
Given a result set, return a TaskPhaseCollection for it. Note that reference arrays are NOT filled in here.

Throws:
java.sql.SQLException

doTaskQuery

public static org.sandev.TaskHeap.sandmessages.TaskCollection doTaskQuery(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                          java.sql.Connection conn,
                                                                          org.sandev.TaskHeap.sandmessages.TaskQuery query)
                                                                   throws java.sql.SQLException
Process a TaskQuery. If ORDER BY is not specified, then the default ordering is by uniqueID. Each query contains two tests for the uniqueID key: the first checks it is greater than zero, which serves as an anchor test for subsequent join restrictions. The second test implements the uniqueIDAfter restriction as specified in the query. For dataset pagination to work, we need to return one more row than what was asked for in getMaxReturn for the query. Otherwise the pagination code won't know there is more data available. Support for query limiting varies, so we set the max both in the statement object parameter, and in the SQL itself. Just setting this in the statement object is not generally reliable. SQL query limitation is accomplished via trailing LIMIT N.

Throws:
java.sql.SQLException

getTaskSQL

public static void getTaskSQL(java.lang.StringBuffer buf,
                              java.util.List list,
                              int orderSense,
                              long uidAfter)
                       throws java.sql.SQLException
Given a TaskQuery, return the SQL for it. The generated SQL is appended to the provided StringBuffer, the input match expressions for processing are contained in the sorted map. The attribute comparisons are case sensitive, the assumption is that these are generated from forms, so they should be consistent.

Throws:
java.sql.SQLException

getTaskSQL

public static void getTaskSQL(java.lang.StringBuffer buf,
                              java.util.List list)
                       throws java.sql.SQLException
Workhorse method for the general getTaskSQL method and subselect processing

Throws:
java.sql.SQLException

getTaskPrefixedAttr

public static java.lang.String getTaskPrefixedAttr(java.lang.String attr)
Prefix a Task attribute appropriately so that the resulting WHERE clause is unambiguous. Inheritance hierarchy: PlanComponentStruct TaskStruct


getTaskCollection

public static org.sandev.TaskHeap.sandmessages.TaskCollection getTaskCollection(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                java.sql.ResultSet rs)
                                                                         throws java.sql.SQLException
Given a result set, return a TaskCollection for it. Note that reference arrays are NOT filled in here.

Throws:
java.sql.SQLException

doTaskTypeQuery

public static org.sandev.TaskHeap.sandmessages.TaskTypeCollection doTaskTypeQuery(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                  java.sql.Connection conn,
                                                                                  org.sandev.TaskHeap.sandmessages.TaskTypeQuery query)
                                                                           throws java.sql.SQLException
Process a TaskTypeQuery. If ORDER BY is not specified, then the default ordering is by uniqueID. Each query contains two tests for the uniqueID key: the first checks it is greater than zero, which serves as an anchor test for subsequent join restrictions. The second test implements the uniqueIDAfter restriction as specified in the query. For dataset pagination to work, we need to return one more row than what was asked for in getMaxReturn for the query. Otherwise the pagination code won't know there is more data available. Support for query limiting varies, so we set the max both in the statement object parameter, and in the SQL itself. Just setting this in the statement object is not generally reliable. SQL query limitation is accomplished via trailing LIMIT N.

Throws:
java.sql.SQLException

getTaskTypeSQL

public static void getTaskTypeSQL(java.lang.StringBuffer buf,
                                  java.util.List list,
                                  int orderSense,
                                  long uidAfter)
                           throws java.sql.SQLException
Given a TaskTypeQuery, return the SQL for it. The generated SQL is appended to the provided StringBuffer, the input match expressions for processing are contained in the sorted map. The attribute comparisons are case sensitive, the assumption is that these are generated from forms, so they should be consistent.

Throws:
java.sql.SQLException

getTaskTypeSQL

public static void getTaskTypeSQL(java.lang.StringBuffer buf,
                                  java.util.List list)
                           throws java.sql.SQLException
Workhorse method for the general getTaskTypeSQL method and subselect processing

Throws:
java.sql.SQLException

getTaskTypePrefixedAttr

public static java.lang.String getTaskTypePrefixedAttr(java.lang.String attr)
Prefix a TaskType attribute appropriately so that the resulting WHERE clause is unambiguous. Inheritance hierarchy: TaskTypeStruct


getTaskTypeCollection

public static org.sandev.TaskHeap.sandmessages.TaskTypeCollection getTaskTypeCollection(org.sandev.basics.DataManager.DataManagerNode dm,
                                                                                        java.sql.ResultSet rs)
                                                                                 throws java.sql.SQLException
Given a result set, return a TaskTypeCollection for it. Note that reference arrays are NOT filled in here.

Throws:
java.sql.SQLException

handleClassSubselect

protected static boolean handleClassSubselect(java.lang.String fieldspec,
                                              java.lang.StringBuffer buf,
                                              java.util.List clauses)
                                       throws java.sql.SQLException
For each entry in the clauses that specifies a class, create an appropriate subselect clause. This method might want to combine multiple clauses with the same prefix, but for now it does each one individually. That may be less efficient, but at least multiple level traversal should work correctly. The specified class clauses are removed from the sorted map, so anything remaining in the map is processed normally.

If FooStruct has-a BarStruct reference mybar, and BazStruct extends BarStruct adding an int field called age, then you can query for Foos having a Baz with age > 18 with FooQuery matchInfo like:

This will probably become a standard part of the match expression, and we'll update the SandQueryMessage description to mention it. For now we want to give this some time before that to make sure it is the right solution. There are security implications here also which should be mentioned in the AuthFilter.messageInstanceAccess description. What classes can be specified explicitely under what circumstances should be authorized.

This method returns true if a subselect was written, false otherwise. This is to allow the caller to handle AND conjunctions in the total SQL being produced.

Throws:
java.sql.SQLException

writeClassSubselect

protected static boolean writeClassSubselect(java.lang.String fieldspec,
                                             java.lang.StringBuffer buf,
                                             java.lang.String classname,
                                             java.util.List subclause)
                                      throws java.sql.SQLException
Write a subselect for the given class, matching on the attribute and value specified. Return true if any SQL was written, false otherwise.

Throws:
java.sql.SQLException

loadRefArray

protected static long[] loadRefArray(java.lang.String tableName,
                                     java.lang.String parentField,
                                     java.lang.String childField,
                                     java.lang.String indexField,
                                     long parentID,
                                     java.sql.Connection conn)
                              throws java.sql.SQLException
Given the name of the array relation, retrieve the child references.

Throws:
java.sql.SQLException

getStreamToker

protected static java.io.StreamTokenizer getStreamToker(java.io.BufferedReader in)
Factored method to return a new StreamTokenizer


matchExprToSQL

public static java.lang.String matchExprToSQL(java.lang.String attr,
                                              java.lang.String val)
                                       throws java.sql.SQLException
Setup for work

Throws:
java.sql.SQLException

wordquote

public static java.lang.String wordquote(java.lang.String word)
This method would still be necessary if we were using the parameter substitution in a prepared statement. The problem is that when a user fills out the match expression in a form, they may or may not quote the string values. We are supposed to get expressions that are appropriately quoted, but some minimal defensive triage here is a good thing.


formatNumber

public static java.lang.String formatNumber(double dbl)
All numbers come out of the StreamTokenizer as a double value, which doesn't help for matching because looking for 1.0 when the field is an integer type is generally illegal. So we have to strip the trailing ".0" in this case.


matchExprToSQLWork

public static java.lang.String matchExprToSQLWork(java.lang.String attr,
                                                  java.io.StreamTokenizer st)
                                           throws java.io.IOException
Convert the specified expression into a SQL statement. The idea here is to perform the conversion using only basic syntactic manipulation (and not writing a whole interpretive cross compiler). Essentially we go through the value String and prepend the attr to each of the base operators. So for example:
     >= 0 AND <= 12
 
turns into
     attr >= 0 AND attr <= 12
 

The operators we pick up on are <, <=, >, >=, =, !=

That means that '<', '>', are potential prefixes, '!' is always a prefix, '=' is always a terminal, and a word is always a terminal. If only a value is given, then operator = is assumed. This only has to support cases where only a value is given.

Throws:
java.io.IOException

securityCheckValue

protected static void securityCheckValue(java.lang.String value)
                                  throws java.sql.SQLException
Make sure the given value isn't some kind of embedded SQL call trying to hack around in the db. The account used to access the database must also be appropriately restricted.

Throws:
java.sql.SQLException

getAggregateFunctionSQL

protected static java.lang.String getAggregateFunctionSQL(org.sandev.basics.structs.SandQueryMessage query)
Return the select clause of the aggregate query, or null if anything is wrong.


setFunctionResult

protected static void setFunctionResult(org.sandev.basics.structs.SandCollectionMessage coll,
                                        org.sandev.basics.structs.SandQueryMessage query,
                                        java.sql.ResultSet rs)
                                 throws java.sql.SQLException
Set the result field in the collection based on the fields from the query and the result we got back.

Throws:
java.sql.SQLException

debug

public static void debug(org.sandev.basics.DataManager.DataManagerNode dm,
                         java.lang.String text)
Debug dump the given text