Class DefaultCampaignService<P extends Campaign>
- java.lang.Object
-
- com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
-
- com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
-
- com.broadleafcommerce.promotion.campaign.service.DefaultCampaignService<P>
-
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
,com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
,CampaignService<P>
public class DefaultCampaignService<P extends Campaign> extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P> implements CampaignService<P>
- Author:
- Chad Harchar (charchar)
-
-
Constructor Summary
Constructors Constructor Description DefaultCampaignService(CampaignRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
existsById(String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Returns whether the campaign with the given id exists in the data storeboolean
existsByIdAndActive(String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Returns whether the campaign with the given id exists and is active in the data store.protected CampaignRepository<com.broadleafcommerce.data.tracking.core.Trackable>
getRepository()
org.springframework.data.domain.Page<P>
readAllByName(String name, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
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, create, createAll, createAllAllowingPartialSuccess, delete, getHelper, 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
create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort
-
-
-
-
Constructor Detail
-
DefaultCampaignService
public DefaultCampaignService(CampaignRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser)
-
-
Method Detail
-
readAllByName
@NonNull public org.springframework.data.domain.Page<P> readAllByName(@NonNull String name, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
- Specified by:
readAllByName
in interfaceCampaignService<P extends Campaign>
-
existsById
public boolean existsById(String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:CampaignService
Returns whether the campaign with the given id exists in the data store- Specified by:
existsById
in interfaceCampaignService<P extends Campaign>
- Parameters:
id
- the id of the campaign to findcontextInfo
- context information surrounding sandboxing and multi tenant state- Returns:
- whether the campaign with the given id exists in the data store
-
existsByIdAndActive
public boolean existsByIdAndActive(String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:CampaignService
Returns whether the campaign with the given id exists and is active in the data store.- Specified by:
existsByIdAndActive
in interfaceCampaignService<P extends Campaign>
- Parameters:
id
- the id of the campaign to findcontextInfo
- context information surrounding sandboxing and multi tenant state- Returns:
- whether the campaign with the given id exists and is active in the data store
-
getRepository
@NonNull protected CampaignRepository<com.broadleafcommerce.data.tracking.core.Trackable> getRepository()
-
-