Defining Validation and Business Logic

Business Components for Java provides a framework for defining, implementing, and executing validation logic in middle-tier components. The validation framework provides a consistent programming model that hides internal implementation details. It frees you to focus on rules that prevent users from entering invalid values into the database.

Note that validation is different from an integrity (or "database") constraint. An integrity constraint is a declarative way to define a business rule for a column of a table. Integrity constraints are defined with a table and are stored as part of the table's definition, centrally in the database's data dictionary, so that all database applications adhere to the same set of rules. You use integrity constraints when your clients do not use Business Components for Java.

You can define and apply validation logic by:

The Business Components for Java framework supports various validation levels: you can validate attributes, entities, and the logical business objects. JDeveloper invokes validation logic at the appropriate level when data is created or changed, and assumes that data already in your tables is valid. A query could return a result set that contains invalid values (for example, from legacy data entered before the validation logic was applied), but a user cannot enter an invalid value into the table.