Interface CustomerAccountService<P extends CustomerAccount>
- All Known Implementing Classes:
DefaultCustomerAccountService
public interface CustomerAccountService<P extends CustomerAccount>
Service for managing
CustomerAccounts.-
Method Summary
Modifier and TypeMethodDescriptionvoidDelete aCustomerAccount.getAccountAncestors(String accountId) Get a list of all parent accounts for the account with the given id.getAccountInheritanceLine(String accountId) Returns the account and all of its ancestors in order with the given account first.getAllAccountsDescendants(Collection<String> accountIds) Gets a list of all child accounts/sub-accounts for the accounts with the given ids.readAllByParentAccountIdIn(Collection<String> parentAccountIds) Find a list ofCustomerAccountby their parent account ids.readByAccountId(String accountId) Find aCustomerAccountby its account id.Save aCustomerAccount,
-
Method Details
-
readByAccountId
Find aCustomerAccountby its account id.- Parameters:
accountId- The account id to look-up theCustomerAccount.- Returns:
- The
CustomerAccountfor the given account id.
-
readAllByParentAccountIdIn
Find a list ofCustomerAccountby their parent account ids.- Parameters:
parentAccountIds- The parent account id to look-up theCustomerAccount.- Returns:
- The list of
CustomerAccountfor the given parent account id.
-
save
Save aCustomerAccount,- Parameters:
customerAccount- TheCustomerAccountto save.- Returns:
- The persisted
CustomerAccount.
-
delete
Delete aCustomerAccount.- Parameters:
customerAccount- TheCustomerAccountto delete.
-
getAccountAncestors
Get a list of all parent accounts for the account with the given id. The returned list does not include the given account id.- Parameters:
accountId- The id of the account for which to lookup ancestors- Returns:
- A list of ids of ancestors to the given account id.
-
getAccountInheritanceLine
Returns the account and all of its ancestors in order with the given account first.- Parameters:
accountId- The account whose inheritance line to build.- Returns:
- The account and all of its ancestors in order with the given account first.
-
getAllAccountsDescendants
Gets a list of all child accounts/sub-accounts for the accounts with the given ids. The returned list does not include the given account ids.- Parameters:
accountIds- The id of the account for which to lookup descendants- Returns:
- A list of ids of descendants for the given account ids.
-