Class AbstractWriteableController<E extends cn.herodotus.engine.core.definition.domain.BaseEntity,ID extends Serializable,S extends cn.herodotus.engine.data.core.service.BasePageService<E,ID>>
java.lang.Object
cn.herodotus.engine.web.api.servlet.AbstractReadableController<E,ID,S>
cn.herodotus.engine.web.api.servlet.AbstractWriteableController<E,ID,S>
- Type Parameters:
E- 实体ID- 实体 IDS- Service
- All Implemented Interfaces:
cn.herodotus.engine.core.definition.domain.BaseDomain,cn.herodotus.engine.core.definition.domain.Pagination,BindingController<E,,ID, S> PageController<E,,ID, S> PaginationController,Controller,Serializable
- Direct Known Subclasses:
AbstractJpaWriteableController,AbstractMongoController
public abstract class AbstractWriteableController<E extends cn.herodotus.engine.core.definition.domain.BaseEntity,ID extends Serializable,S extends cn.herodotus.engine.data.core.service.BasePageService<E,ID>>
extends AbstractReadableController<E,ID,S>
Description: 通用可读可写接口定义
如果继承该类将会自动创建相关接口并生成权限数据,所以当前仅提供基础保存和删除接口,以避免生成不必要的接口。
- Author:
- : gengwei.zheng
- See Also:
- Date:
- : 2025/3/29 23:16
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class cn.herodotus.engine.web.api.servlet.AbstractReadableController
findByPageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface cn.herodotus.engine.web.api.servlet.BindingController
findAll, findById, getServiceMethods inherited from interface cn.herodotus.engine.web.core.definition.Controller
result, result, result, result, result, result, resultMethods inherited from interface cn.herodotus.engine.web.api.servlet.PageController
findByPage, findByPageMethods inherited from interface cn.herodotus.engine.core.definition.domain.Pagination
with, withMethods inherited from interface cn.herodotus.engine.web.api.servlet.PaginationController
fromPage, fromSlice, resultFromPage, resultFromSlice
-
Constructor Details
-
AbstractWriteableController
public AbstractWriteableController()
-
-
Method Details
-
save
@Idempotent @PostMapping public cn.herodotus.engine.core.definition.domain.Result<E> save(@RequestBody E domain) Description copied from interface:BindingController保存或更新实体- Parameters:
domain- 实体参数- Returns:
- 用Result包装的实体
-
delete
@Idempotent @DeleteMapping("/{id}") public cn.herodotus.engine.core.definition.domain.Result<String> delete(@PathVariable ID id) Description copied from interface:BindingController删除数据- Parameters:
id- 实体ID- Returns:
- 包装成
Result的 String 类型查询结果。JPA 删除操作没有返回值,所以无法判断操作成功与否。
-