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

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

public class UsersRolesRdbWrapper
extends java.lang.Object

UsersRolesRdbWrapper 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 UsersRolesRdbWrapper.BatchDeleteUserFromRole
          Batch operation for adding parameters to the DeleteUserFromRole prepared statement
static class UsersRolesRdbWrapper.BatchInsertUsersRoles
          Batch operation for adding parameters to the InsertUsersRoles prepared statement
static interface UsersRolesRdbWrapper.DeleteUserFromRoleParams
          Interface for managing the parameters to the deleteUserFromRole prepared statement.
static class UsersRolesRdbWrapper.DeleteUserFromRoleParamsImpl
          Default implementation of DeleteUserFromRoleParams
static interface UsersRolesRdbWrapper.InsertUsersRolesParams
          Interface for managing the parameters to the insertUsersRoles prepared statement.
static class UsersRolesRdbWrapper.InsertUsersRolesParamsImpl
          Default implementation of InsertUsersRolesParams
static interface UsersRolesRdbWrapper.SelectUserInRoleParams
          Interface for managing the parameters to the selectUserInRole prepared statement.
static class UsersRolesRdbWrapper.SelectUserInRoleParamsImpl
          Default implementation of SelectUserInRoleParams
 
Field Summary
static java.lang.String deleteUserFromRole
          Constant "deleteUserFromRole" used to reference prepared statement UsersRoles.deleteUserFromRole UPDATE USERSROLES SET HEND=? WHERE USERID = ? AND ROLEID = ?;
static java.lang.String insertUsersRoles
          Constant "insertUsersRoles" used to reference prepared statement UsersRoles.insertUsersRoles INSERT INTO USERSROLES (USERID, ROLEID, ISEXPLICIT,HSTART) VALUES (?, ?, ?, ?);
static java.lang.String selectExplicitRolesForUser
          Constant "selectExplicitRolesForUser" used to reference prepared statement UsersRoles.selectExplicitRolesForUser SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND ISEXPLICIT = 1 AND HEND IS NULL;
static java.lang.String selectRoleIdsForUser
          Constant "selectRoleIdsForUser" used to reference prepared statement UsersRoles.selectRoleIdsForUser SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND HEND IS NULL;
static java.lang.String selectUserIdsForRole
          Constant "selectUserIdsForRole" used to reference prepared statement UsersRoles.selectUserIdsForRole SELECT USERID FROM USERSROLES WHERE ROLEID = ? AND HEND IS NULL;
static java.lang.String selectUserInRole
          Constant "selectUserInRole" used to reference prepared statement UsersRoles.selectUserInRole SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND ROLEID=? AND HEND IS NULL;
 
Constructor Summary
UsersRolesRdbWrapper()
           
 
Method Summary
static void deleteUserFromRole(PreparedStatementCache sqlCache, java.lang.Long modified, long userId, long roleId)
          Runs the deleteUserFromRole prepared statement.
static void deleteUserFromRole(PreparedStatementCache sqlCache, UsersRolesRdbWrapper.DeleteUserFromRoleParams params)
          Runs the deleteUserFromRole prepared statement.
static void insertUsersRoles(PreparedStatementCache sqlCache, long userId, long roleId, int isExplicit, java.lang.Long modified)
          Runs the insertUsersRoles prepared statement.
static void insertUsersRoles(PreparedStatementCache sqlCache, UsersRolesRdbWrapper.InsertUsersRolesParams params)
          Runs the insertUsersRoles prepared statement.
static void prepareDeleteUserFromRole(java.sql.PreparedStatement ps, java.lang.Long modified, long userId, long roleId)
          Sets the input parameters for the deleteUserFromRole prepared statement.
static void prepareInsertUsersRoles(java.sql.PreparedStatement ps, long userId, long roleId, int isExplicit, java.lang.Long modified)
          Sets the input parameters for the insertUsersRoles prepared statement.
static void prepareSelectExplicitRolesForUser(java.sql.PreparedStatement ps, long userId)
          Sets the input parameters for the selectExplicitRolesForUser prepared statement.
static void prepareSelectRoleIdsForUser(java.sql.PreparedStatement ps, long userId)
          Sets the input parameters for the selectRoleIdsForUser prepared statement.
static void prepareSelectUserIdsForRole(java.sql.PreparedStatement ps, long roleId)
          Sets the input parameters for the selectUserIdsForRole prepared statement.
static void prepareSelectUserInRole(java.sql.PreparedStatement ps, long userId, long roleid)
          Sets the input parameters for the selectUserInRole prepared statement.
static ClosableIterator<java.lang.Long> selectExplicitRolesForUser(PreparedStatementCache sqlCache, long userId)
          Runs the selectExplicitRolesForUser prepared statement with the default transformer.
static ClosableIterator<java.lang.Long> selectExplicitRolesForUser(PreparedStatementCache sqlCache, long userId, Transformer<java.lang.Long> transform)
          Runs the selectExplicitRolesForUser prepared statement.
static ClosableIterator<java.lang.Long> selectRoleIdsForUser(PreparedStatementCache sqlCache, long userId)
          Runs the selectRoleIdsForUser prepared statement with the default transformer.
static ClosableIterator<java.lang.Long> selectRoleIdsForUser(PreparedStatementCache sqlCache, long userId, Transformer<java.lang.Long> transform)
          Runs the selectRoleIdsForUser prepared statement.
static ClosableIterator<java.lang.Long> selectUserIdsForRole(PreparedStatementCache sqlCache, long roleId)
          Runs the selectUserIdsForRole prepared statement with the default transformer.
static ClosableIterator<java.lang.Long> selectUserIdsForRole(PreparedStatementCache sqlCache, long roleId, Transformer<java.lang.Long> transform)
          Runs the selectUserIdsForRole prepared statement.
static java.lang.Long selectUserInRole(PreparedStatementCache sqlCache, long userId, long roleid)
          Runs the selectUserInRole prepared statement.
static java.lang.Long selectUserInRole(PreparedStatementCache sqlCache, UsersRolesRdbWrapper.SelectUserInRoleParams params)
          Runs the selectUserInRole prepared statement.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

selectRoleIdsForUser

public static final java.lang.String selectRoleIdsForUser
Constant "selectRoleIdsForUser" used to reference prepared statement UsersRoles.selectRoleIdsForUser SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND HEND IS NULL;

See Also:
Constant Field Values

selectUserInRole

public static final java.lang.String selectUserInRole
Constant "selectUserInRole" used to reference prepared statement UsersRoles.selectUserInRole SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND ROLEID=? AND HEND IS NULL;

See Also:
Constant Field Values

selectExplicitRolesForUser

public static final java.lang.String selectExplicitRolesForUser
Constant "selectExplicitRolesForUser" used to reference prepared statement UsersRoles.selectExplicitRolesForUser SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND ISEXPLICIT = 1 AND HEND IS NULL;

See Also:
Constant Field Values

selectUserIdsForRole

public static final java.lang.String selectUserIdsForRole
Constant "selectUserIdsForRole" used to reference prepared statement UsersRoles.selectUserIdsForRole SELECT USERID FROM USERSROLES WHERE ROLEID = ? AND HEND IS NULL;

See Also:
Constant Field Values

insertUsersRoles

public static final java.lang.String insertUsersRoles
Constant "insertUsersRoles" used to reference prepared statement UsersRoles.insertUsersRoles INSERT INTO USERSROLES (USERID, ROLEID, ISEXPLICIT,HSTART) VALUES (?, ?, ?, ?);

See Also:
Constant Field Values

deleteUserFromRole

public static final java.lang.String deleteUserFromRole
Constant "deleteUserFromRole" used to reference prepared statement UsersRoles.deleteUserFromRole UPDATE USERSROLES SET HEND=? WHERE USERID = ? AND ROLEID = ?;

See Also:
Constant Field Values
Constructor Detail

UsersRolesRdbWrapper

public UsersRolesRdbWrapper()
Method Detail

selectRoleIdsForUser

public static ClosableIterator<java.lang.Long> selectRoleIdsForUser(PreparedStatementCache sqlCache,
                                                                    long userId)
                                                             throws AnzoException,
                                                                    java.sql.SQLException
Runs the selectRoleIdsForUser prepared statement with the default transformer. SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND HEND IS NULL;

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

selectRoleIdsForUser

public static ClosableIterator<java.lang.Long> selectRoleIdsForUser(PreparedStatementCache sqlCache,
                                                                    long userId,
                                                                    Transformer<java.lang.Long> transform)
                                                             throws AnzoException,
                                                                    java.sql.SQLException
Runs the selectRoleIdsForUser prepared statement. SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND HEND IS NULL;

Parameters:
sqlCache - factory and cache of PreparedStatments
userId - 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

prepareSelectRoleIdsForUser

public static void prepareSelectRoleIdsForUser(java.sql.PreparedStatement ps,
                                               long userId)
                                        throws java.sql.SQLException
Sets the input parameters for the selectRoleIdsForUser prepared statement.

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

selectUserInRole

public static java.lang.Long selectUserInRole(PreparedStatementCache sqlCache,
                                              UsersRolesRdbWrapper.SelectUserInRoleParams params)
                                       throws AnzoException,
                                              java.sql.SQLException
Runs the selectUserInRole prepared statement. SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND ROLEID=? AND HEND IS NULL;

Parameters:
sqlCache - factory and cache of PreparedStatments
params - SelectUserInRoleParams input Interface
Returns:
Long containing the results of the SQL operation
Throws:
AnzoException
java.sql.SQLException

selectUserInRole

public static java.lang.Long selectUserInRole(PreparedStatementCache sqlCache,
                                              long userId,
                                              long roleid)
                                       throws AnzoException,
                                              java.sql.SQLException
Runs the selectUserInRole prepared statement. SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND ROLEID=? AND HEND IS NULL;

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

prepareSelectUserInRole

public static void prepareSelectUserInRole(java.sql.PreparedStatement ps,
                                           long userId,
                                           long roleid)
                                    throws java.sql.SQLException
Sets the input parameters for the selectUserInRole prepared statement.

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

selectExplicitRolesForUser

public static ClosableIterator<java.lang.Long> selectExplicitRolesForUser(PreparedStatementCache sqlCache,
                                                                          long userId)
                                                                   throws AnzoException,
                                                                          java.sql.SQLException
Runs the selectExplicitRolesForUser prepared statement with the default transformer. SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND ISEXPLICIT = 1 AND HEND IS NULL;

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

selectExplicitRolesForUser

public static ClosableIterator<java.lang.Long> selectExplicitRolesForUser(PreparedStatementCache sqlCache,
                                                                          long userId,
                                                                          Transformer<java.lang.Long> transform)
                                                                   throws AnzoException,
                                                                          java.sql.SQLException
Runs the selectExplicitRolesForUser prepared statement. SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND ISEXPLICIT = 1 AND HEND IS NULL;

Parameters:
sqlCache - factory and cache of PreparedStatments
userId - 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

prepareSelectExplicitRolesForUser

public static void prepareSelectExplicitRolesForUser(java.sql.PreparedStatement ps,
                                                     long userId)
                                              throws java.sql.SQLException
Sets the input parameters for the selectExplicitRolesForUser prepared statement.

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

selectUserIdsForRole

public static ClosableIterator<java.lang.Long> selectUserIdsForRole(PreparedStatementCache sqlCache,
                                                                    long roleId)
                                                             throws AnzoException,
                                                                    java.sql.SQLException
Runs the selectUserIdsForRole prepared statement with the default transformer. SELECT USERID FROM USERSROLES WHERE ROLEID = ? AND HEND IS NULL;

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

selectUserIdsForRole

public static ClosableIterator<java.lang.Long> selectUserIdsForRole(PreparedStatementCache sqlCache,
                                                                    long roleId,
                                                                    Transformer<java.lang.Long> transform)
                                                             throws AnzoException,
                                                                    java.sql.SQLException
Runs the selectUserIdsForRole prepared statement. SELECT USERID FROM USERSROLES WHERE ROLEID = ? AND HEND IS NULL;

Parameters:
sqlCache - factory and cache of PreparedStatments
roleId - 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

prepareSelectUserIdsForRole

public static void prepareSelectUserIdsForRole(java.sql.PreparedStatement ps,
                                               long roleId)
                                        throws java.sql.SQLException
Sets the input parameters for the selectUserIdsForRole prepared statement.

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

insertUsersRoles

public static void insertUsersRoles(PreparedStatementCache sqlCache,
                                    UsersRolesRdbWrapper.InsertUsersRolesParams params)
                             throws AnzoException,
                                    java.sql.SQLException
Runs the insertUsersRoles prepared statement. INSERT INTO USERSROLES (USERID, ROLEID, ISEXPLICIT,HSTART) VALUES (?, ?, ?, ?);

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

insertUsersRoles

public static void insertUsersRoles(PreparedStatementCache sqlCache,
                                    long userId,
                                    long roleId,
                                    int isExplicit,
                                    java.lang.Long modified)
                             throws AnzoException,
                                    java.sql.SQLException
Runs the insertUsersRoles prepared statement. INSERT INTO USERSROLES (USERID, ROLEID, ISEXPLICIT,HSTART) VALUES (?, ?, ?, ?);

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

prepareInsertUsersRoles

public static void prepareInsertUsersRoles(java.sql.PreparedStatement ps,
                                           long userId,
                                           long roleId,
                                           int isExplicit,
                                           java.lang.Long modified)
                                    throws java.sql.SQLException
Sets the input parameters for the insertUsersRoles prepared statement.

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

deleteUserFromRole

public static void deleteUserFromRole(PreparedStatementCache sqlCache,
                                      UsersRolesRdbWrapper.DeleteUserFromRoleParams params)
                               throws AnzoException,
                                      java.sql.SQLException
Runs the deleteUserFromRole prepared statement. UPDATE USERSROLES SET HEND=? WHERE USERID = ? AND ROLEID = ?;

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

deleteUserFromRole

public static void deleteUserFromRole(PreparedStatementCache sqlCache,
                                      java.lang.Long modified,
                                      long userId,
                                      long roleId)
                               throws AnzoException,
                                      java.sql.SQLException
Runs the deleteUserFromRole prepared statement. UPDATE USERSROLES SET HEND=? WHERE USERID = ? AND ROLEID = ?;

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

prepareDeleteUserFromRole

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

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


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