Class DefaultCustomerNoteService<P extends CustomerNote>

  • Type Parameters:
    P - The projection domain type, a subtype of CustomerNote
    All Implemented Interfaces:
    CustomerNoteService<P>, com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>

    public class DefaultCustomerNoteService<P extends CustomerNote>
    extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
    implements CustomerNoteService<P>
    Default implementation of CustomerNoteService
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultCustomerNoteService​(CustomerNoteRepository<com.broadleafcommerce.data.tracking.core.Trackable> customerNoteRepository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      P create​(P customerNote, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)  
      protected CustomerNoteRepository<com.broadleafcommerce.data.tracking.core.Trackable> getCustomerNoteRepository()  
      org.springframework.data.domain.Page<P> readAllByCustomerId​(@NonNull String customerId, @NonNull cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve notes for the given customer ID.
      protected void setAuditInformation​(P customerNote, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Sets audit information for the customer note for creation.
      • 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, getRepository, getSortPositionStrategy, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, setSortPositionStrategy, update, updateAll, updateAllAllowingPartialSuccess, updateSort
      • Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService

        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
    • Constructor Detail

      • DefaultCustomerNoteService

        public DefaultCustomerNoteService​(CustomerNoteRepository<com.broadleafcommerce.data.tracking.core.Trackable> customerNoteRepository,
                                          com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper)
    • Method Detail

      • readAllByCustomerId

        public org.springframework.data.domain.Page<P> readAllByCustomerId​(@NonNull
                                                                           @NonNull String customerId,
                                                                           @NonNull
                                                                           @NonNull cz.jirutka.rsql.parser.ast.Node filters,
                                                                           @Nullable
                                                                           org.springframework.data.domain.Pageable page,
                                                                           @Nullable
                                                                           com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Description copied from interface: CustomerNoteService
        Retrieve notes for the given customer ID.
        Specified by:
        readAllByCustomerId in interface CustomerNoteService<P extends CustomerNote>
        Parameters:
        customerId - the ID of the customer to search 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 - context information around sandbox and multitenant state
        Returns:
        a page of the notes associated with the given customer ID
      • create

        public P create​(@NonNull
                        P customerNote,
                        @Nullable
                        com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Specified by:
        create in interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends CustomerNote>
        Overrides:
        create in class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends CustomerNote>
      • setAuditInformation

        protected void setAuditInformation​(P customerNote,
                                           @Nullable
                                           com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Sets audit information for the customer note for creation.
        Parameters:
        customerNote - the note to which to assign audit information
        contextInfo - context information about multitenant state
      • getCustomerNoteRepository

        protected CustomerNoteRepository<com.broadleafcommerce.data.tracking.core.Trackable> getCustomerNoteRepository()