|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataController
Interface for a general Controller to use for all different data objects.
Implementation of this class should be able to find the DataControl implementation for the type of Object which is provided as paramters through the methods
Implementations would look something like:
public int update(Object o) throws Exception {
return findDc(Object o).update();
}
public DataControl findDc(Object o) throws Exception {
//some method to find and instantiate the DataControl
}
This interface is defined in general terms because no assumptions should be made about the type of datastore so the DataControl must be as general as possible. The most simple implementation would be using a JDBC connection, but you could also use it for XML or flat file datastorage
DataControl
Method Summary | |
---|---|
int |
delete(java.lang.Object o)
delete an object of type o from the datastore |
int |
insert(java.lang.Object o)
insert an object of type o to the datastore |
java.lang.Object |
retrieve(java.lang.Object o,
Condition condition)
retrieve an Object of the type of the Object o which match the supplied
condition. |
java.util.List |
retrieveList(java.lang.Object o,
Condition condition)
retrieve a list of Objects of the type of the Object o which match the supplied
condition. |
int |
update(java.lang.Object o)
update an object of type o to the datastore |
Method Detail |
---|
int update(java.lang.Object o) throws DataException
o
- Object, the object to update
DataException,
- exception thrown if the specific data store controls throw an Exception,
such as a JDBC driver.
DataException
DataControl.update()
int insert(java.lang.Object o) throws DataException
o
- Object, the object to insert
DataException,
- exception thrown if the specific data store controls throw an Exception,
such as a JDBC driver.
DataException
DataControl.insert()
int delete(java.lang.Object o) throws DataException
o
- Object, the object to delete
DataException,
- exception thrown if the specific data store controls throw an Exception,
such as a JDBC driver.
DataException
DataControl.update()
java.lang.Object retrieve(java.lang.Object o, Condition condition) throws DataException
Object
o which match the supplied
condition.
o
- Object the object which determines the type of objects you want to retrieve.
An implementantion should not assume anything about the content of this Object and most
implementations will ignore the values.condition
- Condition the condition which should be met by the retrieved objects
DataException,
- exception thrown if the specific data store controls throw an Exception,
such as a JDBC driver.
DataException
DataControl.retrieveList(Condition)
,
Condition
java.util.List retrieveList(java.lang.Object o, Condition condition) throws DataException
Object
o which match the supplied
condition.
o
- Object the object which determines the type of objects you want to retrieve.
An implementantion should not assume anything about the content of this Object and most
implementations will ignore the values.condition
- Condition the condition which should be met by the retrieved objects
DataException,
- exception thrown if the specific data store controls throw an Exception,
such as a JDBC driver.
DataException
DataControl.retrieveList(Condition)
,
Condition
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |