Class MembershipHierarchyServiceImpl
java.lang.Object
ch.tocco.nice2.optional.membershiphierarchy.impl.MembershipHierarchyServiceImpl
- All Implemented Interfaces:
MembershipHierarchyService
-
Constructor Summary
ConstructorDescriptionMembershipHierarchyServiceImpl
(Context context, TaskSchedulingService taskSchedulingService, QueryBuilderFactory queryBuilderFactory) -
Method Summary
Modifier and TypeMethodDescriptiongetChildAddressSet
(Entity sourceAddress) Get the pks of all addresses that are below the given address in the hierarchy (including the given address)getParentAddressList
(Entity sourceAddress) Get all addresses that are above the given address in the hierarchy (including the given address) If any address in a given hierarchy has multiple parents this method will throw a runtime exception.void
Call Action to recalculate hierarchies on all addresses Call Syntax: nice2_optional_membershiphierarchy_MembershipHierarchyService.migrateHierarchies This method callsMembershipHierarchyService.submitRecalculateHierarchiesTask(Set)
with all address keysvoid
submitRecalculateHierarchiesTask
(Set<PrimaryKey> addressKeys) Initialises the RecalculateHierarchyTask and submits it into the task queue
-
Constructor Details
-
MembershipHierarchyServiceImpl
public MembershipHierarchyServiceImpl(Context context, @Lazy TaskSchedulingService taskSchedulingService, QueryBuilderFactory queryBuilderFactory)
-
-
Method Details
-
getParentAddressList
Description copied from interface:MembershipHierarchyService
Get all addresses that are above the given address in the hierarchy (including the given address) If any address in a given hierarchy has multiple parents this method will throw a runtime exception.- Specified by:
getParentAddressList
in interfaceMembershipHierarchyService
-
getChildAddressSet
Description copied from interface:MembershipHierarchyService
Get the pks of all addresses that are below the given address in the hierarchy (including the given address)- Specified by:
getChildAddressSet
in interfaceMembershipHierarchyService
-
submitRecalculateHierarchiesTask
Description copied from interface:MembershipHierarchyService
Initialises the RecalculateHierarchyTask and submits it into the task queue- Specified by:
submitRecalculateHierarchiesTask
in interfaceMembershipHierarchyService
-
migrateHierarchies
public void migrateHierarchies()Description copied from interface:MembershipHierarchyService
Call Action to recalculate hierarchies on all addresses Call Syntax: nice2_optional_membershiphierarchy_MembershipHierarchyService.migrateHierarchies This method callsMembershipHierarchyService.submitRecalculateHierarchiesTask(Set)
with all address keys- Specified by:
migrateHierarchies
in interfaceMembershipHierarchyService
-