-
Book Overview & Buying
-
Table Of Contents
Oracle JDeveloper 11gR2 Cookbook
By :
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.
1. Right-click on the com.packt.jdeveloper.cookbook.hr.components.model.view package of the HRComponentsBC business components project of the HRComponents workspace, and select New View Object….
2. Use the Create View Object wizard to create a SQL query view object called EmployeeCount based on the following query:
SELECT COUNT(*) AS EMPLOYEE_COUNT FROM EMPLOYEES WHERE DEPARTMENT_ID = :DepartmentId
3. While on the Create View Object wizard, also do the...
Change the font size
Change margin width
Change background colour