Interface CreditAccountService<P extends CreditAccount>
- All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>,com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
- All Known Implementing Classes:
DefaultCreditAccountService
public interface CreditAccountService<P extends CreditAccount>
extends com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
Service API for
credit accounts. Supported by
CreditAccountRepository.- Author:
- Dima Myroniuk (dmyroniuk)
-
Method Summary
Modifier and TypeMethodDescriptioncreateCreditAccount(CreateCreditAccountRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Creates the credit account for the provided request.org.springframework.data.domain.Page<P>findAllByAccountNumberIn(List<String> accountNumbers, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all credit accounts for the specified credit account numbers.readAllByContextIdAndMatchingTenant(Iterable<String> contextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves the credit accounts matching the provided IDs and the tenant fromContextInfoif present.org.springframework.data.domain.Page<P>readAllByOwningUserTypeAndOwningUserRefAndType(String owningUserType, String owningUserRef, String creditAccountType, CurrencyContext currencyContext, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all credit account for the specified owning user type, user reference (customer id, account id, email etc), credit account type and currency context.org.springframework.data.domain.Page<P>readAllByOwningUserTypeAndOwningUserRefAndType(String owningUserType, String owningUserRef, String creditAccountType, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all credit account for the specified owning user type, user reference (customer id, account id, email etc) and credit account type.org.springframework.data.domain.Page<P>readAllByOwningUserTypeAndOwningUserRefAndTypeAndAccountNumberIn(String owningUserType, String owningUserRef, String creditAccountType, List<String> accountNumbers, CurrencyContext currencyContext, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all credit accounts for the specified owning user type, user reference (customer id, account id, email etc), credit account type, credit account numbers, and currency context.org.springframework.data.domain.Page<P>readAllByOwningUserTypeAndOwningUserRefAndTypeAndAccountNumberIn(String owningUserType, String owningUserRef, String creditAccountType, List<String> accountNumbers, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all credit accounts for the specified owning user type, user reference (customer id, account id, email etc), credit account type, and credit account numbers.org.springframework.data.domain.Page<P>readAllByOwningUserTypeAndType(String owningUserType, String creditAccountType, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all credit account for the specified owning user type and credit account type.readByAccountNumber(String accountNumber, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads the credit account for the specified account number.readByByOwningUserTypeAndOwningUserRefAndTypeAndAccountNumber(String owningUserType, String owningUserRef, String creditAccountType, String accountNumber, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Searches the credit account for the specified owning user type, owning user reference (customer id, account id, email etc), credit account type and account number.readByByOwningUserTypeAndTypeAndAccountNumber(String owningUserType, String creditAccountType, String accountNumber, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Searches the credit account for the specified owning user type, credit account type and account number.readByTypeAndAccountNumber(String creditAccountType, String accountNumber, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads the credit account for the specified type and account number.Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService
create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSortMethods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService
readAll, readAll, readAll, readAll
-
Method Details
-
readByAccountNumber
Optional<P> readByAccountNumber(String accountNumber, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads the credit account for the specified account number.- Parameters:
accountNumber- the credit account numbercontextInfo- context information related to multitenancy- Returns:
- the credit account for the specified type and account number
-
readByTypeAndAccountNumber
Optional<P> readByTypeAndAccountNumber(String creditAccountType, String accountNumber, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads the credit account for the specified type and account number.- Parameters:
creditAccountType- the credit account typeaccountNumber- the credit account numbercontextInfo- context information related to multitenancy- Returns:
- the credit account for the specified type and account number
-
readByByOwningUserTypeAndTypeAndAccountNumber
Optional<P> readByByOwningUserTypeAndTypeAndAccountNumber(String owningUserType, String creditAccountType, String accountNumber, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Searches the credit account for the specified owning user type, credit account type and account number.- Parameters:
owningUserType- the owning user typecreditAccountType- the credit account typeaccountNumber- the credit account numbercontextInfo- context information related to multitenancy- Returns:
- the credit account for the specified owning user type, credit account type and account number
-
readByByOwningUserTypeAndOwningUserRefAndTypeAndAccountNumber
Optional<P> readByByOwningUserTypeAndOwningUserRefAndTypeAndAccountNumber(String owningUserType, String owningUserRef, String creditAccountType, String accountNumber, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Searches the credit account for the specified owning user type, owning user reference (customer id, account id, email etc), credit account type and account number.- Parameters:
owningUserType- the owning user typeowningUserRef- the reference to the user that owns this credit accountcreditAccountType- the type of the credit accountaccountNumber- the credit account numbercontextInfo- context information related to multitenancy- Returns:
- the credit account for the specified owning user type, credit account type, owning user reference and account number
-
readAllByOwningUserTypeAndOwningUserRefAndType
org.springframework.data.domain.Page<P> readAllByOwningUserTypeAndOwningUserRefAndType(String owningUserType, String owningUserRef, String creditAccountType, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all credit account for the specified owning user type, user reference (customer id, account id, email etc) and credit account type.- Parameters:
owningUserType- the owning user typeowningUserRef- the reference to the user that owns this credit accountcreditAccountType- the type of the credit accountpage- information about which page of results to return from the databasecontextInfo- context information related to multitenancy- Returns:
- the credit accounts
-
readAllByOwningUserTypeAndOwningUserRefAndType
org.springframework.data.domain.Page<P> readAllByOwningUserTypeAndOwningUserRefAndType(String owningUserType, String owningUserRef, String creditAccountType, CurrencyContext currencyContext, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all credit account for the specified owning user type, user reference (customer id, account id, email etc), credit account type and currency context.- Parameters:
owningUserType- the owning user typeowningUserRef- the reference to the user that owns this credit accountcreditAccountType- the type of the credit accountcurrencyContext- the currency context to read the credit accountpage- information about which page of results to return from the databasecontextInfo- context information related to multitenancy- Returns:
- the credit accounts
-
readAllByOwningUserTypeAndType
org.springframework.data.domain.Page<P> readAllByOwningUserTypeAndType(String owningUserType, String creditAccountType, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all credit account for the specified owning user type and credit account type.- Parameters:
owningUserType- the owning user typecreditAccountType- the type of the credit accountfilters- An RSQL filter used to narrow query resultspage- information about which page of results to return from the databasecontextInfo- context information related to multitenancy- Returns:
- the credit accounts
-
createCreditAccount
P createCreditAccount(CreateCreditAccountRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Creates the credit account for the provided request.- Parameters:
request- the request to create the credit accountcontextInfo- context information related to multitenancy- Returns:
- the created account
-
findAllByAccountNumberIn
org.springframework.data.domain.Page<P> findAllByAccountNumberIn(List<String> accountNumbers, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all credit accounts for the specified credit account numbers.- Parameters:
accountNumbers- the credit account numbersfilters- An RSQL filter used to narrow query resultspage- information about which page of results to return from the databasecontextInfo- context information related to multitenancy- Returns:
- the credit accounts
-
readAllByOwningUserTypeAndOwningUserRefAndTypeAndAccountNumberIn
org.springframework.data.domain.Page<P> readAllByOwningUserTypeAndOwningUserRefAndTypeAndAccountNumberIn(String owningUserType, String owningUserRef, String creditAccountType, List<String> accountNumbers, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all credit accounts for the specified owning user type, user reference (customer id, account id, email etc), credit account type, and credit account numbers.- Parameters:
owningUserType- the owning user typeowningUserRef- the reference to the user that owns this credit accountcreditAccountType- the type of the credit accountaccountNumbers- the credit account numberspage- information about which page of results to return from the databasecontextInfo- context information related to multitenancy- Returns:
- the credit accounts
-
readAllByOwningUserTypeAndOwningUserRefAndTypeAndAccountNumberIn
org.springframework.data.domain.Page<P> readAllByOwningUserTypeAndOwningUserRefAndTypeAndAccountNumberIn(String owningUserType, String owningUserRef, String creditAccountType, List<String> accountNumbers, CurrencyContext currencyContext, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all credit accounts for the specified owning user type, user reference (customer id, account id, email etc), credit account type, credit account numbers, and currency context.- Parameters:
owningUserType- the owning user typeowningUserRef- the reference to the user that owns this credit accountcreditAccountType- the type of the credit accountaccountNumbers- the credit account numberscurrencyContext- the currency context to read the credit accountpage- information about which page of results to return from the databasecontextInfo- context information related to multitenancy- Returns:
- the credit accounts
-
readAllByContextIdAndMatchingTenant
Iterable<P> readAllByContextIdAndMatchingTenant(Iterable<String> contextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves the credit accounts matching the provided IDs and the tenant fromContextInfoif present.Returns tenant-level (non-application-associated) records when fetching from a tenant context. This implementation finds all records within the tenant regardless of whether they're associated to an application.
- Parameters:
contextIds- the credit account context idscontextInfo- context information related to multitenancy- Returns:
- the credit accounts for specified ids
-