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

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

public class RoleRdbWrapper
extends java.lang.Object

RoleRdbWrapper 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 RoleRdbWrapper.BatchDeleteRole
          Batch operation for adding parameters to the DeleteRole prepared statement
static class RoleRdbWrapper.BatchDeleteSubRoleOf
          Batch operation for adding parameters to the DeleteSubRoleOf prepared statement
static class RoleRdbWrapper.BatchInsertRole
          Batch operation for adding parameters to the InsertRole prepared statement
static class RoleRdbWrapper.BatchInsertSubRoleOf
          Batch operation for adding parameters to the InsertSubRoleOf prepared statement
static interface RoleRdbWrapper.DeleteRoleParams
          Interface for managing the parameters to the deleteRole prepared statement.
static class RoleRdbWrapper.DeleteRoleParamsImpl
          Default implementation of DeleteRoleParams
static interface RoleRdbWrapper.DeleteSubRoleOfParams
          Interface for managing the parameters to the deleteSubRoleOf prepared statement.
static class RoleRdbWrapper.DeleteSubRoleOfParamsImpl
          Default implementation of DeleteSubRoleOfParams
static interface RoleRdbWrapper.InsertRoleParams
          Interface for managing the parameters to the insertRole prepared statement.
static class RoleRdbWrapper.InsertRoleParamsImpl
          Default implementation of InsertRoleParams
static interface RoleRdbWrapper.InsertSubRoleOfParams
          Interface for managing the parameters to the insertSubRoleOf prepared statement.
static class RoleRdbWrapper.InsertSubRoleOfParamsImpl
          Default implementation of InsertSubRoleOfParams
 
Field Summary
static java.lang.String deleteRole
          Constant "deleteRole" used to reference prepared statement Role.deleteRole UPDATE ROLES SET HEND=? WHERE ID = ?;
static java.lang.String deleteSubRoleOf
          Constant "deleteSubRoleOf" used to reference prepared statement Role.deleteSubRoleOf UPDATE SUBROLEOF SET HEND=? WHERE ID=? AND PARENTID=?;
static java.lang.String insertRole
          Constant "insertRole" used to reference prepared statement Role.insertRole INSERT INTO ROLES (ID,HSTART) VALUES (?,?);
static java.lang.String insertSubRoleOf
          Constant "insertSubRoleOf" used to reference prepared statement Role.insertSubRoleOf INSERT INTO SUBROLEOF (ID, PARENTID,HSTART) VALUES (?, ?, ?);
static java.lang.String roleExists
          Constant "roleExists" used to reference prepared statement Role.roleExists SELECT COUNT(*) FROM ROLES WHERE ID = ? AND HEND IS NULL;
static java.lang.String selectChildRoles
          Constant "selectChildRoles" used to reference prepared statement Role.selectChildRoles SELECT ID FROM SUBROLEOF WHERE PARENTID = ? AND HEND IS NULL;
static java.lang.String selectParentRoles
          Constant "selectParentRoles" used to reference prepared statement Role.selectParentRoles SELECT PARENTID FROM SUBROLEOF WHERE ID = ? AND HEND IS NULL;
 
Constructor Summary
RoleRdbWrapper()
           
 
Method Summary
static void deleteRole(PreparedStatementCache sqlCache, java.lang.Long hend, long id)
          Runs the deleteRole prepared statement.
static void deleteRole(PreparedStatementCache sqlCache, RoleRdbWrapper.DeleteRoleParams params)
          Runs the deleteRole prepared statement.
static void deleteSubRoleOf(PreparedStatementCache sqlCache, java.lang.Long hend, long roleId, long parentRoleId)
          Runs the deleteSubRoleOf prepared statement.
static void deleteSubRoleOf(PreparedStatementCache sqlCache, RoleRdbWrapper.DeleteSubRoleOfParams params)
          Runs the deleteSubRoleOf prepared statement.
static void insertRole(PreparedStatementCache sqlCache, long id, java.lang.Long modified)
          Runs the insertRole prepared statement.
static void insertRole(PreparedStatementCache sqlCache, RoleRdbWrapper.InsertRoleParams params)
          Runs the insertRole prepared statement.
static void insertSubRoleOf(PreparedStatementCache sqlCache, long roleId, long parentRoleId, java.lang.Long modified)
          Runs the insertSubRoleOf prepared statement.
static void insertSubRoleOf(PreparedStatementCache sqlCache, RoleRdbWrapper.InsertSubRoleOfParams params)
          Runs the insertSubRoleOf prepared statement.
static void prepareDeleteRole(java.sql.PreparedStatement ps, java.lang.Long hend, long id)
          Sets the input parameters for the deleteRole prepared statement.
static void prepareDeleteSubRoleOf(java.sql.PreparedStatement ps, java.lang.Long hend, long roleId, long parentRoleId)
          Sets the input parameters for the deleteSubRoleOf prepared statement.
static void prepareInsertRole(java.sql.PreparedStatement ps, long id, java.lang.Long modified)
          Sets the input parameters for the insertRole prepared statement.
static void prepareInsertSubRoleOf(java.sql.PreparedStatement ps, long roleId, long parentRoleId, java.lang.Long modified)
          Sets the input parameters for the insertSubRoleOf prepared statement.
static void prepareRoleExists(java.sql.PreparedStatement ps, long id)
          Sets the input parameters for the roleExists prepared statement.
static void prepareSelectChildRoles(java.sql.PreparedStatement ps, long id)
          Sets the input parameters for the selectChildRoles prepared statement.
static void prepareSelectParentRoles(java.sql.PreparedStatement ps, long id)
          Sets the input parameters for the selectParentRoles prepared statement.
static java.lang.Integer roleExists(PreparedStatementCache sqlCache, long id)
          Runs the roleExists prepared statement.
static ClosableIterator<java.lang.Long> selectChildRoles(PreparedStatementCache sqlCache, long id)
          Runs the selectChildRoles prepared statement with the default transformer.
static ClosableIterator<java.lang.Long> selectChildRoles(PreparedStatementCache sqlCache, long id, Transformer<java.lang.Long> transform)
          Runs the selectChildRoles prepared statement.
static ClosableIterator<java.lang.Long> selectParentRoles(PreparedStatementCache sqlCache, long id)
          Runs the selectParentRoles prepared statement with the default transformer.
static ClosableIterator<java.lang.Long> selectParentRoles(PreparedStatementCache sqlCache, long id, Transformer<java.lang.Long> transform)
          Runs the selectParentRoles prepared statement.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

roleExists

public static final java.lang.String roleExists
Constant "roleExists" used to reference prepared statement Role.roleExists SELECT COUNT(*) FROM ROLES WHERE ID = ? AND HEND IS NULL;

See Also:
Constant Field Values

insertRole

public static final java.lang.String insertRole
Constant "insertRole" used to reference prepared statement Role.insertRole INSERT INTO ROLES (ID,HSTART) VALUES (?,?);

See Also:
Constant Field Values

insertSubRoleOf

public static final java.lang.String insertSubRoleOf
Constant "insertSubRoleOf" used to reference prepared statement Role.insertSubRoleOf INSERT INTO SUBROLEOF (ID, PARENTID,HSTART) VALUES (?, ?, ?);

See Also:
Constant Field Values

deleteSubRoleOf

public static final java.lang.String deleteSubRoleOf
Constant "deleteSubRoleOf" used to reference prepared statement Role.deleteSubRoleOf UPDATE SUBROLEOF SET HEND=? WHERE ID=? AND PARENTID=?;

See Also:
Constant Field Values

selectParentRoles

public static final java.lang.String selectParentRoles
Constant "selectParentRoles" used to reference prepared statement Role.selectParentRoles SELECT PARENTID FROM SUBROLEOF WHERE ID = ? AND HEND IS NULL;

See Also:
Constant Field Values

selectChildRoles

public static final java.lang.String selectChildRoles
Constant "selectChildRoles" used to reference prepared statement Role.selectChildRoles SELECT ID FROM SUBROLEOF WHERE PARENTID = ? AND HEND IS NULL;

See Also:
Constant Field Values

deleteRole

public static final java.lang.String deleteRole
Constant "deleteRole" used to reference prepared statement Role.deleteRole UPDATE ROLES SET HEND=? WHERE ID = ?;

See Also:
Constant Field Values
Constructor Detail

RoleRdbWrapper

public RoleRdbWrapper()
Method Detail

roleExists

public static java.lang.Integer roleExists(PreparedStatementCache sqlCache,
                                           long id)
                                    throws AnzoException,
                                           java.sql.SQLException
Runs the roleExists prepared statement. SELECT COUNT(*) FROM ROLES WHERE ID = ? AND HEND IS NULL;

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

prepareRoleExists

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

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

insertRole

public static void insertRole(PreparedStatementCache sqlCache,
                              RoleRdbWrapper.InsertRoleParams params)
                       throws AnzoException,
                              java.sql.SQLException
Runs the insertRole prepared statement. INSERT INTO ROLES (ID,HSTART) VALUES (?,?);

Parameters:
sqlCache - factory and cache of PreparedStatments
params - InsertRoleParams input Interface
Throws:
AnzoException
java.sql.SQLException

insertRole

public static void insertRole(PreparedStatementCache sqlCache,
                              long id,
                              java.lang.Long modified)
                       throws AnzoException,
                              java.sql.SQLException
Runs the insertRole prepared statement. INSERT INTO ROLES (ID,HSTART) VALUES (?,?);

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

prepareInsertRole

public static void prepareInsertRole(java.sql.PreparedStatement ps,
                                     long id,
                                     java.lang.Long modified)
                              throws java.sql.SQLException
Sets the input parameters for the insertRole prepared statement.

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

insertSubRoleOf

public static void insertSubRoleOf(PreparedStatementCache sqlCache,
                                   RoleRdbWrapper.InsertSubRoleOfParams params)
                            throws AnzoException,
                                   java.sql.SQLException
Runs the insertSubRoleOf prepared statement. INSERT INTO SUBROLEOF (ID, PARENTID,HSTART) VALUES (?, ?, ?);

Parameters:
sqlCache - factory and cache of PreparedStatments
params - InsertSubRoleOfParams input Interface
Throws:
AnzoException
java.sql.SQLException

insertSubRoleOf

public static void insertSubRoleOf(PreparedStatementCache sqlCache,
                                   long roleId,
                                   long parentRoleId,
                                   java.lang.Long modified)
                            throws AnzoException,
                                   java.sql.SQLException
Runs the insertSubRoleOf prepared statement. INSERT INTO SUBROLEOF (ID, PARENTID,HSTART) VALUES (?, ?, ?);

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

prepareInsertSubRoleOf

public static void prepareInsertSubRoleOf(java.sql.PreparedStatement ps,
                                          long roleId,
                                          long parentRoleId,
                                          java.lang.Long modified)
                                   throws java.sql.SQLException
Sets the input parameters for the insertSubRoleOf prepared statement.

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

deleteSubRoleOf

public static void deleteSubRoleOf(PreparedStatementCache sqlCache,
                                   RoleRdbWrapper.DeleteSubRoleOfParams params)
                            throws AnzoException,
                                   java.sql.SQLException
Runs the deleteSubRoleOf prepared statement. UPDATE SUBROLEOF SET HEND=? WHERE ID=? AND PARENTID=?;

Parameters:
sqlCache - factory and cache of PreparedStatments
params - DeleteSubRoleOfParams input Interface
Throws:
AnzoException
java.sql.SQLException

deleteSubRoleOf

public static void deleteSubRoleOf(PreparedStatementCache sqlCache,
                                   java.lang.Long hend,
                                   long roleId,
                                   long parentRoleId)
                            throws AnzoException,
                                   java.sql.SQLException
Runs the deleteSubRoleOf prepared statement. UPDATE SUBROLEOF SET HEND=? WHERE ID=? AND PARENTID=?;

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

prepareDeleteSubRoleOf

public static void prepareDeleteSubRoleOf(java.sql.PreparedStatement ps,
                                          java.lang.Long hend,
                                          long roleId,
                                          long parentRoleId)
                                   throws java.sql.SQLException
Sets the input parameters for the deleteSubRoleOf prepared statement.

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

selectParentRoles

public static ClosableIterator<java.lang.Long> selectParentRoles(PreparedStatementCache sqlCache,
                                                                 long id)
                                                          throws AnzoException,
                                                                 java.sql.SQLException
Runs the selectParentRoles prepared statement with the default transformer. SELECT PARENTID FROM SUBROLEOF WHERE ID = ? AND HEND IS NULL;

Parameters:
sqlCache - factory and cache of PreparedStatments
id - template parameter
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
AnzoException
java.sql.SQLException

selectParentRoles

public static ClosableIterator<java.lang.Long> selectParentRoles(PreparedStatementCache sqlCache,
                                                                 long id,
                                                                 Transformer<java.lang.Long> transform)
                                                          throws AnzoException,
                                                                 java.sql.SQLException
Runs the selectParentRoles prepared statement. SELECT PARENTID FROM SUBROLEOF WHERE ID = ? AND HEND IS NULL;

Parameters:
sqlCache - factory and cache of PreparedStatments
id - template parameter
transform - org.openanzo.jdbc.utils.Transformer used to transform results into java objects
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
AnzoException
java.sql.SQLException

prepareSelectParentRoles

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

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

selectChildRoles

public static ClosableIterator<java.lang.Long> selectChildRoles(PreparedStatementCache sqlCache,
                                                                long id)
                                                         throws AnzoException,
                                                                java.sql.SQLException
Runs the selectChildRoles prepared statement with the default transformer. SELECT ID FROM SUBROLEOF WHERE PARENTID = ? AND HEND IS NULL;

Parameters:
sqlCache - factory and cache of PreparedStatments
id - template parameter
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
AnzoException
java.sql.SQLException

selectChildRoles

public static ClosableIterator<java.lang.Long> selectChildRoles(PreparedStatementCache sqlCache,
                                                                long id,
                                                                Transformer<java.lang.Long> transform)
                                                         throws AnzoException,
                                                                java.sql.SQLException
Runs the selectChildRoles prepared statement. SELECT ID FROM SUBROLEOF WHERE PARENTID = ? AND HEND IS NULL;

Parameters:
sqlCache - factory and cache of PreparedStatments
id - template parameter
transform - org.openanzo.jdbc.utils.Transformer used to transform results into java objects
Returns:
org.openanzo.jdbc.utils.ClosableIterator
Throws:
AnzoException
java.sql.SQLException

prepareSelectChildRoles

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

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

deleteRole

public static void deleteRole(PreparedStatementCache sqlCache,
                              RoleRdbWrapper.DeleteRoleParams params)
                       throws AnzoException,
                              java.sql.SQLException
Runs the deleteRole prepared statement. UPDATE ROLES SET HEND=? WHERE ID = ?;

Parameters:
sqlCache - factory and cache of PreparedStatments
params - DeleteRoleParams input Interface
Throws:
AnzoException
java.sql.SQLException

deleteRole

public static void deleteRole(PreparedStatementCache sqlCache,
                              java.lang.Long hend,
                              long id)
                       throws AnzoException,
                              java.sql.SQLException
Runs the deleteRole prepared statement. UPDATE ROLES SET HEND=? WHERE ID = ?;

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

prepareDeleteRole

public static void prepareDeleteRole(java.sql.PreparedStatement ps,
                                     java.lang.Long hend,
                                     long id)
                              throws java.sql.SQLException
Sets the input parameters for the deleteRole prepared statement.

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


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