Package io.rocketbase.commons.resource
Class AbstractCrudChildRestResource<Read,Write,ID extends Serializable>
- java.lang.Object
-
- io.rocketbase.commons.resource.AbstractBaseCrudRestResource<Read,Write>
-
- io.rocketbase.commons.resource.AbstractCrudChildRestResource<Read,Write,ID>
-
- All Implemented Interfaces:
BaseRestResource
public abstract class AbstractCrudChildRestResource<Read,Write,ID extends Serializable> extends AbstractBaseCrudRestResource<Read,Write>
-
-
Field Summary
-
Fields inherited from class io.rocketbase.commons.resource.AbstractBaseCrudRestResource
responseClass
-
-
Constructor Summary
Constructors Constructor Description AbstractCrudChildRestResource()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected org.springframework.web.util.UriComponentsBuilderbuildBaseUriBuilder(ID parentId)Readcreate(ID parentId, Write write)voiddelete(ID parentId, ID id)PageableResult<Read>find(ID parentId, int page, int pagesize)PageableResult<Read>find(ID parentId, org.springframework.data.domain.Pageable pageable)protected abstract StringgetBaseParentApiUrl()Optional<Read>getById(ID parentId, ID id)protected abstract StringgetChildPath()Readupdate(ID parentId, ID id, Write write)-
Methods inherited from class io.rocketbase.commons.resource.AbstractBaseCrudRestResource
create, createHttpEntity, createPagedTypeReference, delete, find, getById, getRestTemplate, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.rocketbase.commons.resource.BaseRestResource
appendParams, createHeaderWithLanguage, createUriComponentsBuilder, ensureEndsWithSlash, ensureStartsAndEndsWithSlash, ensureStartsWithSlash
-
-
-
-
Method Detail
-
find
public PageableResult<Read> find(ID parentId, int page, int pagesize)
-
find
public PageableResult<Read> find(ID parentId, org.springframework.data.domain.Pageable pageable)
-
buildBaseUriBuilder
protected org.springframework.web.util.UriComponentsBuilder buildBaseUriBuilder(ID parentId)
-
getBaseParentApiUrl
protected abstract String getBaseParentApiUrl()
- Returns:
- full qualified url to the parent base url without ID etc
-
getChildPath
protected abstract String getChildPath()
- Returns:
- url path of the child entity
-
-