类 NamedTable

java.lang.Object
org.ssssssss.magicapi.core.model.Attributes<Object>
org.ssssssss.magicapi.modules.db.table.NamedTable

public class NamedTable extends Attributes<Object>
单表操作API
作者:
mxd
  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • clone

      @Comment("\u514b\u9686") public NamedTable clone()
      覆盖:
      clone 在类中 Object
    • logic

      @Comment("\u4f7f\u7528\u903b\u8f91\u5220\u9664") public NamedTable logic()
    • withBlank

      @Comment("\u66f4\u65b0\u7a7a\u503c") public NamedTable withBlank()
    • primary

      @Comment("\u8bbe\u7f6e\u4e3b\u952e\u540d\uff0cupdate\u65f6\u4f7f\u7528") public NamedTable primary(@Comment(name="primary",value="\u4e3b\u952e\u5217") String primary)
    • primary

      @Comment("\u8bbe\u7f6e\u4e3b\u952e\u540d\uff0c\u5e76\u8bbe\u7f6e\u9ed8\u8ba4\u4e3b\u952e\u503c(\u4e3b\u8981\u7528\u4e8einsert)") public NamedTable primary(@Comment(name="primary",value="\u4e3b\u952e\u5217") String primary, @Comment(name="defaultPrimaryValue",value="\u9ed8\u8ba4\u503c") Serializable defaultPrimaryValue)
    • primary

      @Comment("\u8bbe\u7f6e\u4e3b\u952e\u540d\uff0c\u5e76\u8bbe\u7f6e\u9ed8\u8ba4\u4e3b\u952e\u503c(\u4e3b\u8981\u7528\u4e8einsert)") public NamedTable primary(@Comment(name="primary",value="\u4e3b\u952e\u5217") String primary, @Comment(name="defaultPrimaryValue",value="\u9ed8\u8ba4\u503c") Supplier<Object> defaultPrimaryValue)
    • where

      @Comment("\u62fc\u63a5where") public Where where()
    • column

      @Comment("\u8bbe\u7f6e\u5355\u5217\u7684\u503c") public NamedTable column(@Comment(name="property",value="\u5217\u540d") String property, @Comment(name="value",value="\u503c") Object value)
    • columns

      @Comment("\u8bbe\u7f6e\u67e5\u8be2\u7684\u5217\uff0c\u5982`columns(\'a\',\'b\',\'c\')`") public NamedTable columns(@Comment(name="properties",value="\u5404\u9879\u5217") String... properties)
    • exclude

      @Comment("\u8bbe\u7f6e\u8981\u6392\u9664\u7684\u5217") public NamedTable exclude(@Comment(name="property",value="\u6392\u9664\u7684\u5217") String property)
    • excludes

      @Comment("\u8bbe\u7f6e\u8981\u6392\u9664\u7684\u5217") public NamedTable excludes(@Comment(name="properties",value="\u6392\u9664\u7684\u5217") String... properties)
    • excludes

      @Comment("\u8bbe\u7f6e\u8981\u6392\u9664\u7684\u5217") public NamedTable excludes(@Comment(name="properties",value="\u6392\u9664\u7684\u5217") List<String> properties)
    • columns

      @Comment("\u8bbe\u7f6e\u67e5\u8be2\u7684\u5217\uff0c\u5982`columns([\'a\',\'b\',\'c\'])`") public NamedTable columns(@Comment(name="properties",value="\u67e5\u8be2\u7684\u5217") Collection<String> properties)
    • column

      @Comment("\u8bbe\u7f6e\u67e5\u8be2\u7684\u5217\uff0c\u5982`column(\'a\')`") public NamedTable column(@Comment(name="property",value="\u67e5\u8be2\u7684\u5217") String property)
    • orderBy

      @Comment("\u62fc\u63a5`order by xxx asc/desc`") public NamedTable orderBy(@Comment(name="property",value="\u8981\u6392\u5e8f\u7684\u5217") String property, @Comment(name="sort",value="`asc`\u6216`desc`") String sort)
    • orderBy

      @Comment("\u62fc\u63a5`order by xxx asc`") public NamedTable orderBy(@Comment(name="property",value="\u8981\u6392\u5e8f\u7684\u5217") String property)
    • orderByDesc

      @Comment("\u62fc\u63a5`order by xxx desc`") public NamedTable orderByDesc(@Comment(name="property",value="\u8981\u6392\u5e8f\u7684\u5217") String property)
    • groupBy

      @Comment("\u62fc\u63a5`group by`") public NamedTable groupBy(@Comment(name="properties",value="\u8981\u5206\u7ec4\u7684\u5217") String... properties)
    • insert

      @Comment("\u6267\u884c\u63d2\u5165,\u8fd4\u56de\u4e3b\u952e") public Object insert(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
    • insert

      @Comment("\u6267\u884c\u63d2\u5165,\u8fd4\u56de\u4e3b\u952e") public Object insert(org.ssssssss.script.runtime.RuntimeContext runtimeContext, @Comment(name="data",value="\u5404\u9879\u5217\u548c\u503c") Map<String,Object> data)
    • delete

      @Comment("\u6267\u884cdelete\u8bed\u53e5") public int delete(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
    • save

      @Comment("\u4fdd\u5b58\u5230\u8868\u4e2d\uff0c\u5f53\u4e3b\u952e\u6709\u503c\u65f6\u5219\u4fee\u6539\uff0c\u5426\u5219\u63d2\u5165") public Object save(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
    • save

      @Comment("\u4fdd\u5b58\u5230\u8868\u4e2d\uff0c\u5f53\u4e3b\u952e\u6709\u503c\u65f6\u5219\u4fee\u6539\uff0c\u5426\u5219\u63d2\u5165") public Object save(org.ssssssss.script.runtime.RuntimeContext runtimeContext, @Comment(name="data",value="\u5404\u9879\u5217\u548c\u503c") Map<String,Object> data, @Comment(name="beforeQuery",value="\u662f\u5426\u6839\u636eid\u67e5\u8be2\u6709\u6ca1\u6709\u6570\u636e") boolean beforeQuery)
    • save

      @Comment("\u4fdd\u5b58\u5230\u8868\u4e2d\uff0c\u5f53\u4e3b\u952e\u6709\u503c\u65f6\u5219\u4fee\u6539\uff0c\u5426\u5219\u63d2\u5165") public Object save(org.ssssssss.script.runtime.RuntimeContext runtimeContext, @Comment(name="beforeQuery",value="\u662f\u5426\u6839\u636eid\u67e5\u8be2\u6709\u6ca1\u6709\u6570\u636e") boolean beforeQuery)
    • save

      @Comment("\u4fdd\u5b58\u5230\u8868\u4e2d\uff0c\u5f53\u4e3b\u952e\u6709\u503c\u65f6\u5219\u4fee\u6539\uff0c\u5426\u5219\u63d2\u5165") public Object save(org.ssssssss.script.runtime.RuntimeContext runtimeContext, @Comment(name="data",value="\u5404\u9879\u5217\u548c\u503c") Map<String,Object> data)
    • batchInsert

      @Comment("\u6279\u91cf\u63d2\u5165") public int batchInsert(@Comment(name="collection",value="\u5404\u9879\u5217\u548c\u503c") Collection<Map<String,Object>> collection, @Comment("batchSize") int batchSize)
    • batchInsert

      @Comment("\u6279\u91cf\u63d2\u5165") public int batchInsert(@Comment(name="collection",value="\u5404\u9879\u5217\u548c\u503c") Collection<Map<String,Object>> collection)
    • select

      @Comment("\u6267\u884c`select`\u67e5\u8be2") public List<Map<String,Object>> select(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
    • selectOne

      @Comment("\u6267\u884c`selectOne`\u67e5\u8be2") public Map<String,Object> selectOne(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
    • page

      @Comment("\u6267\u884c\u5206\u9875\u67e5\u8be2") public Object page(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
    • page

      @Comment("\u6267\u884c\u5206\u9875\u67e5\u8be2\uff0c\u5206\u9875\u6761\u4ef6\u624b\u52a8\u4f20\u5165") public Object page(org.ssssssss.script.runtime.RuntimeContext runtimeContext, @Comment(name="limit",value="\u9650\u5236\u6761\u6570") long limit, @Comment(name="offset",value="\u8df3\u8fc7\u6761\u6570") long offset)
    • update

      @Comment("\u6267\u884cupdate\u8bed\u53e5") public int update(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
    • update

      @Comment("\u6267\u884cupdate\u8bed\u53e5") public int update(org.ssssssss.script.runtime.RuntimeContext runtimeContext, @Comment(name="data",value="\u5404\u9879\u5217\u548c\u503c") Map<String,Object> data, @Comment(name="isUpdateBlank",value="\u662f\u5426\u66f4\u65b0\u7a7a\u503c\u5b57\u6bb5") boolean isUpdateBlank)
    • update

      @Comment("\u6267\u884cupdate\u8bed\u53e5") public int update(org.ssssssss.script.runtime.RuntimeContext runtimeContext, @Comment(name="data",value="\u5404\u9879\u5217\u548c\u503c") Map<String,Object> data)
    • count

      @Comment("\u67e5\u8be2\u6761\u6570") public int count(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
    • exists

      @Comment("\u5224\u65ad\u662f\u5426\u5b58\u5728") public boolean exists(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
    • filterNotBlanks

      private Collection<Map.Entry<String,Object>> filterNotBlanks()
    • preHandle

      private void preHandle(SqlMode sqlMode)
    • buildSelect

      private BoundSql buildSelect(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
    • buildWhere

      private List<Object> buildWhere(StringBuilder builder)
    • getTableName

      public String getTableName()
      获取查询的表名
      返回:
      表名
    • setTableName

      public void setTableName(String tableName)
      设置表名
      参数:
      tableName - 表名
    • getSqlModule

      public SQLModule getSqlModule()
      获取SQL模块
    • getPrimary

      public String getPrimary()
      获取主键列
    • getLogicDeleteColumn

      public String getLogicDeleteColumn()
      获取逻辑删除列
    • getLogicDeleteValue

      public Object getLogicDeleteValue()
      获取逻辑删除值
    • getColumns

      public Map<String,Object> getColumns()
      获取设置的columns
    • setColumns

      public void setColumns(Map<String,Object> columns)
      设置columns
    • getFields

      public List<String> getFields()
      获取设置的fields
    • setFields

      public void setFields(List<String> fields)
      设置 fields
    • getGroups

      public List<String> getGroups()
      获取设置的group
    • setGroups

      public void setGroups(List<String> groups)
      设置 group
    • getOrders

      public List<String> getOrders()
      获取设置的order
    • setOrders

      public void setOrders(List<String> orders)
      设置 order
    • getExcludeColumns

      public Set<String> getExcludeColumns()
      获取设置的排除的列
    • setExcludeColumns

      public void setExcludeColumns(Set<String> excludeColumns)
      设置排除的列
    • getDefaultPrimaryValue

      public Object getDefaultPrimaryValue()
      主键默认值
      返回:
    • isUseLogic

      public boolean isUseLogic()
      是否设逻辑了逻辑删除
    • setUseLogic

      public void setUseLogic(boolean useLogic)
      设置是否使用逻辑删除
    • isWithBlank

      public boolean isWithBlank()
      获取是否不过滤空参数
    • setWithBlank

      public void setWithBlank(boolean withBlank)
      设置是否不过滤空参数
    • getWhere

      public Where getWhere()
      获取where
    • getRequestEntity

      public RequestEntity getRequestEntity()
      获取RequestEntity