A - the aggregate root type.I - the aggregate root identifier type.D - the representation type.public interface ReadResource<A extends AggregateRoot<I>,I,D> extends Resource<A,I,D>
Resource for reading aggregates (the R of CRUD).CreateResource,
ReadResource,
UpdateResource,
DeleteResource,
Resource| Modifier and Type | Method and Description |
|---|---|
default <S extends Slice<A>> |
applyLimit(PaginationParams params,
LimitPicker<S,A> limitPicker)
Apply a pagination limit if present in the given pagination parameters.
|
default D |
get(I id)
The method that implements REST aggregate retrieval.
|
default Object |
list(PaginationParams paginationParams,
SortParams sortParams)
The method that implements REST aggregate listing.
|
buildAggregateName, getAggregateRootClass, getFluentAssembler, getIdentifierClass, getPaginator, getRepository, getRepresentationClassdefault <S extends Slice<A>> SpecificationPicker<S,A> applyLimit(@BeanParam PaginationParams params, LimitPicker<S,A> limitPicker)
@GET
@Produces(value="application/json")
@Path(value="/{id}")
default D get(@PathParam(value="id")
I id)
id - the identifier of the aggregate to retrieve, passed as /{id} path parameter.
If the identifier type is a complex object, it must have a constructor taking a single
String parameter.@GET @Produces(value="application/json") default Object list(@BeanParam PaginationParams paginationParams, @BeanParam SortParams sortParams)
PaginationParams query parameters.paginationParams - the optional pagination parameters.sortParams - the optional sorting parameters.Copyright © 2013-2018–2019 SeedStack. All rights reserved.