Oracle® Application Development Framework Developer's Guide For Forms/4GL Developers 10g (10.1.3.1.0) Part Number B25947-01 |
|
|
View PDF |
Complementing its built-in declarative validation features, entity objects have method validators and several events you can handle to implement encapsulated business logic using Java code. By the end of this chapter, you'll understand all the concepts illustrated in Figure 9-1, and more:
Attribute-level method validators trigger validation code when an attribute value changes.
Entity-level method validators trigger validation code when an entity row is validated.
You can override the following key methods in a custom Java class for an entity:
create()
, to assign default values when a row is created
initDefaults()
, to assign defaults either when a row is created or when a new row is refreshed
isAttributeUpdateable()
, to make attributes conditionally updatable
remove()
, to conditionally disallow deleting
prepareForDML()
, to assign attribute values before an entity row is saved
beforeCommit()
, to enforce rules that must consider all entity rows of a given type
afterCommit()
, to send notifications about a change to an entity object's state