Class DefaultAccountAddressService<P extends AccountAddress>

java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
com.broadleafcommerce.customer.service.DefaultAccountAddressService<P>
All Implemented Interfaces:
AccountAddressService<P>, com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>

public class DefaultAccountAddressService<P extends AccountAddress> extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P> implements AccountAddressService<P>
Default implementation of the AccountAddressService.
Author:
Chris Kittrell (ckittrell)
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultAccountAddressService(AccountAddressRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    create(P accountAddress, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
     
    protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils
     
    protected com.broadleafcommerce.data.tracking.core.filtering.fetch.rsql.RSQLFilterParser
     
    protected AccountAddressRepository<com.broadleafcommerce.data.tracking.core.Trackable>
     
    org.springframework.data.domain.Page<P>
    readByAccountId(@NonNull String accountId, cz.jirutka.rsql.parser.ast.Node requestedFilters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all of the AccountAddress relationships in the database associated with the given account ID.
    readByIdAndAccountId(@NonNull String id, @NonNull String accountId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds the AccountAddress which has the given ID and account ID.
    replace(@NonNull String accountAddressId, P accountAddress, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
     
    void
    setAuthenticationUtils(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils)
     
    void
    setFilterParser(com.broadleafcommerce.data.tracking.core.filtering.fetch.rsql.RSQLFilterParser filterParser)
     

    Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService

    getRsqlHelper, readAll, readAll, readAll, readAll

    Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService

    convertFromPersistentDomain, convertToPersistentDomain, createAll, createAllAllowingPartialSuccess, delete, getHelper, getSortPositionStrategy, readAll, readAll, readAll, readAllByContextId, readByContextId, replaceAll, replaceAllAllowingPartialSuccess, setSortPositionStrategy, update, updateAll, updateAllAllowingPartialSuccess, updateSort

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService

    createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService

    readAll, readAll, readAll, readAll
  • Constructor Details

    • DefaultAccountAddressService

      public DefaultAccountAddressService(AccountAddressRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper)
  • Method Details

    • create

      @Transactional("customerTransactionManager") public P create(@NonNull P accountAddress, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Specified by:
      create in interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends AccountAddress>
      Overrides:
      create in class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends AccountAddress>
    • replace

      @Transactional("customerTransactionManager") public P replace(@NonNull @NonNull String accountAddressId, @NonNull P accountAddress, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Specified by:
      replace in interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends AccountAddress>
      Overrides:
      replace in class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends AccountAddress>
    • readByAccountId

      public org.springframework.data.domain.Page<P> readByAccountId(@NonNull @NonNull String accountId, @Nullable cz.jirutka.rsql.parser.ast.Node requestedFilters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: AccountAddressService
      Reads all of the AccountAddress relationships in the database associated with the given account ID.
      Specified by:
      readByAccountId in interface AccountAddressService<P extends AccountAddress>
      Parameters:
      accountId - the account ID to find the relationships for
      requestedFilters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested page of results from the database
      contextInfo - the context to query within
      Returns:
      the AccountAddress relationships in the database that match the given account context ID
    • readByIdAndAccountId

      public P readByIdAndAccountId(@NonNull @NonNull String id, @NonNull @NonNull String accountId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: AccountAddressService
      Finds the AccountAddress which has the given ID and account ID.
      Specified by:
      readByIdAndAccountId in interface AccountAddressService<P extends AccountAddress>
      Parameters:
      id - the ID of the AccountAddress
      accountId - the ID of the owning Account
      contextInfo - context surrounding customer and multitenant state
      Returns:
      the account address that has the given ID and owning account ID
    • getRepository

      @NonNull protected AccountAddressRepository<com.broadleafcommerce.data.tracking.core.Trackable> getRepository()
      Overrides:
      getRepository in class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends AccountAddress>
    • getAuthenticationUtils

      protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils getAuthenticationUtils()
    • setAuthenticationUtils

      @Autowired public void setAuthenticationUtils(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils)
    • getFilterParser

      protected com.broadleafcommerce.data.tracking.core.filtering.fetch.rsql.RSQLFilterParser getFilterParser()
    • setFilterParser

      @Autowired(required=false) public void setFilterParser(com.broadleafcommerce.data.tracking.core.filtering.fetch.rsql.RSQLFilterParser filterParser)