com.h3c.util.persistence

## Interface Storable<I extends Serializable>

- Type Parameters:
    `I` - Type of the Row Key of this storable object.
  All Known Implementing Classes:
    CassandraStorable, DynamicStorable

      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.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `I` | `getId()` Retrieve the Row Key associated with the Storable.

- - ### Method Detail

    - #### getId

          I getId()

      Retrieve the Row Key associated with the Storable. Unless it is a batch operation, the Storable maps to one row of a Column Family. This method is used to retrieve the Row Key for a given row.
      Returns:
        The Object Identification (Row Key)

Copyright © 2014. All Rights Reserved.