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

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

public class UserRdbWrapper
extends java.lang.Object

UserRdbWrapper 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 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

selectUser

public static final 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;

See Also:
Constant Field Values

getAuthenticatedUser

public static final 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;

See Also:
Constant Field Values

getUserId

public static final java.lang.String getUserId
Constant "getUserId" used to reference prepared statement User.getUserId SELECT ID FROM USERS WHERE USERID = ? AND HEND IS NULL;

See Also:
Constant Field Values

insertUser

public static final java.lang.String insertUser
Constant "insertUser" used to reference prepared statement User.insertUser INSERT INTO USERS (ID, USERID,PASSWORDHASH, DEFAULTROLEID, DEFAULTACLID,HSTART) VALUES (?, ?,?, ?, ?,?);

See Also:
Constant Field Values

deleteUser

public static final java.lang.String deleteUser
Constant "deleteUser" used to reference prepared statement User.deleteUser UPDATE USERS SET HEND=? WHERE ID = ? AND HEND IS NULL;

See Also:
Constant Field Values

updateUser

public static final 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;

See Also:
Constant Field Values
Constructor Detail

UserRdbWrapper

public UserRdbWrapper()
Method Detail

selectUser

public static UserRdbWrapper.SelectUserResult selectUser(PreparedStatementCache sqlCache,
                                                         long id)
                                                  throws AnzoException,
                                                         java.sql.SQLException
Runs the selectUser prepared statement. SELECT USERID,PASSWORDHASH, DEFAULTROLEID, DEFAULTACLID,HEND FROM USERS WHERE ID = ? AND HEND IS NULL;

Parameters:
sqlCache - factory and cache of PreparedStatments
id - template parameter
Returns:
SelectUserResult containing the results of the SQL operation
Throws:
AnzoException
java.sql.SQLException

selectUser

public static UserRdbWrapper.SelectUserResult selectUser(PreparedStatementCache sqlCache,
                                                         long id,
                                                         UserRdbWrapper.SelectUserResult result)
                                                  throws AnzoException,
                                                         java.sql.SQLException
Runs the selectUser prepared statement. SELECT USERID,PASSWORDHASH, DEFAULTROLEID, DEFAULTACLID,HEND FROM USERS WHERE ID = ? AND HEND IS NULL;

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

prepareSelectUser

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

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

getAuthenticatedUser

public static java.lang.Long getAuthenticatedUser(PreparedStatementCache sqlCache,
                                                  UserRdbWrapper.GetAuthenticatedUserParams params)
                                           throws AnzoException,
                                                  java.sql.SQLException
Runs the getAuthenticatedUser prepared statement. SELECT ID FROM USERS WHERE USERID = ? AND PASSWORDHASH=? AND HEND IS NULL;

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

getAuthenticatedUser

public static java.lang.Long getAuthenticatedUser(PreparedStatementCache sqlCache,
                                                  java.lang.String userId,
                                                  java.lang.String passwordHash)
                                           throws AnzoException,
                                                  java.sql.SQLException
Runs the getAuthenticatedUser prepared statement. SELECT ID FROM USERS WHERE USERID = ? AND PASSWORDHASH=? AND HEND IS NULL;

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

prepareGetAuthenticatedUser

public static void prepareGetAuthenticatedUser(java.sql.PreparedStatement ps,
                                               java.lang.String userId,
                                               java.lang.String passwordHash)
                                        throws java.sql.SQLException
Sets the input parameters for the getAuthenticatedUser prepared statement.

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

getUserId

public static java.lang.Long getUserId(PreparedStatementCache sqlCache,
                                       java.lang.String userId)
                                throws AnzoException,
                                       java.sql.SQLException
Runs the getUserId prepared statement. SELECT ID FROM USERS WHERE USERID = ? AND HEND IS NULL;

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

prepareGetUserId

public static void prepareGetUserId(java.sql.PreparedStatement ps,
                                    java.lang.String userId)
                             throws java.sql.SQLException
Sets the input parameters for the getUserId prepared statement.

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

insertUser

public static void insertUser(PreparedStatementCache sqlCache,
                              UserRdbWrapper.InsertUserParams params)
                       throws AnzoException,
                              java.sql.SQLException
Runs the insertUser prepared statement. INSERT INTO USERS (ID, USERID,PASSWORDHASH, DEFAULTROLEID, DEFAULTACLID,HSTART) VALUES (?, ?,?, ?, ?,?);

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

insertUser

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
Runs the insertUser prepared statement. INSERT INTO USERS (ID, USERID,PASSWORDHASH, DEFAULTROLEID, DEFAULTACLID,HSTART) VALUES (?, ?,?, ?, ?,?);

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

prepareInsertUser

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
Sets the input parameters for the insertUser prepared statement.

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

deleteUser

public static void deleteUser(PreparedStatementCache sqlCache,
                              UserRdbWrapper.DeleteUserParams params)
                       throws AnzoException,
                              java.sql.SQLException
Runs the deleteUser prepared statement. UPDATE USERS SET HEND=? WHERE ID = ? AND HEND IS NULL;

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

deleteUser

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

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

prepareDeleteUser

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

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

updateUser

public static void updateUser(PreparedStatementCache sqlCache,
                              UserRdbWrapper.UpdateUserParams params)
                       throws AnzoException,
                              java.sql.SQLException
Runs the updateUser prepared statement. UPDATE USERS SET USERID=?,PASSWORDHASH=?,DEFAULTROLEID=?,DEFAULTACLID=? WHERE ID = ? AND HEND IS NULL;

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

updateUser

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
Runs the updateUser prepared statement. UPDATE USERS SET USERID=?,PASSWORDHASH=?,DEFAULTROLEID=?,DEFAULTACLID=? WHERE ID = ? AND HEND IS NULL;

Parameters:
sqlCache - factory and cache of PreparedStatments
userId - template parameter
passwordHash - template parameter
defaultRoleId - template parameter
defaultAclId - template parameter
id - template parameter
Throws:
AnzoException
java.sql.SQLException

prepareUpdateUser

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
Sets the input parameters for the updateUser prepared statement.

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


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