Skip Headers

# Read-Only Descriptors

Previous

Next

When you declare a class as read-only, the read-only declaration extends to its descriptors. You can declare a descriptor as read-only at development time, using either Java code or TopLink Workbench. This option improves performance by excluding the read-only descriptors from unit of work registration and editing.

To flag descriptors as read-only in Java code, call the `setReadOnly` method on the descriptor as follows:

    descriptor.setReadOnly();

To declare a descriptor as read-only in TopLink Workbench, select the Read Only check box for the specific descriptor.

For more information, see "Configuring Read-Only Descriptors".