deephacks/tools4j — Issue #30: Validation of predecessors of changed bean.
Author: krisskross
Created: 2012-01-22 18:42:54+00:00
State: open

There is a need to validate predecessors (i.e. that reference) for beans that is being changed.

Predecessors may have validation constraints on what instances they may reference which may turn them invalid if they are not also validated along with the beans that are changed.

It is the bean managers responsibility to decide which instances require validation after a change is made. It can choose all or a sub-set of instances.

The current JPA2.0 Bean Manager will be implemented like this.

The predecessors that references a bean will be fetched and initalized with their direct, but no further, predecessors. The direct, but no further, successors that a bean reference will be fetched and initalized with their direct, but no further, predecessors.

Changing 1.1.2 in the example below will also fetch its successors 1.1.2.1, 1.1.2.2, but not 1.1.2.1.1, 1.1.2.1.2. Also its predecessor 1.1 and its direct successors 1.1.1, 1.1.3, but not 1.1.3.1. 1.1 and 1.1.2 will be target for validation.

1
|-- 1.1
| |-- 1.1.1
| |-- 1.1.2
| | |-- 1.1.2.1
| | | |-- 1.1.2.1.1
| | | `-- 1.1.2.1.2
| | `-- 1.1.2.2
| `-- 1.1.3
| `-- 1.1.3.1
|-- 1.2
| |-- 1.2.1
| | |-- 1.2.1.1
| | `-- 1.2.1.2
| `-- 1.2.1
`-- 1.3
`-- 1.4