Class DefaultCancellationPolicyService<CP extends CancellationPolicy>
java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<CP>
com.broadleafcommerce.subscription.service.DefaultCancellationPolicyService<CP>
- Type Parameters:
CP- an instance ofCancellationPolicy
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<CP>,com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<CP>,CancellationPolicyService<CP>
public class DefaultCancellationPolicyService<CP extends CancellationPolicy>
extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<CP>
implements CancellationPolicyService<CP>
Default implementation of
CancellationPolicyService- Author:
- karanjariwala
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultCancellationPolicyService(CancellationPolicyRepository<com.broadleafcommerce.data.tracking.core.Trackable> repo, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node>protected CancellationPolicyRepository<com.broadleafcommerce.data.tracking.core.Trackable>getRepo()org.springframework.data.domain.Page<CP>readAllByName(String name, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads aPageofCancellationPolicyfor the given name and filters.readCancellationPolicyByName(@NonNull String name, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads aCancellationPolicyby its name.Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService
getRsqlHelper, readAll, readAll, readAll, readAllMethods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService
convertFromPersistentDomain, convertToPersistentDomain, create, createAll, createAllAllowingPartialSuccess, delete, getHelper, getRepository, getSortPositionStrategy, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, setSortPositionStrategy, update, updateAll, updateAllAllowingPartialSuccess, updateSortMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, updateSortMethods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService
readAll, readAll, readAll, readAll
-
Constructor Details
-
DefaultCancellationPolicyService
public DefaultCancellationPolicyService(CancellationPolicyRepository<com.broadleafcommerce.data.tracking.core.Trackable> repo, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser)
-
-
Method Details
-
readAllByName
public org.springframework.data.domain.Page<CP> readAllByName(@Nullable String name, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CancellationPolicyServiceReads aPageofCancellationPolicyfor the given name and filters.- Specified by:
readAllByNamein interfaceCancellationPolicyService<CP extends CancellationPolicy>- Parameters:
name- the name by which the CancellationPolicy is to be searched for.filters- additional filters to be applied for fetching the CancellationPoliciespageable- the requested page of results from the databasecontextInfo- context information around sandboxing and multitenant state- Returns:
- A
PageofCancellationPolicy
-
readCancellationPolicyByName
public CP readCancellationPolicyByName(@NonNull @NonNull String name, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CancellationPolicyServiceReads aCancellationPolicyby its name.- Specified by:
readCancellationPolicyByNamein interfaceCancellationPolicyService<CP extends CancellationPolicy>- Parameters:
name- the name of the CancellationPolicycontextInfo- context information around sandboxing and multitenant state- Returns:
- A
CancellationPolicythat matches the name
-
getRepo
protected CancellationPolicyRepository<com.broadleafcommerce.data.tracking.core.Trackable> getRepo() -
getParser
protected com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> getParser()
-