Using a method validator based on a view object accessor
In this recipe, we will show how to validate an entity object against a view accessor
using a custom entity method validator. The use case that we will cover—based on the
HR schema—will not allow the user to enter more than a specified number of employees per department.
We will be using the
HRComponents workspace that we created in the previous recipes in this chapter so that we don't repeat these steps again. You will need access to the
HR database schema.
How to do it…
- Right-click on the
com.packt.jdeveloper.cookbook.hr.components.model.viewpackage of the
HRComponentsBCbusiness components project of the
HRComponentsworkspace, and select New View Object….
- Use the Create View ...