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 Type
    Method
    Description
    createCreditAccount(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 from ContextInfo if 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, updateSort

    Methods 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 number
      contextInfo - 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 type
      accountNumber - the credit account number
      contextInfo - 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 type
      creditAccountType - the credit account type
      accountNumber - the credit account number
      contextInfo - 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 type
      owningUserRef - the reference to the user that owns this credit account
      creditAccountType - the type of the credit account
      accountNumber - the credit account number
      contextInfo - 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 type
      owningUserRef - the reference to the user that owns this credit account
      creditAccountType - the type of the credit account
      page - information about which page of results to return from the database
      contextInfo - 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 type
      owningUserRef - the reference to the user that owns this credit account
      creditAccountType - the type of the credit account
      currencyContext - the currency context to read the credit account
      page - information about which page of results to return from the database
      contextInfo - 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 type
      creditAccountType - the type of the credit account
      filters - An RSQL filter used to narrow query results
      page - information about which page of results to return from the database
      contextInfo - 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 account
      contextInfo - 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 numbers
      filters - An RSQL filter used to narrow query results
      page - information about which page of results to return from the database
      contextInfo - 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 type
      owningUserRef - the reference to the user that owns this credit account
      creditAccountType - the type of the credit account
      accountNumbers - the credit account numbers
      page - information about which page of results to return from the database
      contextInfo - 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 type
      owningUserRef - the reference to the user that owns this credit account
      creditAccountType - the type of the credit account
      accountNumbers - the credit account numbers
      currencyContext - the currency context to read the credit account
      page - information about which page of results to return from the database
      contextInfo - 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 from ContextInfo if 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 ids
      contextInfo - context information related to multitenancy
      Returns:
      the credit accounts for specified ids