Class TableInsert<T,​K>

  • Type Parameters:
    T - 实体类型
    K - 自动生成字段的类型

    public class TableInsert<T,​K>
    extends java.lang.Object
    表插入
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      K insert​(T entity)
      新建行(插入)
      K insert​(T entity, int options)
      新建行(插入)
      K insertWithoutNull​(T entity)
      新建行(插入),忽略为null的属性
      K upsert​(T entity)
      新建行(插入),如果key冲突则更新
      K upsertWithoutNull​(T entity)
      新建行(插入),忽略为null的属性,如果key冲突则更新
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • insert

        @Nullable
        public K insert​(T entity,
                        int options)
        新建行(插入)
        Parameters:
        entity - 需要插入的实体
        options - 选项
        Returns:
        自动生成的列的值(没有则为null)
      • insert

        @Nullable
        public K insert​(T entity)
        新建行(插入)
        Parameters:
        entity - 需要插入的实体
        Returns:
        自动生成的列的值(没有则为null)
      • insertWithoutNull

        @Nullable
        public K insertWithoutNull​(T entity)
        新建行(插入),忽略为null的属性
        Parameters:
        entity - 需要插入的实体
        Returns:
        自动生成的列的值(没有则为null)
      • upsert

        @Nullable
        public K upsert​(T entity)
        新建行(插入),如果key冲突则更新
        Parameters:
        entity - 实体
        Returns:
        自动生成的列的值(没有则为null)
      • upsertWithoutNull

        @Nullable
        public K upsertWithoutNull​(T entity)
        新建行(插入),忽略为null的属性,如果key冲突则更新
        Parameters:
        entity - 实体
        Returns:
        自动生成的列的值(没有则为null)