类 RootEntityController<E extends RootEntity<E>,S extends RootService<E,R>,R extends RootRepository<E>>

java.lang.Object
cn.hamm.airpower.root.RootController
cn.hamm.airpower.root.RootEntityController<E,S,R>
类型参数:
S - Service
E - 实体或实体的子类
所有已实现的接口:
IAction, IEntityAction, ITry

public class RootEntityController<E extends RootEntity<E>,S extends RootService<E,R>,R extends RootRepository<E>> extends RootController implements IEntityAction

实体控制器根类

作者:
Hamm.cn
  • 字段详细资料

  • 构造器详细资料

    • RootEntityController

      public RootEntityController()
  • 方法详细资料

    • add

      @Description("\u6dfb\u52a0") @RequestMapping("add") public Json add(@RequestBody @Validated(WhenAdd.class) E entity)

      添加一条新数据接口

      另请参阅:
    • update

      @Description("\u4fee\u6539") @RequestMapping("update") public Json update(@RequestBody @Validated(WhenUpdate.class) @NotNull E entity)

      修改一条已存在的数据接口

      另请参阅:
    • delete

      @Description("\u5220\u9664") @RequestMapping("delete") public Json delete(@RequestBody @Validated(WhenIdRequired.class) @NotNull E entity)

      删除一条已存在的数据接口

      另请参阅:
    • getDetail

      @Description("\u67e5\u8be2\u8be6\u60c5") @RequestMapping("getDetail") public Json getDetail(@RequestBody @Validated(WhenIdRequired.class) @NotNull E entity)

      查询一条详情数据

      另请参阅:
    • disable

      @Description("\u7981\u7528") @RequestMapping("disable") public Json disable(@RequestBody @Validated(WhenIdRequired.class) @NotNull E entity)

      禁用一条已存在的数据

      另请参阅:
    • enable

      @Description("\u542f\u7528") @RequestMapping("enable") public Json enable(@RequestBody @Validated(WhenIdRequired.class) @NotNull E entity)

      启用一条已存在的数据

      另请参阅:
    • getList

      @Description("\u4e0d\u5206\u9875\u67e5\u8be2") @RequestMapping("getList") public Json getList(@RequestBody QueryRequest<E> queryRequest)

      不分页查询

      另请参阅:
    • getPage

      @Description("\u5206\u9875\u67e5\u8be2") @RequestMapping("getPage") public Json getPage(@RequestBody QueryPageRequest<E> queryPageRequest)

      分页查询

      另请参阅:
    • afterGetPage

      protected <T extends QueryPageResponse<E>> T afterGetPage(T queryPageResponse)

      查询分页后置方法

      另请参阅:
    • beforeGetPage

      protected <T extends QueryPageRequest<E>> T beforeGetPage(T queryPageRequest)

      查询分页前置方法

      另请参阅:
    • beforeGetList

      protected <T extends QueryRequest<E>> T beforeGetList(T queryRequest)

      查询不分页前置方法

    • afterGetList

      protected List<E> afterGetList(List<E> list)

      查询不分页后置方法

    • afterGetDetail

      protected E afterGetDetail(E entity)

      查询详情后置方法

    • beforeAdd

      protected E beforeAdd(E entity)

      新增前置方法

    • afterAdd

      protected void afterAdd(long id, E source)

      新增后置方法

      参数:
      id - 主键ID
      source - 原始实体
    • beforeUpdate

      protected E beforeUpdate(E entity)

      修改前置方法

      参数:
      entity - Api请求提交的实体数据,可能会缺失很多数据
      返回:
      实体
    • afterUpdate

      protected void afterUpdate(long id, E source)

      修改后置方法

      参数:
      id - 主键ID
      source - 原始实体
    • afterSaved

      protected void afterSaved(long id, E source)

      保存后置方法

      参数:
      id - 主键ID
      source - 原始实体
    • beforeDelete

      protected void beforeDelete(long id)

      删除前置方法

      参数:
      id - 主键ID
    • afterDelete

      protected void afterDelete(long id)
      删除后置方法
      参数:
      id - 主键ID
    • beforeDisable

      protected void beforeDisable(long id)

      禁用前置方法

      参数:
      id - 主键ID
    • afterDisable

      protected void afterDisable(long id)

      禁用后置方法

      参数:
      id - 主键ID
    • beforeEnable

      protected void beforeEnable(long id)

      启用前置方法

      参数:
      id - 主键ID
    • afterEnable

      protected void afterEnable(long id)

      启用后置方法

      参数:
      id - 主键ID