Chapter 27: Creating Entity Components
An entity component is an EJB entity bean or a component of another type that implements the CtsComponents::ObjectControl interface. 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 can be EJB entity Beans implemented according to the EJB 2.0, 1.1, or 1.0 standard (see Chapter 7, “Creating Enterprise JavaBeans Components”). You can also implement CORBA entity components by following these requirements:
Use CtsComponents::ObjectControl as the component’s control interface. See “Configuring a control interface”.
Define a primary key type for the component. See “Defining the primary key type” for more information.
Create a home interface for the component with a findByPrimaryKey method and, optionally, additional finder and create methods. See “Patterns for finder methods” for more information.
For an entity component, you can manage persistence using these techniques:
Manual persistence 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 (BMP) model defined by the EJB 2.0 and 1.1 specifications, but has been extended to support other component types.
|Copyright © 2005. Sybase Inc. All rights reserved.|