类 CRUDHelper

java.lang.Object
cool.scx.ext.crud.CRUDHelper

public final class CRUDHelper extends Object
  • 构造器详细资料

    • CRUDHelper

      public CRUDHelper()
  • 方法详细资料

    • getBaseService

      public static <T extends cool.scx.base.BaseModel> cool.scx.base.BaseService<T> getBaseService(String modelName) throws cool.scx.exception.HttpRequestException
      获取 service todo 错误信息待处理
      类型参数:
      T - model 类型
      参数:
      modelName - model 名称
      返回:
      service
      抛出:
      cool.scx.exception.HttpRequestException - service 未找到
    • getBaseModel

      public static cool.scx.base.BaseModel getBaseModel(Map<String,Object> entityMap, String modelName) throws cool.scx.exception.HttpRequestException
      抛出:
      cool.scx.exception.HttpRequestException
    • getClassByName

      public static Class<?> getClassByName(String str)

      getClassByName.

      参数:
      str - a String object.
      返回:
      a Class object.
    • getQuery

      public static cool.scx.bo.Query getQuery(Class<?> modelClass, Integer limit, Integer page, String orderByColumn, String sortType, List<CrudWhereBody> whereBodyList) throws cool.scx.exception.CustomHttpRequestException
      获取 query
      参数:
      limit - l
      page - p
      orderByColumn - or
      sortType - so
      whereBodyList - wh
      返回:
      q
      抛出:
      cool.scx.exception.CustomHttpRequestException
    • checkFieldName

      public static void checkFieldName(Class<?> modelClass, String fieldName) throws cool.scx.exception.CustomHttpRequestException
      抛出:
      cool.scx.exception.CustomHttpRequestException
    • checkWhereType

      public static cool.scx.enumeration.WhereType checkWhereType(String fieldName, String strWhereType) throws cool.scx.exception.CustomHttpRequestException
      抛出:
      cool.scx.exception.CustomHttpRequestException
    • checkWhereBodyParametersSize

      public static void checkWhereBodyParametersSize(String fieldName, cool.scx.enumeration.WhereType whereType, Object value1, Object value2) throws cool.scx.exception.CustomHttpRequestException
      抛出:
      cool.scx.exception.CustomHttpRequestException