Interface CustomerAddressService<P extends CustomerAddress>

All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
All Known Implementing Classes:
DefaultCustomerAddressService

public interface CustomerAddressService<P extends CustomerAddress> extends com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
Service API for CustomerAddresss. Supported by CustomerAddressRepository.
Author:
Chris Kittrell (ckittrell)
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.data.domain.Page<P>
    readByCustomerContextId(String customerContextId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all of the CustomerAddress relationships in the database associated with the given customer context ID.
    readByCustomerIdIn(Set<String> customerIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Reads all customer addresses in the datastore associated with the given customer IDs.
    readByIdAndCustomerId(String id, String customerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds the CustomerAddress which has the given ID and parent customer ID.

    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

    • readByCustomerContextId

      @NonNull org.springframework.data.domain.Page<P> readByCustomerContextId(@NonNull String customerContextId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Reads all of the CustomerAddress relationships in the database associated with the given customer context ID.
      Parameters:
      customerContextId - the customer context ID to find the relationships for
      filters - 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 CustomerAddress relationships in the database that match the given customer context ID
    • readByCustomerIdIn

      List<P> readByCustomerIdIn(@NonNull Set<String> customerIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Reads all customer addresses in the datastore associated with the given customer IDs.
      Parameters:
      customerIds - all customer IDs to find addresses for
      contextInfo - context around multitenant state
      Returns:
      a list of customer address relationships in the datastore matching the given customer IDs
      See Also:
    • readByIdAndCustomerId

      @NonNull P readByIdAndCustomerId(@NonNull String id, @NonNull String customerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds the CustomerAddress which has the given ID and parent customer ID.
      Parameters:
      id - the context ID of the CustomerAddress
      customerId - the context ID of the parent Customer
      contextInfo - context surrounding sandboxing and multitenant state
      Returns:
      the customer address that has the given ID and parent customer ID
      Throws:
      com.broadleafcommerce.data.tracking.core.exception.EntityMissingException - if no such CustomerAddress was found