(Deletion) Analytical object deletion handling

Registered by Lars Helge Øverland on 2015-12-07

Improve handling of deletion of objects which are associated with analytical objects. Analytical objects include ReportTable, Chart, MapView, EventReport and EventChart.

The objects for which improve deletion includes Indicator, DataElement, DataSet, ProgramIndicator and OrganisationUnit.

It should be possible to delete the mentioned objects even if they are associated with the mentioned analytical objects. An object should be removed from the analytical objects it is associated with. The analytical object should then be updated to persist the change.

--
Implementation notes
--

A pattern to solve this problem can be to first perform a query to fetch all analytical objects which are associated with the object to delete, then iterate over the analytical objects, remove the objects to be deleted and finally update the analytical object.

This can be achieved by extending the HibernateAnalyticalObjectStore class to include methods for retrieving analytical objects with associations to a specific object. E.g. add methods:

List<? extends AnalyticalObject> getAnalyticalObjects( Indicator indicator );
List<? extends AnalyticalObject> getAnalyticalObjects( DataElement dataElement );

The implementation should be integrated with the DeletionHandler solution. E.g. in ReportTableDeletionHandler, one must handle the updates to report tables when objects (e.g. Indicators, Organisation units) are deleted.

Blueprint information

Status:
Complete
Approver:
Lars Helge Øverland
Priority:
Undefined
Drafter:
Lars Helge Øverland
Direction:
Approved
Assignee:
Lars Helge Øverland
Definition:
New
Series goal:
Accepted for trunk
Implementation:
Implemented
Milestone target:
milestone icon 2.22
Started by
Lars Helge Øverland on 2016-01-06
Completed by
Lars Helge Øverland on 2016-01-06

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.