Databases Reference
In-Depth Information
Types of validation
Validaion rules are applied to an enity to make sure that only valid values are commited
to the database and to prevent any invalid data from geing saved to the database. In ADF,
we use validaion rules for the enity object to make sure the row is valid all the ime.
There are three types of validaion rules that can be set for the enity objects; they are
as follows:
Enity-level validaion
Atribute-level validaion
Transacion-level validaion
Entity-level validation
As we know, an enity represents a row in the database table. Enity-level validaion is the
business rule that is added to the database row. For example, the validaion rule that has
to be applied to a row is termed as enity-level validaion.
There are two unique declaraive validators that will be available only for enity-level
validaion— Collecion and UniqueKey . The following diagram explains that enity-level
validaions are applied on a single row in the EMP table. The validated row is highlighted
in bold.
EMP
Entity Validation
1
EMP table Rows
2
3
Attribute-level validation
Atribute-level validaions are applied to atributes. Business logic mostly involves speciic
validaions to compare diferent atribute values or to restrict the atributes to a speciic
range. These kinds of validaions are done in atribute-level validaion. Some of the declaraive
validators available in ADF are Compare , Length , and Range .
 
Search WWH ::




Custom Search