org.cofax.cms
Class CofaxToolsDbUtils


java.lang.Object

  |

  +--org.cofax.cms.CofaxToolsDbUtils


public class CofaxToolsDbUtils
extends java.lang.Object

CofaxDbUtils: Collection of database results formatting utilities for Cofax Tools. All calls function through getPackageData, but return results fornatted in different collection objects.

Author:
Charles Harvey, Karl Martino

Constructor Summary
CofaxToolsDbUtils()
           
 
Method Summary
static java.lang.String fillTag(DataStore db, java.lang.String tag)
          Returns a package tag unfulfilled from memory
static java.util.HashMap getNameValuePackageHash(DataStore db, java.util.HashMap ht, java.lang.String tagStatement)
          Returns a HashMap formatted name / value by one column wide SQl query by arrangment of getPackageData ArrayList results.
static java.util.HashMap getNameValuePackageHash(DataStore db, java.lang.String tagStatement)
          Returns a HashMap formatted name / value by one column wide SQl query by arrangment of getPackageData ArrayList results.
static java.util.List getPackageData(DataStore db, java.util.HashMap ht, java.lang.String tagStatement)
          Returns an ArrayList of HashMap results from SQL query.
static java.util.List getPackageData(DataStore db, java.util.HashMap ht, java.lang.String tagStatement, boolean init)
          Returns an ArrayList of HashMap results from SQL query.
static java.util.List getPackageData(DataStore db, java.lang.String tagStatement)
          Returns an ArrayList of HashMap results from SQL query.
static java.util.Vector getPackageVector(DataStore db, java.util.HashMap ht, java.lang.String tagStatement)
          Returns a Vector formatted one column wide SQl query through ArrayList results by getPackageData.
static java.util.Vector getPackageVector(DataStore db, java.lang.String tagStatement)
          Returns a Vector formatted one column wide SQl query through ArrayList results by getPackageData.
static java.util.HashMap getValueValuePackageHash(DataStore db, java.util.HashMap ht, java.lang.String tagStatement, java.lang.String field1, java.lang.String field2)
          Returns a HashMap formatted value / value by two column wide SQl query through arrangement of ArrayList returned by getPackageData.
static java.util.HashMap getValueValuePackageHash(DataStore db, java.util.HashMap ht, java.lang.String tagStatement, java.lang.String field1, java.lang.String field2, boolean init)
          Returns a HashMap formatted value / value by two column wide SQl query through arrangement of ArrayList returned by getPackageData.
static java.util.HashMap getValueValuePackageHash(DataStore db, java.lang.String tagStatement, java.lang.String field1, java.lang.String field2)
          Returns a HashMap formatted value / value by two column wide SQl query through arrangement of ArrayList returned by getPackageData.
static java.util.HashMap getValueValuePackageHash(DataStore db, java.lang.String tagStatement, java.lang.String field1, java.lang.String field2, boolean init)
          Returns a HashMap formatted value / value by two column wide SQl query through arrangement of ArrayList returned by getPackageData.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CofaxToolsDbUtils


public CofaxToolsDbUtils()
Method Detail

getPackageData


public static java.util.List getPackageData(DataStore db,

                                            java.util.HashMap ht,

                                            java.lang.String tagStatement,

                                            boolean init)
Returns an ArrayList of HashMap results from SQL query. Used to keep consistant flow of data through this class so manipulation can be done through one funnel. Duplex method exists to implement calls to the database where package tags exist that need variables fulfilled. Init needs to be called the first time the cache of package tags is fulfilled so java does not try to check the cache at the same time it is fulfilling it.

getPackageData


public static java.util.List getPackageData(DataStore db,

                                            java.util.HashMap ht,

                                            java.lang.String tagStatement)
Returns an ArrayList of HashMap results from SQL query. Used to keep consistant flow of data through this class so manipulation can be done through one funnel.

getPackageData


public static java.util.List getPackageData(DataStore db,

                                            java.lang.String tagStatement)
Returns an ArrayList of HashMap results from SQL query. Used to keep consistant flow of data through this class so manipulation can be done through one funnel. Simplex method exists to implement calls to the database where package tags exist that do not need variables fulfilled.

getNameValuePackageHash


public static java.util.HashMap getNameValuePackageHash(DataStore db,

                                                        java.lang.String tagStatement)
Returns a HashMap formatted name / value by one column wide SQl query by arrangment of getPackageData ArrayList results. Returns results formatted Name:Value. Package tags using this call may ask for any amount of parameters, but only data from one set or keys will be overwritten. Simplex method exists for package tags that do not need parameters fulfilled.

getNameValuePackageHash


public static java.util.HashMap getNameValuePackageHash(DataStore db,

                                                        java.util.HashMap ht,

                                                        java.lang.String tagStatement)
Returns a HashMap formatted name / value by one column wide SQl query by arrangment of getPackageData ArrayList results. Returns results formatted Name:Value. Package tags using this call may ask for any amount of parameters, but only data from one set or keys will be overwritten. Duplex method exists for package tags that need parameters fulfilled.

getValueValuePackageHash


public static java.util.HashMap getValueValuePackageHash(DataStore db,

                                                         java.lang.String tagStatement,

                                                         java.lang.String field1,

                                                         java.lang.String field2,

                                                         boolean init)
Returns a HashMap formatted value / value by two column wide SQl query through arrangement of ArrayList returned by getPackageData. SQL calls using this method should ask for two values only, though they may ask for any amount of those values. Field1 and field2 determine the column order of the HashMap that is returned. Simplex mehhod for package tags that do not need to have parameters fulfilled. init is passed so tools don't try to access the package tag cache at the same time they are trying to create it.

getValueValuePackageHash


public static java.util.HashMap getValueValuePackageHash(DataStore db,

                                                         java.lang.String tagStatement,

                                                         java.lang.String field1,

                                                         java.lang.String field2)
Returns a HashMap formatted value / value by two column wide SQl query through arrangement of ArrayList returned by getPackageData. SQL calls using this method should ask for two values only, though they may ask for any amount of those values. Field1 and field2 determine the column order of the HashMap that is returned. Simplex mehhod for package tags that do not need to have parameters fulfilled

getValueValuePackageHash


public static java.util.HashMap getValueValuePackageHash(DataStore db,

                                                         java.util.HashMap ht,

                                                         java.lang.String tagStatement,

                                                         java.lang.String field1,

                                                         java.lang.String field2)
Returns a HashMap formatted value / value by two column wide SQl query through arrangement of ArrayList returned by getPackageData. SQL calls using this method should ask for two values only, though they may ask for any amount of those values. Field1 and field2 determine the column order of the HashMap that is returned.

getValueValuePackageHash


public static java.util.HashMap getValueValuePackageHash(DataStore db,

                                                         java.util.HashMap ht,

                                                         java.lang.String tagStatement,

                                                         java.lang.String field1,

                                                         java.lang.String field2,

                                                         boolean init)
Returns a HashMap formatted value / value by two column wide SQl query through arrangement of ArrayList returned by getPackageData. SQL calls using this method should ask for two values only, though they may ask for any amount of those values. Field1 and field2 determine the column order of the HashMap that is returned. Init is passed so that CofaxToolsServlet does not attempt to operate on HashMaps that contain cached package tags at the same time they are being instantiaited and fulfilled, which would create 503 errors.

getPackageVector


public static java.util.Vector getPackageVector(DataStore db,

                                                java.lang.String tagStatement)
Returns a Vector formatted one column wide SQl query through ArrayList results by getPackageData. SQl calls using this routine should be asking for an indeterminate amount of information from one column only.

getPackageVector


public static java.util.Vector getPackageVector(DataStore db,

                                                java.util.HashMap ht,

                                                java.lang.String tagStatement)
Returns a Vector formatted one column wide SQl query through ArrayList results by getPackageData. SQl calls using this routine should be asking for an indeterminate amount of information from one column only.

fillTag


public static java.lang.String fillTag(DataStore db,

                                       java.lang.String tag)
Returns a package tag unfulfilled from memory


Copyright 2001 KnightRidder.com. All Rights Reserved.