Interface DataDrivenEnumService<D extends DataDrivenEnum>
- All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<D>
,com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<D>
- All Known Implementing Classes:
DefaultDataDrivenEnumService
public interface DataDrivenEnumService<D extends DataDrivenEnum>
extends com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<D>
Service API for
DataDrivenEnums
. Supported by
DataDrivenEnumRepository
.- Author:
- Sunny Yu
-
Method Summary
Modifier and TypeMethodDescriptionreadAllByContextIds
(Collection<String> dataDrivenEnumIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Return all of the data driven enums with IDs in the supplied collection.org.springframework.data.domain.Page<D>
readAllByType
(String type, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns all of thedata driven enums
with the given type and filters.org.springframework.data.domain.Page<D>
readAllByValue
(String value, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns all of thedata driven enums
with the given value and filters.readByTypeAndValue
(String type, String value, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns theDataDrivenEnum
that has the given type and value.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
-
readAllByType
org.springframework.data.domain.Page<D> readAllByType(@Nullable String type, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns all of thedata driven enums
with the given type and filters.- Parameters:
type
- the data driven enum type to filter byfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontext
- the context to query within- Returns:
- all of the data driven enums matching the given type and filters
-
readAllByValue
org.springframework.data.domain.Page<D> readAllByValue(@Nullable String value, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns all of thedata driven enums
with the given value and filters.- Parameters:
value
- the data driven enum value to filter byfilters
- additional filters to apply in the query. Should beEmptyNode
if no additional filters should be applied.page
- the requested page of results from the databasecontext
- the context to query within- Returns:
- all of the data driven enums matching the given value and filters
-
readByTypeAndValue
Optional<D> readByTypeAndValue(String type, String value, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns theDataDrivenEnum
that has the given type and value.- Parameters:
type
- the data driven enum type to filter byvalue
- the data driven enum value to filter bycontext
- context information surrounding sandboxing and multitenant state- Returns:
- the data driven enum that has the given type and value
-
readAllByContextIds
Stream<D> readAllByContextIds(@NonNull Collection<String> dataDrivenEnumIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Return all of the data driven enums with IDs in the supplied collection.- Parameters:
dataDrivenEnumIds
- the data driven enum context IDs to search forcontextInfo
- context information surrounding sandboxing and multitenant state- Returns:
- the data driven enums that matched with the IDs in the given collection
-
getRepositoryDomain
-