Entity components present an object view of relational data to clients; each instance of an entity component maps to a row in a database relation.
Entity components must be EJB entity Beans implemented according to the EJB 1.1 standard (see Chapter 6, “Working with EJB Packages and Components”). You can implement entity components by following these requirements:
Define a primary key type for the component. See “Allowable primary key types” for more information.
Create a home interface for the component with a findByPrimaryKey method and, optionally, additional finder and create methods. See Patters for finder methods for more information.
For an entity component, you can manage persistence using these techniques:
Component managed In this technique, you implement the code that reads and writes persistent data and maps the relational column values to fields in the implementation class. This model corresponds to the Bean Managed Persistence model required by the EJB 1.1 specification.
Automatic persistence In this technique, EJB Server manages the storage and retrieval of persistent data.
Generated class In this technique, a generated Java class saves and restores component state from a remote database. The Adaptive Server plug-in does not generate such classes, but third-party tool vendors can use this option. The generated class can inherit from or delegate to the component’s implementation class to save and restore component state.