P
- The business domain typepublic class BaseRsqlMappableCrudEntityService<P> extends BaseMappableCrudEntityService<P> implements RsqlMappableCrudEntityService<P>
RsqlMappableCrudEntityService
can extend from this
class as a convenience to inherit CRUD behavior for a particular business domain type. By
default, this class in turn defers to RsqlMappableCrudEntityHelper
in order to allow
easier refactoring of core functionality.
If a service implementation spans several repository types, then it is recommended to inject the
RsqlMappableCrudEntityHelper
rather than extend this class.
Constructor and Description |
---|
BaseRsqlMappableCrudEntityService(R repository,
RsqlMappableCrudEntityHelper helper) |
Modifier and Type | Method and Description |
---|---|
protected RsqlMappableCrudEntityHelper |
getRsqlHelper() |
List<P> |
readAll(cz.jirutka.rsql.parser.ast.Node filters)
Retrieve all domain instances using a structured query string to drive the query criteria.
|
org.springframework.data.domain.Page<P> |
readAll(cz.jirutka.rsql.parser.ast.Node filters,
org.springframework.data.domain.Pageable pageable)
Retrieve all domain instances using a structured query string to drive the query criteria.
|
List<P> |
readAll(cz.jirutka.rsql.parser.ast.Node filters,
org.springframework.data.domain.Sort sort)
Retrieve all domain instances using a structured query string to drive the query criteria.
|
org.springframework.data.domain.Page<P> |
readAll(cz.jirutka.rsql.parser.ast.Node filters,
org.springframework.data.domain.Sort sort,
org.springframework.data.domain.Pageable pageable)
Retrieve all domain instances using a structured query string to drive the query criteria.
|
convertFromPersistentDomain, create, createAll, createAllAllowingPartialSuccess, delete, getHelper, getRepository, readAll, readAll, readAll, readAllByIds, readById, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByIds, readById, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess
public BaseRsqlMappableCrudEntityService(R repository, RsqlMappableCrudEntityHelper helper)
public List<P> readAll(@NonNull cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Sort sort)
RsqlMappableCrudEntityService
FilterParser
for
more information.
This version also accepts a formatted sort string that declares the sorting characteristics for the query.
readAll
in interface RsqlMappableCrudEntityService<P>
filters
- the RSQL Node
used to restrict result, must not be nullsort
- The string containing the structured list of sorts to applypublic List<P> readAll(@NonNull cz.jirutka.rsql.parser.ast.Node filters)
RsqlMappableCrudEntityService
FilterParser
for
more information.readAll
in interface RsqlMappableCrudEntityService<P>
filters
- the RSQL Node
used to restrict result, must not be nullpublic org.springframework.data.domain.Page<P> readAll(@NonNull cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Sort sort, @NonNull org.springframework.data.domain.Pageable pageable)
RsqlMappableCrudEntityService
FilterParser
for
more information.
This version also accepts a Sort to apply to the result set
readAll
in interface RsqlMappableCrudEntityService<P>
filters
- the RSQL Node
used to restrict result, must not be nullsort
- sort to apply to the querypageable
- may be Pageable.unpaged()
, must not be null.public org.springframework.data.domain.Page<P> readAll(@NonNull cz.jirutka.rsql.parser.ast.Node filters, @NonNull org.springframework.data.domain.Pageable pageable)
RsqlMappableCrudEntityService
FilterParser
for
more information.readAll
in interface RsqlMappableCrudEntityService<P>
filters
- the RSQL Node
used to restrict result, must not be nullpageable
- may be Pageable.unpaged()
, must not be null.@NonNull protected RsqlMappableCrudEntityHelper getRsqlHelper()
Copyright © 2021. All rights reserved.