I
- Type of the Row Key of this storable object.public interface Storable<I extends Serializable>
Storable
is a contract between the Data Access Object and the
Entity Manager. This interface provides the ability for the data to
be transported to the database.
The Sequence of flow of data is as follows.
1) The business logic passes the data to be persisted to the DAO using the
TransportObject
object.
2) The DAO has the intelligence to figure out what the query is, the various
filter conditions the query needs to adhere to and passes the data down
to the Entity Manager in the Storable format.
3) The Entity Manager understands the data only in a Storable format. This
is a single mode of communication between the Application and the
Entity Manager. The Application in this context is DAO and layers above.
The Entity Manager reads the Storable and converts into a format that
the underlying Database conforms to. The Data is then written to the DB
or the query is executed to retrieve the relevant information from the DB.
During a Read operation, the data read from the DB is converted back to
the Storable format and passed back to the DAO.
4) The DAO converts the Storable data into TransportObject data and returns it
to the business logic
getId()
retrieves the Row Key(Primary Key) of the
Storable object.I getId()
Copyright © 2015. All Rights Reserved.