|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.server.repository.rdb.sql.RoleRdbWrapper
public class RoleRdbWrapper
RoleRdbWrapper provides wrappers around SQL queries and transforms ResultSets into java objects
| 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 |
|---|
public static final java.lang.String roleExists
SELECT COUNT(*) FROM ROLES WHERE ID = ? AND HEND IS NULL;
public static final java.lang.String insertRole
INSERT INTO ROLES (ID,HSTART) VALUES (?,?);
public static final java.lang.String insertSubRoleOf
INSERT INTO SUBROLEOF (ID, PARENTID,HSTART) VALUES (?, ?, ?);
public static final java.lang.String deleteSubRoleOf
UPDATE SUBROLEOF SET HEND=? WHERE ID=? AND PARENTID=?;
public static final java.lang.String selectParentRoles
SELECT PARENTID FROM SUBROLEOF WHERE ID = ? AND HEND IS NULL;
public static final java.lang.String selectChildRoles
SELECT ID FROM SUBROLEOF WHERE PARENTID = ? AND HEND IS NULL;
public static final java.lang.String deleteRole
UPDATE ROLES SET HEND=? WHERE ID = ?;
| Constructor Detail |
|---|
public RoleRdbWrapper()
| Method Detail |
|---|
public static java.lang.Integer roleExists(PreparedStatementCache sqlCache,
long id)
throws AnzoException,
java.sql.SQLException
SELECT COUNT(*) FROM ROLES WHERE ID = ? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsid - template parameter
AnzoException
java.sql.SQLException
public static void prepareRoleExists(java.sql.PreparedStatement ps,
long id)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setid - template parameter
java.sql.SQLException
public static void insertRole(PreparedStatementCache sqlCache,
RoleRdbWrapper.InsertRoleParams params)
throws AnzoException,
java.sql.SQLException
INSERT INTO ROLES (ID,HSTART) VALUES (?,?);
sqlCache - factory and cache of PreparedStatmentsparams - InsertRoleParams input Interface
AnzoException
java.sql.SQLException
public static void insertRole(PreparedStatementCache sqlCache,
long id,
java.lang.Long modified)
throws AnzoException,
java.sql.SQLException
INSERT INTO ROLES (ID,HSTART) VALUES (?,?);
sqlCache - factory and cache of PreparedStatmentsid - template parametermodified - template parameter
AnzoException
java.sql.SQLException
public static void prepareInsertRole(java.sql.PreparedStatement ps,
long id,
java.lang.Long modified)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setid - template parametermodified - template parameter
java.sql.SQLException
public static void insertSubRoleOf(PreparedStatementCache sqlCache,
RoleRdbWrapper.InsertSubRoleOfParams params)
throws AnzoException,
java.sql.SQLException
INSERT INTO SUBROLEOF (ID, PARENTID,HSTART) VALUES (?, ?, ?);
sqlCache - factory and cache of PreparedStatmentsparams - InsertSubRoleOfParams input Interface
AnzoException
java.sql.SQLException
public static void insertSubRoleOf(PreparedStatementCache sqlCache,
long roleId,
long parentRoleId,
java.lang.Long modified)
throws AnzoException,
java.sql.SQLException
INSERT INTO SUBROLEOF (ID, PARENTID,HSTART) VALUES (?, ?, ?);
sqlCache - factory and cache of PreparedStatmentsroleId - template parameterparentRoleId - template parametermodified - template parameter
AnzoException
java.sql.SQLException
public static void prepareInsertSubRoleOf(java.sql.PreparedStatement ps,
long roleId,
long parentRoleId,
java.lang.Long modified)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setroleId - template parameterparentRoleId - template parametermodified - template parameter
java.sql.SQLException
public static void deleteSubRoleOf(PreparedStatementCache sqlCache,
RoleRdbWrapper.DeleteSubRoleOfParams params)
throws AnzoException,
java.sql.SQLException
UPDATE SUBROLEOF SET HEND=? WHERE ID=? AND PARENTID=?;
sqlCache - factory and cache of PreparedStatmentsparams - DeleteSubRoleOfParams input Interface
AnzoException
java.sql.SQLException
public static void deleteSubRoleOf(PreparedStatementCache sqlCache,
java.lang.Long hend,
long roleId,
long parentRoleId)
throws AnzoException,
java.sql.SQLException
UPDATE SUBROLEOF SET HEND=? WHERE ID=? AND PARENTID=?;
sqlCache - factory and cache of PreparedStatmentshend - template parameterroleId - template parameterparentRoleId - template parameter
AnzoException
java.sql.SQLException
public static void prepareDeleteSubRoleOf(java.sql.PreparedStatement ps,
java.lang.Long hend,
long roleId,
long parentRoleId)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are sethend - template parameterroleId - template parameterparentRoleId - template parameter
java.sql.SQLException
public static ClosableIterator<java.lang.Long> selectParentRoles(PreparedStatementCache sqlCache,
long id)
throws AnzoException,
java.sql.SQLException
SELECT PARENTID FROM SUBROLEOF WHERE ID = ? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsid - template parameter
AnzoException
java.sql.SQLException
public static ClosableIterator<java.lang.Long> selectParentRoles(PreparedStatementCache sqlCache,
long id,
Transformer<java.lang.Long> transform)
throws AnzoException,
java.sql.SQLException
SELECT PARENTID FROM SUBROLEOF WHERE ID = ? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsid - template parametertransform - org.openanzo.jdbc.utils.TransformerAnzoException
java.sql.SQLException
public static void prepareSelectParentRoles(java.sql.PreparedStatement ps,
long id)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setid - template parameter
java.sql.SQLException
public static ClosableIterator<java.lang.Long> selectChildRoles(PreparedStatementCache sqlCache,
long id)
throws AnzoException,
java.sql.SQLException
SELECT ID FROM SUBROLEOF WHERE PARENTID = ? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsid - template parameter
AnzoException
java.sql.SQLException
public static ClosableIterator<java.lang.Long> selectChildRoles(PreparedStatementCache sqlCache,
long id,
Transformer<java.lang.Long> transform)
throws AnzoException,
java.sql.SQLException
SELECT ID FROM SUBROLEOF WHERE PARENTID = ? AND HEND IS NULL;
sqlCache - factory and cache of PreparedStatmentsid - template parametertransform - org.openanzo.jdbc.utils.TransformerAnzoException
java.sql.SQLException
public static void prepareSelectChildRoles(java.sql.PreparedStatement ps,
long id)
throws java.sql.SQLException
ps - PreparedStatement to whose parameters are setid - template parameter
java.sql.SQLException
public static void deleteRole(PreparedStatementCache sqlCache,
RoleRdbWrapper.DeleteRoleParams params)
throws AnzoException,
java.sql.SQLException
UPDATE ROLES SET HEND=? WHERE ID = ?;
sqlCache - factory and cache of PreparedStatmentsparams - DeleteRoleParams input Interface
AnzoException
java.sql.SQLException
public static void deleteRole(PreparedStatementCache sqlCache,
java.lang.Long hend,
long id)
throws AnzoException,
java.sql.SQLException
UPDATE ROLES SET HEND=? WHERE ID = ?;
sqlCache - factory and cache of PreparedStatmentshend - template parameterid - template parameter
AnzoException
java.sql.SQLException
public static void prepareDeleteRole(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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||