|
ProgramixGenericLib v4.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface GenericDA
Used to implementation the very useful "Data Access Layer" abstraction.
This interface is extended to provide a useful collection of methods. Each
method should perform a 'unit of work'. Most methods should declare that they
might throw DAException to indicate an underlying problem (such
as an IOException, SQLException, etc.
Application-specific exceptions can be thrown in addition to
DAException and there are many pre-defined subclasses
of DAException (and developers can create additional subclasses
as desired).
DAFactory has many create methods to automate
the task of instantiating and initializing an instance.
NOTE: all implementations must have a public zero-argument constructor.
| Method Summary | |
|---|---|
void |
init(ValueMap config)
Called once just after construction to allow the implementation to setup everything required to run. |
void |
shutdown()
This should be called when the DA is no longer needed to clean up any potential resources being used behind the scenes. |
| Method Detail |
|---|
void init(ValueMap config)
throws DAException
config - all the settings needed to complete initialization
DAException - if initialization could not complete,
possibly chained to an underlying cause.void shutdown()
No other methods should be called after this method.
Calling other methods after calling this method results in
undefined behavior (many times, a ShutdownDAException will be
thrown when attempting to invoke those other methods, but there is
no requirement that all methods do this).
Calling shutdown() more than one time must be allowed and shutdown() must not complain. Also note that shutdown() never throws any exceptions—it just makes its best effort of close down everything. Implementations must assure that this remains true.
|
ProgramixGenericLib v4.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||