|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.server.repository.rdb.sql.UserRdbWrapper
public class UserRdbWrapper
UserRdbWrapper provides wrappers around SQL queries and transforms ResultSets into java objects
| Nested Class Summary | |
|---|---|
static class |
UserRdbWrapper.BatchDeleteUser
Batch operation for adding parameters to the DeleteUser prepared statement |
static class |
UserRdbWrapper.BatchInsertUser
Batch operation for adding parameters to the InsertUser prepared statement |
static class |
UserRdbWrapper.BatchUpdateUser
Batch operation for adding parameters to the UpdateUser prepared statement |
static interface |
UserRdbWrapper.DeleteUserParams
Interface for managing the parameters to the deleteUser prepared statement. |
static class |
UserRdbWrapper.DeleteUserParamsImpl
Default implementation of DeleteUserParams |
static interface |
UserRdbWrapper.GetAuthenticatedUserParams
Interface for managing the parameters to the getAuthenticatedUser prepared statement. |
static class |
UserRdbWrapper.GetAuthenticatedUserParamsImpl
Default implementation of GetAuthenticatedUserParams |
static interface |
UserRdbWrapper.InsertUserParams
Interface for managing the parameters to the insertUser prepared statement. |
static class |
UserRdbWrapper.InsertUserParamsImpl
Default implementation of InsertUserParams |
static interface |
UserRdbWrapper.SelectUserResult
Interface for holding the results of the selectUser prepared statement. |
static class |
UserRdbWrapper.SelectUserResultImpl
Default implementation of SelectUserResult |
static interface |
UserRdbWrapper.UpdateUserParams
Interface for managing the parameters to the updateUser prepared statement. |
static class |
UserRdbWrapper.UpdateUserParamsImpl
Default implementation of UpdateUserParams |
| Field Summary | |
|---|---|
static java.lang.String |
deleteUser
Constant "deleteUser" used to reference prepared statement User.deleteUser
UPDATE USERS SET HEND=? WHERE ID = ? AND HEND IS NULL;
|
static java.lang.String |
getAuthenticatedUser
Constant "getAuthenticatedUser" used to reference prepared statement User.getAuthenticatedUser
SELECT ID FROM USERS WHERE USERID = ? AND PASSWORDHASH=? AND HEND IS NULL;
|
static java.lang.String |
getUserId
Constant "getUserId" used to reference prepared statement User.getUserId
SELECT ID FROM USERS WHERE USERID = ? AND HEND IS NULL;
|
static java.lang.String |
insertUser
Constant "insertUser" used to reference prepared statement User.insertUser
INSERT INTO USERS (ID, USERID,PASSWORDHASH, DEFAULTROLEID, DEFAULTACLID,HSTART) VALUES (?, ?,?, ?, ?,?);
|
static java.lang.String |
selectUser
Constant "selectUser" used to reference prepared statement User.selectUser
SELECT USERID,PASSWORDHASH, DEFAULTROLEID, DEFAULTACLID,HEND FROM USERS WHERE ID = ? AND HEND IS NULL;
|
static java.lang.String |
updateUser
Constant "updateUser" used to reference prepared statement User.updateUser
UPDATE USERS SET USERID=?,PASSWORDHASH=?,DEFAULTROLEID=?,DEFAULTACLID=? WHERE ID = ? AND HEND IS NULL;
|
| Constructor Summary | |
|---|---|
UserRdbWrapper()
|
|
| Method Summary | |
|---|---|
static void |
deleteUser(PreparedStatementCache sqlCache,
java.lang.Long hend,
long id)
Runs the deleteUser prepared statement. |
static void |
deleteUser(PreparedStatementCache sqlCache,
UserRdbWrapper.DeleteUserParams params)
Runs the deleteUser prepared statement. |
static java.lang.Long |
getAuthenticatedUser(PreparedStatementCache sqlCache,
java.lang.String userId,
java.lang.String passwordHash)
Runs the getAuthenticatedUser prepared statement. |
static java.lang.Long |
getAuthenticatedUser(PreparedStatementCache sqlCache,
UserRdbWrapper.GetAuthenticatedUserParams params)
Runs the getAuthenticatedUser prepared statement. |
static java.lang.Long |
getUserId(PreparedStatementCache sqlCache,
java.lang.String userId)
Runs the getUserId prepared statement. |
static void |
insertUser(PreparedStatementCache sqlCache,
long id,
java.lang.String userId,
java.lang.String passwordHash,
long defaultRoleId,
long defaultAclId,
java.lang.Long modified)
Runs the insertUser prepared statement. |
static void |
insertUser(PreparedStatementCache sqlCache,
UserRdbWrapper.InsertUserParams params)
Runs the insertUser prepared statement. |
static void |
prepareDeleteUser(java.sql.PreparedStatement ps,
java.lang.Long hend,
long id)
Sets the input parameters for the deleteUser prepared statement. |
static void |
prepareGetAuthenticatedUser(java.sql.PreparedStatement ps,
java.lang.String userId,
java.lang.String passwordHash)
Sets the input parameters for the getAuthenticatedUser prepared statement. |
static void |
prepareGetUserId(java.sql.PreparedStatement ps,
java.lang.String userId)
Sets the input parameters for the getUserId prepared statement. |
static void |
prepareInsertUser(java.sql.PreparedStatement ps,
long id,
java.lang.String userId,
java.lang.String passwordHash,
long defaultRoleId,
long defaultAclId,
java.lang.Long modified)
Sets the input parameters for the insertUser prepared statement. |
static void |
prepareSelectUser(java.sql.PreparedStatement ps,
long id)
Sets the input parameters for the selectUser prepared statement. |
static void |
prepareUpdateUser(java.sql.PreparedStatement ps,
java.lang.String userId,
java.lang.String passwordHash,
long defaultRoleId,
long defaultAclId,
long id)
Sets the input parameters for the updateUser prepared statement. |
static UserRdbWrapper.SelectUserResult |
selectUser(PreparedStatementCache sqlCache,
long id)
Runs the selectUser prepared statement. |
static UserRdbWrapper.SelectUserResult |
selectUser(PreparedStatementCache sqlCache,
long id,
UserRdbWrapper.SelectUserResult result)
Runs the selectUser prepared statement. |
static void |
updateUser(PreparedStatementCache sqlCache,
java.lang.String userId,
java.lang.String passwordHash,
long defaultRoleId,
long defaultAclId,
long id)
Runs the updateUser prepared statement. |
static void |
updateUser(PreparedStatementCache sqlCache,
UserRdbWrapper.UpdateUserParams params)
Runs the updateUser 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 selectUser
SELECT USERID,PASSWORDHASH, DEFAULTROLEID, DEFAULTACLID,HEND FROM USERS WHERE ID = ? AND HEND IS NULL;
public static final java.lang.String getAuthenticatedUser
SELECT ID FROM USERS WHERE USERID = ? AND PASSWORDHASH=? AND HEND IS NULL;
public static final java.lang.String getUserId
SELECT ID FROM USERS WHERE USERID = ? AND HEND IS NULL;
public static final java.lang.String insertUser
INSERT INTO USERS (ID, USERID,PASSWORDHASH, DEFAULTROLEID, DEFAULTACLID,HSTART) VALUES (?, ?,?, ?, ?,?);
public static final java.lang.String deleteUser
UPDATE USERS SET HEND=? WHERE ID = ? AND HEND IS NULL;
public static final java.lang.String updateUser
UPDATE USERS SET USERID=?,PASSWORDHASH=?,DEFAULTROLEID=?,DEFAULTACLID=? WHERE ID = ? AND HEND IS NULL;
| Constructor Detail |
|---|
public UserRdbWrapper()
| Method Detail |
|---|
public static UserRdbWrapper.SelectUserResult selectUser(PreparedStatementCache sqlCache,
long id)
throws AnzoException,
java.sql.SQLException
SELECT USERID,PASSWORDHASH, DEFAULTROLEID, DEFAULTACLID,HEND FROM USERS WHERE ID = ? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsid - template parameter
AnzoException
java.sql.SQLException
public static UserRdbWrapper.SelectUserResult selectUser(PreparedStatementCache sqlCache,
long id,
UserRdbWrapper.SelectUserResult result)
throws AnzoException,
java.sql.SQLException
SELECT USERID,PASSWORDHASH, DEFAULTROLEID, DEFAULTACLID,HEND FROM USERS WHERE ID = ? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsid - template parameterresult - SelectUserResult result object
AnzoException
java.sql.SQLException
public static void prepareSelectUser(java.sql.PreparedStatement ps,
long id)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setid - template parameter
java.sql.SQLException
public static java.lang.Long getAuthenticatedUser(PreparedStatementCache sqlCache,
UserRdbWrapper.GetAuthenticatedUserParams params)
throws AnzoException,
java.sql.SQLException
SELECT ID FROM USERS WHERE USERID = ? AND PASSWORDHASH=? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsparams - GetAuthenticatedUserParams input Interface
AnzoException
java.sql.SQLException
public static java.lang.Long getAuthenticatedUser(PreparedStatementCache sqlCache,
java.lang.String userId,
java.lang.String passwordHash)
throws AnzoException,
java.sql.SQLException
SELECT ID FROM USERS WHERE USERID = ? AND PASSWORDHASH=? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsuserId - template parameterpasswordHash - template parameter
AnzoException
java.sql.SQLException
public static void prepareGetAuthenticatedUser(java.sql.PreparedStatement ps,
java.lang.String userId,
java.lang.String passwordHash)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setuserId - template parameterpasswordHash - template parameter
java.sql.SQLException
public static java.lang.Long getUserId(PreparedStatementCache sqlCache,
java.lang.String userId)
throws AnzoException,
java.sql.SQLException
SELECT ID FROM USERS WHERE USERID = ? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsuserId - template parameter
AnzoException
java.sql.SQLException
public static void prepareGetUserId(java.sql.PreparedStatement ps,
java.lang.String userId)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setuserId - template parameter
java.sql.SQLException
public static void insertUser(PreparedStatementCache sqlCache,
UserRdbWrapper.InsertUserParams params)
throws AnzoException,
java.sql.SQLException
INSERT INTO USERS (ID, USERID,PASSWORDHASH, DEFAULTROLEID, DEFAULTACLID,HSTART) VALUES (?, ?,?, ?, ?,?);
sqlCache - factory and cache of PreparedStatmentsparams - InsertUserParams input Interface
AnzoException
java.sql.SQLException
public static void insertUser(PreparedStatementCache sqlCache,
long id,
java.lang.String userId,
java.lang.String passwordHash,
long defaultRoleId,
long defaultAclId,
java.lang.Long modified)
throws AnzoException,
java.sql.SQLException
INSERT INTO USERS (ID, USERID,PASSWORDHASH, DEFAULTROLEID, DEFAULTACLID,HSTART) VALUES (?, ?,?, ?, ?,?);
sqlCache - factory and cache of PreparedStatmentsid - template parameteruserId - template parameterpasswordHash - template parameterdefaultRoleId - template parameterdefaultAclId - template parametermodified - template parameter
AnzoException
java.sql.SQLException
public static void prepareInsertUser(java.sql.PreparedStatement ps,
long id,
java.lang.String userId,
java.lang.String passwordHash,
long defaultRoleId,
long defaultAclId,
java.lang.Long modified)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setid - template parameteruserId - template parameterpasswordHash - template parameterdefaultRoleId - template parameterdefaultAclId - template parametermodified - template parameter
java.sql.SQLException
public static void deleteUser(PreparedStatementCache sqlCache,
UserRdbWrapper.DeleteUserParams params)
throws AnzoException,
java.sql.SQLException
UPDATE USERS SET HEND=? WHERE ID = ? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsparams - DeleteUserParams input Interface
AnzoException
java.sql.SQLException
public static void deleteUser(PreparedStatementCache sqlCache,
java.lang.Long hend,
long id)
throws AnzoException,
java.sql.SQLException
UPDATE USERS SET HEND=? WHERE ID = ? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentshend - template parameterid - template parameter
AnzoException
java.sql.SQLException
public static void prepareDeleteUser(java.sql.PreparedStatement ps,
java.lang.Long hend,
long id)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are sethend - template parameterid - template parameter
java.sql.SQLException
public static void updateUser(PreparedStatementCache sqlCache,
UserRdbWrapper.UpdateUserParams params)
throws AnzoException,
java.sql.SQLException
UPDATE USERS SET USERID=?,PASSWORDHASH=?,DEFAULTROLEID=?,DEFAULTACLID=? WHERE ID = ? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsparams - UpdateUserParams input Interface
AnzoException
java.sql.SQLException
public static void updateUser(PreparedStatementCache sqlCache,
java.lang.String userId,
java.lang.String passwordHash,
long defaultRoleId,
long defaultAclId,
long id)
throws AnzoException,
java.sql.SQLException
UPDATE USERS SET USERID=?,PASSWORDHASH=?,DEFAULTROLEID=?,DEFAULTACLID=? WHERE ID = ? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsuserId - template parameterpasswordHash - template parameterdefaultRoleId - template parameterdefaultAclId - template parameterid - template parameter
AnzoException
java.sql.SQLException
public static void prepareUpdateUser(java.sql.PreparedStatement ps,
java.lang.String userId,
java.lang.String passwordHash,
long defaultRoleId,
long defaultAclId,
long id)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setuserId - template parameterpasswordHash - template parameterdefaultRoleId - template parameterdefaultAclId - template parameterid - template parameter
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||