public abstract class DataAccessObject<EB extends EntityBean> extends Object implements Comparable<DataAccessObject<EB>>
BusinessObject
The BusinessObject represents the data client. It is the object that requires access to the data source to obtain and store data. A BusinessObject may be implemented as a session bean, entity bean, or some other Java object, in addition to a servlet or helper bean that accesses the data source.
DataAccessObject
The DataAccessObject is the primary object of this pattern. The DataAccessObject abstracts the underlying data access implementation for the BusinessObject to enable transparent access to the data source. The BusinessObject also delegates data load and store operations to the DataAccessObject.
DataSource
This represents a data source implementation. A data source could be a database such as an RDBMS, OODBMS, XML repository, flat file system, and so forth. A data source can also be another system (legacy/mainframe), service (B2B service or credit card bureau), or some kind of repository (LDAP).
TransferObject
This represents a Transfer Object used as a data carrier. The DataAccessObject may use a Transfer Object to return data to the client. The DataAccessObject may also receive the data from the client in a Transfer Object to update the data in the data source.
Modifier and Type | Class and Description |
---|---|
static interface |
DataAccessObject.BusinessFactory<DAO extends DataAccessObject<?>> |
Constructor and Description |
---|
DataAccessObject(EditingContext anEditingContext,
Class<EB> aType) |
DataAccessObject(EditingContext anEditingContext,
DataSnapshot aSnapshot) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(DataAccessObject<EB> aBO) |
boolean |
equals(Object obj) |
EditingContext |
getEditingContext() |
EB |
getTransferObject() |
int |
hashCode() |
abstract String |
toDisplayString() |
String |
toKeyString() |
String |
toString() |
public DataAccessObject(EditingContext anEditingContext, Class<EB> aType)
public DataAccessObject(EditingContext anEditingContext, DataSnapshot aSnapshot)
public int compareTo(DataAccessObject<EB> aBO)
compareTo
in interface Comparable<DataAccessObject<EB extends EntityBean>>
public final EditingContext getEditingContext()
public final EB getTransferObject()
public abstract String toDisplayString()
public final String toKeyString()