|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.server.repository.rdb.sql.UsersRolesRdbWrapper
public class UsersRolesRdbWrapper
UsersRolesRdbWrapper provides wrappers around SQL queries and transforms ResultSets into java objects
| 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 |
|---|
public static final java.lang.String selectRoleIdsForUser
SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND HEND IS NULL;
public static final java.lang.String selectUserInRole
SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND ROLEID=? AND HEND IS NULL;
public static final java.lang.String selectExplicitRolesForUser
SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND ISEXPLICIT = 1 AND HEND IS NULL;
public static final java.lang.String selectUserIdsForRole
SELECT USERID FROM USERSROLES WHERE ROLEID = ? AND HEND IS NULL;
public static final java.lang.String insertUsersRoles
INSERT INTO USERSROLES (USERID, ROLEID, ISEXPLICIT,HSTART) VALUES (?, ?, ?, ?);
public static final java.lang.String deleteUserFromRole
UPDATE USERSROLES SET HEND=? WHERE USERID = ? AND ROLEID = ?;
| Constructor Detail |
|---|
public UsersRolesRdbWrapper()
| Method Detail |
|---|
public static ClosableIterator<java.lang.Long> selectRoleIdsForUser(PreparedStatementCache sqlCache,
long userId)
throws AnzoException,
java.sql.SQLException
SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsuserId - template parameter
AnzoException
java.sql.SQLException
public static ClosableIterator<java.lang.Long> selectRoleIdsForUser(PreparedStatementCache sqlCache,
long userId,
Transformer<java.lang.Long> transform)
throws AnzoException,
java.sql.SQLException
SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsuserId - template parametertransform - org.openanzo.jdbc.utils.TransformerAnzoException
java.sql.SQLException
public static void prepareSelectRoleIdsForUser(java.sql.PreparedStatement ps,
long userId)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setuserId - template parameter
java.sql.SQLException
public static java.lang.Long selectUserInRole(PreparedStatementCache sqlCache,
UsersRolesRdbWrapper.SelectUserInRoleParams params)
throws AnzoException,
java.sql.SQLException
SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND ROLEID=? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsparams - SelectUserInRoleParams input Interface
AnzoException
java.sql.SQLException
public static java.lang.Long selectUserInRole(PreparedStatementCache sqlCache,
long userId,
long roleid)
throws AnzoException,
java.sql.SQLException
SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND ROLEID=? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsuserId - template parameterroleid - template parameter
AnzoException
java.sql.SQLException
public static void prepareSelectUserInRole(java.sql.PreparedStatement ps,
long userId,
long roleid)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setuserId - template parameterroleid - template parameter
java.sql.SQLException
public static ClosableIterator<java.lang.Long> selectExplicitRolesForUser(PreparedStatementCache sqlCache,
long userId)
throws AnzoException,
java.sql.SQLException
SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND ISEXPLICIT = 1 AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsuserId - template parameter
AnzoException
java.sql.SQLException
public static ClosableIterator<java.lang.Long> selectExplicitRolesForUser(PreparedStatementCache sqlCache,
long userId,
Transformer<java.lang.Long> transform)
throws AnzoException,
java.sql.SQLException
SELECT ROLEID FROM USERSROLES WHERE USERID = ? AND ISEXPLICIT = 1 AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsuserId - template parametertransform - org.openanzo.jdbc.utils.TransformerAnzoException
java.sql.SQLException
public static void prepareSelectExplicitRolesForUser(java.sql.PreparedStatement ps,
long userId)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setuserId - template parameter
java.sql.SQLException
public static ClosableIterator<java.lang.Long> selectUserIdsForRole(PreparedStatementCache sqlCache,
long roleId)
throws AnzoException,
java.sql.SQLException
SELECT USERID FROM USERSROLES WHERE ROLEID = ? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsroleId - template parameter
AnzoException
java.sql.SQLException
public static ClosableIterator<java.lang.Long> selectUserIdsForRole(PreparedStatementCache sqlCache,
long roleId,
Transformer<java.lang.Long> transform)
throws AnzoException,
java.sql.SQLException
SELECT USERID FROM USERSROLES WHERE ROLEID = ? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsroleId - template parametertransform - org.openanzo.jdbc.utils.TransformerAnzoException
java.sql.SQLException
public static void prepareSelectUserIdsForRole(java.sql.PreparedStatement ps,
long roleId)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setroleId - template parameter
java.sql.SQLException
public static void insertUsersRoles(PreparedStatementCache sqlCache,
UsersRolesRdbWrapper.InsertUsersRolesParams params)
throws AnzoException,
java.sql.SQLException
INSERT INTO USERSROLES (USERID, ROLEID, ISEXPLICIT,HSTART) VALUES (?, ?, ?, ?);
sqlCache - factory and cache of PreparedStatmentsparams - InsertUsersRolesParams input Interface
AnzoException
java.sql.SQLException
public static void insertUsersRoles(PreparedStatementCache sqlCache,
long userId,
long roleId,
int isExplicit,
java.lang.Long modified)
throws AnzoException,
java.sql.SQLException
INSERT INTO USERSROLES (USERID, ROLEID, ISEXPLICIT,HSTART) VALUES (?, ?, ?, ?);
sqlCache - factory and cache of PreparedStatmentsuserId - template parameterroleId - template parameterisExplicit - template parametermodified - template parameter
AnzoException
java.sql.SQLException
public static void prepareInsertUsersRoles(java.sql.PreparedStatement ps,
long userId,
long roleId,
int isExplicit,
java.lang.Long modified)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setuserId - template parameterroleId - template parameterisExplicit - template parametermodified - template parameter
java.sql.SQLException
public static void deleteUserFromRole(PreparedStatementCache sqlCache,
UsersRolesRdbWrapper.DeleteUserFromRoleParams params)
throws AnzoException,
java.sql.SQLException
UPDATE USERSROLES SET HEND=? WHERE USERID = ? AND ROLEID = ?;
sqlCache - factory and cache of PreparedStatmentsparams - DeleteUserFromRoleParams input Interface
AnzoException
java.sql.SQLException
public static void deleteUserFromRole(PreparedStatementCache sqlCache,
java.lang.Long modified,
long userId,
long roleId)
throws AnzoException,
java.sql.SQLException
UPDATE USERSROLES SET HEND=? WHERE USERID = ? AND ROLEID = ?;
sqlCache - factory and cache of PreparedStatmentsmodified - template parameteruserId - template parameterroleId - template parameter
AnzoException
java.sql.SQLException
public static void prepareDeleteUserFromRole(java.sql.PreparedStatement ps,
java.lang.Long modified,
long userId,
long roleId)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setmodified - template parameteruserId - template parameterroleId - template parameter
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||