public interface EntryGroupService
EntryGroup operations.| Modifier and Type | Method and Description |
|---|---|
int |
findMaxGroupNumber(java.util.List<EntryGroup> roots)
Searches for maximum value of
EntryGroup.getGroupNumber(). |
void |
forceOrderSaving(AbstractOrderModel order)
As
EntryGroup is not a DB entity, changing it does not cause parent order to save. |
EntryGroup |
getGroup(AbstractOrderModel order,
java.lang.Integer groupNumber)
Returns
EntryGroup by groupNumber |
EntryGroup |
getGroupOfType(AbstractOrderModel order,
java.util.Collection<java.lang.Integer> groupNumbers,
GroupType type)
Find entry group in the cart by number and type.
|
java.util.List<EntryGroup> |
getLeaves(EntryGroup entryGroup)
Returns all leaf
EntryGroups of given one. |
java.util.List<EntryGroup> |
getNestedGroups(EntryGroup entryGroup)
Gets all nested
EntryGroups of given one, including the given one. |
EntryGroup |
getParent(AbstractOrderModel order,
java.lang.Integer groupNumber)
Returns parent entry group of the tree within the order's entry group trees which has given group.
|
EntryGroup |
getRoot(AbstractOrderModel order,
java.lang.Integer groupNumber)
Returns root of the tree within the order's entry group trees which has given group.
|
java.util.List<EntryGroup> getNestedGroups(EntryGroup entryGroup)
EntryGroups of given one, including the given one.entryGroup - root EntryGroupEntryGroups for subtree where the given EntryGroup is root, including the rootjava.util.List<EntryGroup> getLeaves(EntryGroup entryGroup)
EntryGroups of given one. If that one is already leaf it will return itself.entryGroup - root EntryGroupEntryGroups for subtree where the given EntryGroup is root or given
EntryGroup if it is a leaf.EntryGroup getGroup(AbstractOrderModel order, java.lang.Integer groupNumber)
EntryGroup by groupNumbergroupNumber - number of the group to search fororder - order containing entry group treesEntryGroup with given groupNumber from the orderjava.lang.IllegalArgumentException - if no group with given groupNumber in the orderEntryGroup getRoot(AbstractOrderModel order, java.lang.Integer groupNumber)
order - order to take trees fromgroupNumber - number of group to search forgroupNumberjava.lang.IllegalArgumentException - if group is not foundEntryGroup getParent(AbstractOrderModel order, java.lang.Integer groupNumber)
order - order to take trees fromgroupNumber - number of group to search forgroupNumber or null if it is rootjava.lang.IllegalArgumentException - if group is not found in the cartvoid forceOrderSaving(AbstractOrderModel order)
EntryGroup is not a DB entity, changing it does not cause parent order to save. This method updates the
whole entryGroups field, so the order is marked as changes and correctly saved to DB.order - order to saveint findMaxGroupNumber(java.util.List<EntryGroup> roots)
EntryGroup.getGroupNumber().
Is useful for assigning unique values to entry group numbers.roots - list of root groupsEntryGroup getGroupOfType(AbstractOrderModel order, java.util.Collection<java.lang.Integer> groupNumbers, GroupType type)
order - user's cartgroupNumbers - group numbers of the entrytype - group typeEntryGroup object or null if no groups of given type in collectionAmbiguousIdentifierException - if more than one EntryGroup with provided group type was foundCopyright © 2018 SAP SE. All Rights Reserved.