org.openanzo.server.repository.rdb.sql
Class ServerRdbWrapper

java.lang.Object
  extended by org.openanzo.server.repository.rdb.sql.ServerRdbWrapper

public class ServerRdbWrapper
extends java.lang.Object

ServerRdbWrapper 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 ServerRdbWrapper.BatchLockTable
          Batch operation for adding parameters to the LockTable prepared statement
static class ServerRdbWrapper.BatchUnlockTable
          Batch operation for adding parameters to the UnlockTable prepared statement
 
Field Summary
static java.lang.String getInitialized
          Constant "getInitialized" used to reference prepared statement Server.getInitialized SELECT INITIALIZED FROM SERVER;
static java.lang.String getServerId
          Constant "getServerId" used to reference prepared statement Server.getServerId SELECT ID FROM SERVER;
static java.lang.String lockTable
          Constant "lockTable" used to reference prepared statement Server.lockTable LOCK TABLE ${a} ${b}
static java.lang.String setInitialized
          Constant "setInitialized" used to reference prepared statement Server.setInitialized UPDATE SERVER SET ID=?,INITIALIZED=1 WHERE INITIALIZED=0;
static java.lang.String setInitializing
          Constant "setInitializing" used to reference prepared statement Server.setInitializing UPDATE SERVER SET INITIALIZED=0 WHERE INITIALIZED IS NULL
static java.lang.String setInitializingFailed
          Constant "setInitializingFailed" used to reference prepared statement Server.setInitializingFailed UPDATE SERVER SET INITIALIZED=NULL
static java.lang.String setServerId
          Constant "setServerId" used to reference prepared statement Server.setServerId UPDATE SERVER SET ID=? WHERE INITIALIZED=1;
static java.lang.String unlockTable
          Constant "unlockTable" used to reference prepared statement Server.unlockTable EMPTY
 
Constructor Summary
ServerRdbWrapper()
           
 
Method Summary
static java.lang.Long getInitialized(PreparedStatementCache sqlCache)
          Runs the getInitialized prepared statement.
static java.lang.Long getServerId(PreparedStatementCache sqlCache)
          Runs the getServerId prepared statement.
static void lockTable(PreparedStatementCache sqlCache, java.lang.String tableName, java.lang.String tableLocksExtra)
          Runs the lockTable prepared statement.
static void prepareGetInitialized(java.sql.PreparedStatement ps)
          Sets the input parameters for the getInitialized prepared statement.
static void prepareGetServerId(java.sql.PreparedStatement ps)
          Sets the input parameters for the getServerId prepared statement.
static void prepareLockTable(java.sql.PreparedStatement ps)
          Sets the input parameters for the lockTable prepared statement.
static void prepareSetInitialized(java.sql.PreparedStatement ps, long id)
          Sets the input parameters for the setInitialized prepared statement.
static void prepareSetInitializing(java.sql.PreparedStatement ps)
          Sets the input parameters for the setInitializing prepared statement.
static void prepareSetInitializingFailed(java.sql.PreparedStatement ps)
          Sets the input parameters for the setInitializingFailed prepared statement.
static void prepareSetServerId(java.sql.PreparedStatement ps, long id)
          Sets the input parameters for the setServerId prepared statement.
static void prepareUnlockTable(java.sql.PreparedStatement ps)
          Sets the input parameters for the unlockTable prepared statement.
static int setInitialized(PreparedStatementCache sqlCache, long id)
          Runs the setInitialized prepared statement.
static int setInitializing(PreparedStatementCache sqlCache)
          Runs the setInitializing prepared statement.
static int setInitializingFailed(PreparedStatementCache sqlCache)
          Runs the setInitializingFailed prepared statement.
static int setServerId(PreparedStatementCache sqlCache, long id)
          Runs the setServerId 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

setInitialized

public static final java.lang.String setInitialized
Constant "setInitialized" used to reference prepared statement Server.setInitialized UPDATE SERVER SET ID=?,INITIALIZED=1 WHERE INITIALIZED=0;

See Also:
Constant Field Values

setServerId

public static final java.lang.String setServerId
Constant "setServerId" used to reference prepared statement Server.setServerId UPDATE SERVER SET ID=? WHERE INITIALIZED=1;

See Also:
Constant Field Values

getServerId

public static final java.lang.String getServerId
Constant "getServerId" used to reference prepared statement Server.getServerId SELECT ID FROM SERVER;

See Also:
Constant Field Values

getInitialized

public static final java.lang.String getInitialized
Constant "getInitialized" used to reference prepared statement Server.getInitialized SELECT INITIALIZED FROM SERVER;

See Also:
Constant Field Values

setInitializing

public static final java.lang.String setInitializing
Constant "setInitializing" used to reference prepared statement Server.setInitializing UPDATE SERVER SET INITIALIZED=0 WHERE INITIALIZED IS NULL

See Also:
Constant Field Values

setInitializingFailed

public static final java.lang.String setInitializingFailed
Constant "setInitializingFailed" used to reference prepared statement Server.setInitializingFailed UPDATE SERVER SET INITIALIZED=NULL

See Also:
Constant Field Values

lockTable

public static final java.lang.String lockTable
Constant "lockTable" used to reference prepared statement Server.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 Server.unlockTable EMPTY

See Also:
Constant Field Values
Constructor Detail

ServerRdbWrapper

public ServerRdbWrapper()
Method Detail

setInitialized

public static int setInitialized(PreparedStatementCache sqlCache,
                                 long id)
                          throws AnzoException,
                                 java.sql.SQLException
Runs the setInitialized prepared statement. UPDATE SERVER SET ID=?,INITIALIZED=1 WHERE INITIALIZED=0;

Parameters:
sqlCache - factory and cache of PreparedStatments
id - template parameter
Returns:
int
Throws:
AnzoException
java.sql.SQLException

prepareSetInitialized

public static void prepareSetInitialized(java.sql.PreparedStatement ps,
                                         long id)
                                  throws java.sql.SQLException
Sets the input parameters for the setInitialized prepared statement.

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

setServerId

public static int setServerId(PreparedStatementCache sqlCache,
                              long id)
                       throws AnzoException,
                              java.sql.SQLException
Runs the setServerId prepared statement. UPDATE SERVER SET ID=? WHERE INITIALIZED=1;

Parameters:
sqlCache - factory and cache of PreparedStatments
id - template parameter
Returns:
int
Throws:
AnzoException
java.sql.SQLException

prepareSetServerId

public static void prepareSetServerId(java.sql.PreparedStatement ps,
                                      long id)
                               throws java.sql.SQLException
Sets the input parameters for the setServerId prepared statement.

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

getServerId

public static java.lang.Long getServerId(PreparedStatementCache sqlCache)
                                  throws AnzoException,
                                         java.sql.SQLException
Runs the getServerId prepared statement. SELECT ID FROM SERVER;

Parameters:
sqlCache - factory and cache of PreparedStatments
Returns:
Long
Throws:
AnzoException
java.sql.SQLException

prepareGetServerId

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

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

getInitialized

public static java.lang.Long getInitialized(PreparedStatementCache sqlCache)
                                     throws AnzoException,
                                            java.sql.SQLException
Runs the getInitialized prepared statement. SELECT INITIALIZED FROM SERVER;

Parameters:
sqlCache - factory and cache of PreparedStatments
Returns:
Long
Throws:
AnzoException
java.sql.SQLException

prepareGetInitialized

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

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

setInitializing

public static int setInitializing(PreparedStatementCache sqlCache)
                           throws AnzoException,
                                  java.sql.SQLException
Runs the setInitializing prepared statement. UPDATE SERVER SET INITIALIZED=0 WHERE INITIALIZED IS NULL

Parameters:
sqlCache - factory and cache of PreparedStatments
Returns:
int
Throws:
AnzoException
java.sql.SQLException

prepareSetInitializing

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

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

setInitializingFailed

public static int setInitializingFailed(PreparedStatementCache sqlCache)
                                 throws AnzoException,
                                        java.sql.SQLException
Runs the setInitializingFailed prepared statement. UPDATE SERVER SET INITIALIZED=NULL

Parameters:
sqlCache - factory and cache of PreparedStatments
Returns:
int
Throws:
AnzoException
java.sql.SQLException

prepareSetInitializingFailed

public static void prepareSetInitializingFailed(java.sql.PreparedStatement ps)
                                         throws java.sql.SQLException
Sets the input parameters for the setInitializingFailed 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 tableLocksExtra)
                      throws AnzoException,
                             java.sql.SQLException
Runs the lockTable prepared statement. LOCK TABLE ${a} ${b}

Parameters:
sqlCache - factory and cache of PreparedStatments
tableName - template parameter
tableLocksExtra - template parameter
Throws:
AnzoException
java.sql.SQLException

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 AnzoException,
                               java.sql.SQLException
Runs the unlockTable prepared statement. EMPTY

Parameters:
sqlCache - factory and cache of PreparedStatments
tableName - template parameter
Throws:
AnzoException
java.sql.SQLException

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.