|
SigPath | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sigpath.task.DBTask
public abstract class DBTask
Specifies a single atomic database operation. DBTask centralizes all transactions, logging, monitoring, and exception handling in one place. This frees the subclasses to focus on business logic.
| Field Summary | |
|---|---|
protected SPDBManager |
dbManager
The SigPath Database Manager. |
protected boolean |
embeddedTask
Flag to denote embedded Tasks. |
protected EntityManager |
entityManager
The SigPath Entity Manager. |
protected ValidationErrors |
errors
Validation Errors for this task. |
protected FullTextSearchManager |
ftsm
The SigPath FullTextSearchManager. |
protected ProgressListener |
progressListener
ProgressListener for Monitoring Tasks. |
protected SigPathFactory |
sigpathFactory
The SigPath factory. |
protected UnitManager |
unitManager
The SigPath Unit Manager. |
protected UserManager |
userManager
The SigPath User Manager. |
protected XDebug |
xdebug
Live XDebug Object. |
| Constructor Summary | |
|---|---|
DBTask()
Construct a new DBTask object. |
|
DBTask(ValidationErrors errors)
Construct a new DBTask object. |
|
| Method Summary | |
|---|---|
protected abstract void |
_execute()
Runs the actual database query(ies)/update(s). |
void |
close()
Closes the dbmanager. |
protected void |
delete(Object object)
Deletes a persistent object from the database. |
void |
execute(XDebug xd)
Executes the database task. |
SPDBManager |
getDbManager()
Gets the database manager associated with this task. |
ValidationErrors |
getErrors()
Gets the ValidationErrors object for this task. |
boolean |
isEmbeddedTask()
Determines if this task is embedded or not. |
boolean |
isTaskThrewException()
Did this task's _execute method throw an exception? |
protected void |
reindex(SigPathEntity spe)
|
protected void |
resolve(Object object)
Resolves a persistent object. |
void |
setDbManager(SPDBManager dbManager)
Sets the dbManager to be used for this task. |
void |
setEmbeddedTask(boolean embeddedTask)
Indicate whether or not the task should be embedded. |
void |
setEmbeddedTask(SPDBManager dbManager)
Indicate that the task should be embedded using the specified SPDBManager. |
void |
setObtainTransactionsFrom(SPDBManager dbManager)
Instructs this task to use transactions from a given db manager. |
void |
setProgressListener(ProgressListener progressListener)
Sets the Progress Listener. |
protected void |
setTaskThrewException(boolean taskThrewException)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SPDBManager dbManager
protected FullTextSearchManager ftsm
protected UserManager userManager
protected EntityManager entityManager
protected SigPathFactory sigpathFactory
protected UnitManager unitManager
protected XDebug xdebug
protected boolean embeddedTask
protected ProgressListener progressListener
protected ValidationErrors errors
| Constructor Detail |
|---|
public DBTask()
public DBTask(ValidationErrors errors)
errors - ValidationErrors object| Method Detail |
|---|
public SPDBManager getDbManager()
public void setDbManager(SPDBManager dbManager)
dbManager - public void setObtainTransactionsFrom(SPDBManager dbManager)
dbManager - Manager of thepublic boolean isEmbeddedTask()
public void setEmbeddedTask(boolean embeddedTask)
embeddedTask - true if the task should not start a transaction
public void execute(XDebug xd)
throws SigPathDatabaseException
execute in interface Taskxd - XDebug object for real-time debugging.
SigPathDatabaseException - error connecting to databasepublic boolean isTaskThrewException()
protected void setTaskThrewException(boolean taskThrewException)
public void close()
throws SigPathDatabaseException
SigPathDatabaseException
protected abstract void _execute()
throws SigPathDatabaseException
SigPathDatabaseException - error connecting to databaseprotected void resolve(Object object)
object - Any persistent object
protected void delete(Object object)
throws SigPathDatabaseException
object - Any persistent object
SigPathDatabaseException - Indicates Error Connecting to Database
protected void reindex(SigPathEntity spe)
throws SigPathDatabaseException
SigPathDatabaseExceptionpublic void setEmbeddedTask(SPDBManager dbManager)
dbManager - Database Manager to use for this task.public void setProgressListener(ProgressListener progressListener)
progressListener - Progress Listener Objectpublic ValidationErrors getErrors()
|
SigPath | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||