|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.edg.security.voms.database.connection.Database
A fa?ade class for executing operations (questions and actions) in the database, hiding the gory details of transaction management behind a simple interface.
Field Summary | |
private static org.apache.log4j.Logger |
log
Logger. |
private static int |
MAX_TRANSACTION_RESTARTS
|
Constructor Summary | |
Database()
|
Method Summary | |
static java.lang.Object |
ask(Question question)
Ask the given question by calling its Question.ask() method in the
appropriate environment.
|
static java.lang.Object |
execute(DirectManipulation op)
Execute the SQL commands in the given DirectManipulation by
calling its DirectManipulation.execute(org.edg.security.voms.database.connection.DirectUpdate) method in the appropriate
environment. |
static java.lang.Object |
perform(Action action)
Perform the given action by calling its Action.performWithResult() method in the
appropriate environment.
|
static java.lang.Object |
performDirectly(Action action)
Perform a given action without regard for security. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final int MAX_TRANSACTION_RESTARTS
private static org.apache.log4j.Logger log
Constructor Detail |
public Database()
Method Detail |
public static java.lang.Object perform(Action action) throws VOMSException
Action.performWithResult()
method in the
appropriate environment.
This method takes care of
Action.checkPermission()
),If the transaction failed with a database error, the action is automatically retried with a new connection. Any other exception is passed up to the caller.
null
if the action is valueless.
VOMSException
public static java.lang.Object performDirectly(Action action) throws VOMSException
perform(org.edg.security.voms.operation.Action)
, but does not do any permission checks.
VOMSException
public static java.lang.Object ask(Question question) throws VOMSException
Question.ask()
method in the
appropriate environment.
This method takes care of
Question.checkPermission()
),If the transaction failed with a database error, the question is automatically retried with a new connection. Any other exception is passed up to the caller.
VOMSException
public static java.lang.Object execute(DirectManipulation op) throws VOMSException
DirectManipulation
by
calling its DirectManipulation.execute(org.edg.security.voms.database.connection.DirectUpdate)
method in the appropriate
environment. This is used for manipulation of the SEQUENCE and REALTIME
tables.
VOMSException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |