Skip Headers

# Persistent Class Requirements

Previous

Next

The following requirements apply to plain Java objects.

Note: for EJB 2.0 entity beans with container-managed persistence, the bean requirements are defined by the EJB 2.0 specification; for EJB 2.1 entity beans with container-managed persistence, the bean requirements are defined by the EJB 2.1 specification.

You can use direct access on private or protected attributes. For more information on direct and method access, see "Configuring Method Accessing".

When using nontransparent indirection, the attributes must be of the type`ValueHolderInterface` rather than the original attribute type. The value holder does not instantiate a referenced object until it is needed.

TopLink provides transparent indirection for `Collection`, `List`, `Set`, and `Map` attribute types for any collection mappings. Using transparent indirection does not require the use of the `ValueHolderInterface` or any other object model requirements.

See "Indirection" for more information on indirection and transparent indirection.