org.openanzo.common.rdb.sql
Class BaseSQL

java.lang.Object
  extended by org.openanzo.common.rdb.sql.BaseSQL

public class BaseSQL
extends java.lang.Object

BaseSQL provides wrappers around SQL queries and transforms ResultSets into java objects

Author:
Generated Source from org.openanzo.jdbc.utils.opgen.jet

Nested Class Summary
static class BaseSQL.BatchClearTable
          Batch operation for adding parameters to the ClearTable prepared statement
static class BaseSQL.BatchDropTable
          Batch operation for adding parameters to the DropTable prepared statement
static class BaseSQL.BatchDropView
          Batch operation for adding parameters to the DropView prepared statement
static class BaseSQL.BatchInsertGraph
          Batch operation for adding parameters to the InsertGraph prepared statement
static class BaseSQL.BatchLockTable
          Batch operation for adding parameters to the LockTable prepared statement
static class BaseSQL.BatchRemoveRowsFromTable
          Batch operation for adding parameters to the RemoveRowsFromTable prepared statement
static class BaseSQL.BatchUnlockTable
          Batch operation for adding parameters to the UnlockTable prepared statement
 
Field Summary
static java.lang.String clearTable
          Constant "clearTable" used to reference prepared statement base.clearTable DELETE FROM ${a}
static java.lang.String dropTable
          Constant "dropTable" used to reference prepared statement base.dropTable DROP TABLE ${a}
static java.lang.String dropView
          Constant "dropView" used to reference prepared statement base.dropView DROP VIEW ${a}
static java.lang.String getRowCount
          Constant "getRowCount" used to reference prepared statement base.getRowCount SELECT COUNT(*) FROM ${a}
static java.lang.String insertGraph
          Constant "insertGraph" used to reference prepared statement base.insertGraph INSERT INTO ${a} (Name) VALUES (?)
static java.lang.String lockTable
          Constant "lockTable" used to reference prepared statement base.lockTable LOCK TABLE ${a} ${b}
static java.lang.String removeRowsFromTable
          Constant "removeRowsFromTable" used to reference prepared statement base.removeRowsFromTable DELETE FROM ${a} WHERE (GraphID = ?)
static java.lang.String unlockTable
          Constant "unlockTable" used to reference prepared statement base.unlockTable EMPTY
 
Constructor Summary
BaseSQL()
           
 
Method Summary
static void clearTable(PreparedStatementCache sqlCache, java.lang.String tableName)
          Runs the clearTable prepared statement.
static void dropTable(PreparedStatementCache sqlCache, java.lang.String tableName)
          Runs the dropTable prepared statement.
static void dropView(PreparedStatementCache sqlCache, java.lang.String tableName)
          Runs the dropView prepared statement.
static java.lang.Integer getRowCount(PreparedStatementCache sqlCache, java.lang.String tableName)
          Runs the getRowCount prepared statement.
static void insertGraph(PreparedStatementCache sqlCache, java.lang.String Name, java.lang.String tableName)
          Runs the insertGraph prepared statement.
static void lockTable(PreparedStatementCache sqlCache, java.lang.String tableName, java.lang.String mode)
          Runs the lockTable prepared statement.
static void prepareClearTable(java.sql.PreparedStatement ps)
          Sets the input parameters for the clearTable prepared statement.
static void prepareDropTable(java.sql.PreparedStatement ps)
          Sets the input parameters for the dropTable prepared statement.
static void prepareDropView(java.sql.PreparedStatement ps)
          Sets the input parameters for the dropView prepared statement.
static void prepareGetRowCount(java.sql.PreparedStatement ps)
          Sets the input parameters for the getRowCount prepared statement.
static void prepareInsertGraph(java.sql.PreparedStatement ps, java.lang.String Name)
          Sets the input parameters for the insertGraph prepared statement.
static void prepareLockTable(java.sql.PreparedStatement ps)
          Sets the input parameters for the lockTable prepared statement.
static void prepareRemoveRowsFromTable(java.sql.PreparedStatement ps, long GraphID)
          Sets the input parameters for the removeRowsFromTable prepared statement.
static void prepareUnlockTable(java.sql.PreparedStatement ps)
          Sets the input parameters for the unlockTable prepared statement.
static void removeRowsFromTable(PreparedStatementCache sqlCache, long GraphID, java.lang.String tableName)
          Runs the removeRowsFromTable prepared statement.
static void unlockTable(PreparedStatementCache sqlCache, java.lang.String tableName)
          Runs the unlockTable prepared statement.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dropTable

public static final java.lang.String dropTable
Constant "dropTable" used to reference prepared statement base.dropTable DROP TABLE ${a}

See Also:
Constant Field Values

dropView

public static final java.lang.String dropView
Constant "dropView" used to reference prepared statement base.dropView DROP VIEW ${a}

See Also:
Constant Field Values

clearTable

public static final java.lang.String clearTable
Constant "clearTable" used to reference prepared statement base.clearTable DELETE FROM ${a}

See Also:
Constant Field Values

removeRowsFromTable

public static final java.lang.String removeRowsFromTable
Constant "removeRowsFromTable" used to reference prepared statement base.removeRowsFromTable DELETE FROM ${a} WHERE (GraphID = ?)

See Also:
Constant Field Values

insertGraph

public static final java.lang.String insertGraph
Constant "insertGraph" used to reference prepared statement base.insertGraph INSERT INTO ${a} (Name) VALUES (?)

See Also:
Constant Field Values

getRowCount

public static final java.lang.String getRowCount
Constant "getRowCount" used to reference prepared statement base.getRowCount SELECT COUNT(*) FROM ${a}

See Also:
Constant Field Values

lockTable

public static final java.lang.String lockTable
Constant "lockTable" used to reference prepared statement base.lockTable LOCK TABLE ${a} ${b}

See Also:
Constant Field Values

unlockTable

public static final java.lang.String unlockTable
Constant "unlockTable" used to reference prepared statement base.unlockTable EMPTY

See Also:
Constant Field Values
Constructor Detail

BaseSQL

public BaseSQL()
Method Detail

dropTable

public static void dropTable(PreparedStatementCache sqlCache,
                             java.lang.String tableName)
                      throws RdbException
Runs the dropTable prepared statement. DROP TABLE ${a}

Parameters:
sqlCache - factory and cache of PreparedStatments
tableName - template parameter
Throws:
RdbException

prepareDropTable

public static void prepareDropTable(java.sql.PreparedStatement ps)
                             throws java.sql.SQLException
Sets the input parameters for the dropTable prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
Throws:
java.sql.SQLException

dropView

public static void dropView(PreparedStatementCache sqlCache,
                            java.lang.String tableName)
                     throws RdbException
Runs the dropView prepared statement. DROP VIEW ${a}

Parameters:
sqlCache - factory and cache of PreparedStatments
tableName - template parameter
Throws:
RdbException

prepareDropView

public static void prepareDropView(java.sql.PreparedStatement ps)
                            throws java.sql.SQLException
Sets the input parameters for the dropView prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
Throws:
java.sql.SQLException

clearTable

public static void clearTable(PreparedStatementCache sqlCache,
                              java.lang.String tableName)
                       throws RdbException
Runs the clearTable prepared statement. DELETE FROM ${a}

Parameters:
sqlCache - factory and cache of PreparedStatments
tableName - template parameter
Throws:
RdbException

prepareClearTable

public static void prepareClearTable(java.sql.PreparedStatement ps)
                              throws java.sql.SQLException
Sets the input parameters for the clearTable prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
Throws:
java.sql.SQLException

removeRowsFromTable

public static void removeRowsFromTable(PreparedStatementCache sqlCache,
                                       long GraphID,
                                       java.lang.String tableName)
                                throws RdbException
Runs the removeRowsFromTable prepared statement. DELETE FROM ${a} WHERE (GraphID = ?)

Parameters:
sqlCache - factory and cache of PreparedStatments
GraphID - template parameter
tableName - template parameter
Throws:
RdbException

prepareRemoveRowsFromTable

public static void prepareRemoveRowsFromTable(java.sql.PreparedStatement ps,
                                              long GraphID)
                                       throws java.sql.SQLException
Sets the input parameters for the removeRowsFromTable prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
GraphID - template parameter
Throws:
java.sql.SQLException

insertGraph

public static void insertGraph(PreparedStatementCache sqlCache,
                               java.lang.String Name,
                               java.lang.String tableName)
                        throws RdbException
Runs the insertGraph prepared statement. INSERT INTO ${a} (Name) VALUES (?)

Parameters:
sqlCache - factory and cache of PreparedStatments
Name - template parameter
tableName - template parameter
Throws:
RdbException

prepareInsertGraph

public static void prepareInsertGraph(java.sql.PreparedStatement ps,
                                      java.lang.String Name)
                               throws java.sql.SQLException
Sets the input parameters for the insertGraph prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
Name - template parameter
Throws:
java.sql.SQLException

getRowCount

public static java.lang.Integer getRowCount(PreparedStatementCache sqlCache,
                                            java.lang.String tableName)
                                     throws RdbException
Runs the getRowCount prepared statement. SELECT COUNT(*) FROM ${a}

Parameters:
sqlCache - factory and cache of PreparedStatments
tableName - template parameter
Returns:
Integer
Throws:
RdbException

prepareGetRowCount

public static void prepareGetRowCount(java.sql.PreparedStatement ps)
                               throws java.sql.SQLException
Sets the input parameters for the getRowCount prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
Throws:
java.sql.SQLException

lockTable

public static void lockTable(PreparedStatementCache sqlCache,
                             java.lang.String tableName,
                             java.lang.String mode)
                      throws RdbException
Runs the lockTable prepared statement. LOCK TABLE ${a} ${b}

Parameters:
sqlCache - factory and cache of PreparedStatments
tableName - template parameter
mode - template parameter
Throws:
RdbException

prepareLockTable

public static void prepareLockTable(java.sql.PreparedStatement ps)
                             throws java.sql.SQLException
Sets the input parameters for the lockTable prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
Throws:
java.sql.SQLException

unlockTable

public static void unlockTable(PreparedStatementCache sqlCache,
                               java.lang.String tableName)
                        throws RdbException
Runs the unlockTable prepared statement. EMPTY

Parameters:
sqlCache - factory and cache of PreparedStatments
tableName - template parameter
Throws:
RdbException

prepareUnlockTable

public static void prepareUnlockTable(java.sql.PreparedStatement ps)
                               throws java.sql.SQLException
Sets the input parameters for the unlockTable prepared statement.

Parameters:
ps - PreparedStatement to whose parameters are set
Throws:
java.sql.SQLException


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.