DAO Pattern
Posted: Tue Jun 11, 2013 8:22 am
Hi,
Reading from this oracle article about the DAO Pattern: http://www.oracle.com/technetwork/java/ ... 38824.html
Here is the point where they describe the participants (or actors)of the pattern:
Thanks a lot in advance!
Reading from this oracle article about the DAO Pattern: http://www.oracle.com/technetwork/java/ ... 38824.html
Here is the point where they describe the participants (or actors)of the pattern:
What is exactly a Transfer Object and what is exactly a Business Object? Could you make a real life example to better clarify this doubt?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.
Thanks a lot in advance!