Databases Reference
In-Depth Information
The Key Exists validator
This validator is used to check if the key value exists for an enity object. The key value can
be a primary key, foreign key, or an alternate key. The Key Exists validator is used to find
the key from the enity cache, and if the key is not found, the value is determined from the
database. Because of this reason, the Key Exists validator is considered to give beter
performance. For example, when an employee is assigned to a department deptNo 50
and you want to make sure that deptNo 50 already exists in the DEPT table.
The Length validator
This validator is used to check the string length of an atribute value. The comparison is
based on the character or byte length.
The List validator
This validator is used to create a validaion for the atribute in a list. The operators included
in this validaion are In and NotIn . These two operators help the validaion rule check if an
atribute value is in a list.
The Method validator
Someimes, we would like to add our own validaion with some extra logic coded in our Java
class ile. For this purpose, ADF provides a declaraive validator to map the validaion rule
against a method in the enity-implementaion class. The implementaion class is generated
in the Java secion of the enity object. We need to create and select a method to handle
method validaion. The method is named as validateXXX() , and the returned value will
be of the Boolean type.
The Range validator
This validator is used to add a rule to validate a range for the atribute value. The operators
included are Between and NotBetween . The range will have a minimum and maximum
value that can be entered for the atribute.
 
Search WWH ::




Custom Search