|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objecttoolbox.app.BaseService
public class BaseService
Convenience base class for developing services.
The following is provided:
| Constructor Summary | |
|---|---|
BaseService()
|
|
| Method Summary | |
|---|---|
protected boolean |
checkConstraint(java.lang.String query,
java.lang.Object[] params)
Convenience method to check a single foreign key constraint. |
void |
create()
Creates all the convenience members provided by this base service implementation. |
java.util.List |
customExec(Query query)
Executes the given query and returns the result as a List instance. |
protected java.util.List |
customExec(java.lang.String query)
Convenience method to execute a query without parameters. |
void |
destroy()
Destroy this service. |
protected AppEnv |
getAppEnv()
Returns the AppEnv instance for this service. |
protected java.lang.String |
getConfigHome()
Returns the location of the services configuration home |
protected DaoWorker |
getDaoWorker()
Returns the DaoWorker for this service. |
java.lang.String |
getName()
Returns the name of this service |
protected java.util.Properties |
getProperties()
Return the configuration properties of this service. |
protected java.lang.String |
getProperty(java.lang.String name)
Returns the value of a single service property. |
protected XMLProperties |
getXMLProperties()
Returns the XML configuration properties of this service. |
protected void |
insertAppBean(java.lang.String table,
AppBean bean)
Convenience method to insert the properties of the given AppBean into the named table. |
protected void |
insertAppBean(java.lang.String table,
AppBean bean,
TransactionContext tc)
Convenience method to insert the properties of the given AppBean into the named table within the given transaction context. |
protected void |
setName(java.lang.String name)
Set the name of this service. |
protected void |
updateAppBean(java.lang.String table,
AppBean bean)
Convienience method to to update the properties of the given AppBean in the named table. |
protected void |
updateAppBean(java.lang.String table,
AppBean bean,
TransactionContext tc)
Convienience method to to update the properties of the given AppBean in the named table within the given TransactionContext. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseService()
| Method Detail |
|---|
public void create()
throws AppException
AppExceptionpublic java.lang.String getName()
protected void setName(java.lang.String name)
name - Set the name of this service.protected XMLProperties getXMLProperties()
protected java.util.Properties getProperties()
protected java.lang.String getProperty(java.lang.String name)
name - Name of property to return
protected java.lang.String getConfigHome()
protected DaoWorker getDaoWorker()
protected AppEnv getAppEnv()
protected java.util.List customExec(java.lang.String query)
throws AppException
query - Query to execute.
AppException
public java.util.List customExec(Query query)
throws AppException
query - Query instance containing query information.
AppException - if the query cannot be executed.
protected boolean checkConstraint(java.lang.String query,
java.lang.Object[] params)
throws AppException
The query must return a single column named "count". If the count is greater than 0 the constraint succeeds.
query - Constraint query string.params - Constraint parameters
AppException - if an exception occurs while checking the constraint.
protected void insertAppBean(java.lang.String table,
AppBean bean)
throws AppException
table - Name of table to insert bean properties.bean - AppBean instance.
AppException - if the bean properties cannot be inserted.
protected void insertAppBean(java.lang.String table,
AppBean bean,
TransactionContext tc)
throws AppException
table - Name of table to insert bean properties.bean - AppBean instance.tc - Current TransactionContext.
AppException - if the bean properties cannot be inserted.
protected void updateAppBean(java.lang.String table,
AppBean bean)
throws AppException
table - Name of table to update.bean - AppBean instance.
AppException - if the bean properties cannot be updated.
protected void updateAppBean(java.lang.String table,
AppBean bean,
TransactionContext tc)
throws AppException
table - Name of table to update.bean - AppBean instance.tc - Current TransactionContext.
AppException - if the bean properties cannot be updated.public void destroy()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||