摘自Connecting Business Objects to Relational Databases
Provide a layer for mapping your objects to the RDBMS or other database.
All persistent object need, at a minimum, create, read, update, and delete
SQL Code Description
Defines the actual SQL code that takes the values from the RDBMS or other
database and retrieves them for the object’s use and vice-versa. It is used to
generate the SQL for performing the CRUD operations.
Attribute Mapping Methods
Maps the values between the database values and attributes. This pattern also
handles complex object mappings. Populates the object(s) with the row values.
Type Conversion Works with Attribute Mapping Methods to translates values from the database to
the appropriate object types and vice-versa. Insures data integrity.
Keeps track of when an object’s values have been changed for maintaining
consistency with the database. It determines the need to write the values to a
database table or not.
Generates Unique Keys for the Object Ids during an insert.
Transaction Manager Provides a mechanism to handle transactions while saving objects.
Gets and maintains a connection to the database.
Manages the mappings from an object to its database table(s) and column(s).