Class DefaultCustomerNoteService<P extends CustomerNote>
- java.lang.Object
-
- com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
-
- com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
-
- com.broadleafcommerce.customer.service.DefaultCustomerNoteService<P>
-
- Type Parameters:
P
- The projection domain type, a subtype ofCustomerNote
- 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 ofCustomerNoteService
-
-
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 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, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort
-
-
-
-
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 interfaceCustomerNoteService<P extends CustomerNote>
- Parameters:
customerId
- the ID of the customer to search forfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontextInfo
- 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 interfacecom.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends CustomerNote>
- Overrides:
create
in classcom.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 informationcontextInfo
- context information about multitenant state
-
getCustomerNoteRepository
protected CustomerNoteRepository<com.broadleafcommerce.data.tracking.core.Trackable> getCustomerNoteRepository()
-
-