Package ml.calumma.web.web.controller
Class BaseController<Entity extends CalummaEntity,T>
- java.lang.Object
-
- ml.calumma.web.web.controller.BaseController<Entity,T>
-
@RestController public abstract class BaseController<Entity extends CalummaEntity,T> extends Object
-
-
Constructor Summary
Constructors Constructor Description BaseController()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Entitycreate(Entity entity)voiddelete(T id)EntitygetById(Long id)org.springframework.data.domain.Page<Entity>getList(String filters, org.springframework.data.domain.Pageable pageInfo)abstract List<RequestQueryConfig>getQueryRequestConfiguration()abstract BaseService<Entity,T>getService()org.springframework.data.domain.Page<Entity>queryEntity(String filters, String projection, org.springframework.data.domain.Pageable pageInfo)org.springframework.data.domain.Page<Entity>queryEntityPost(ClientRequest clientRequest)Entityupdate(Entity entity)
-
-
-
Method Detail
-
getService
public abstract BaseService<Entity,T> getService()
-
getQueryRequestConfiguration
public abstract List<RequestQueryConfig> getQueryRequestConfiguration()
-
getById
@RequestMapping(value="/{id}", method=GET) public Entity getById(@PathVariable("id") Long id) throws Throwable- Throws:
Throwable
-
getList
@RequestMapping(value="/list", method=GET) public org.springframework.data.domain.Page<Entity> getList(@RequestParam(required=false) String filters, org.springframework.data.domain.Pageable pageInfo)
-
queryEntity
@RequestMapping(value="/query", method=GET) public org.springframework.data.domain.Page<Entity> queryEntity(@RequestParam(required=false) String filters, @RequestParam(required=false) String projection, org.springframework.data.domain.Pageable pageInfo) throws Throwable- Throws:
Throwable
-
queryEntityPost
@RequestMapping(value="/query", method=POST) public org.springframework.data.domain.Page<Entity> queryEntityPost(@RequestBody ClientRequest clientRequest) throws Throwable- Throws:
Throwable
-
create
@RequestMapping(value="", method=POST) public Entity create(@RequestBody Entity entity) throws Exception- Throws:
Exception
-
update
@RequestMapping(value="", method=PUT) public Entity update(@RequestBody Entity entity) throws Exception- Throws:
Exception
-
delete
@RequestMapping(value="/{id}", method=DELETE) public void delete(@PathVariable("id") T id) throws ForbiddenException- Throws:
ForbiddenException
-
-