Package top.codef.dao

Class TypedBaseDao

java.lang.Object
top.codef.dao.AbstractDao
top.codef.dao.TypedBaseDao
All Implemented Interfaces:
AmebaDao
Direct Known Subclasses:
TypedCommonDao

public class TypedBaseDao extends AbstractDao
  • Constructor Details

    • TypedBaseDao

      public TypedBaseDao()
  • Method Details

    • getSingle

      public <T> T getSingle(TypedCommonFilter<T> commonFilter)
      获取单个实例
      Parameters:
      commonFilter -
      Returns:
    • getSingle

      public <T, K> T getSingle(Class<T> tarClazz, TypedCommonFilter<K> commonFilter)
      获取单个实例
      Parameters:
      tarClazz -
      commonFilter -
      Returns:
    • getList

      public <T, K> List<T> getList(Class<T> tarClazz, TypedCommonFilter<K> commonFilter)
    • getList

      public <T> List<T> getList(Pageable page, TypedCommonFilter<T> commonFilter)
      分页所做查询列表
      Type Parameters:
      T -
      Parameters:
      page -
      commonFilter -
      Returns:
    • getList

      public <T, R> List<T> getList(Class<T> tarClazz, Pageable page, TypedCommonFilter<R> commonFilter)
      Parameters:
      tarClazz -
      page -
      commonFilter -
      Returns:
    • getPageTyp

      public <T> Page<T> getPageTyp(Pageable pageable, TypedCommonFilter<T> filter)
    • getPage

      public <T, R> Page<T> getPage(Class<T> tarClazz, Pageable pageable, TypedCommonFilter<R> filter)
    • getList

      public <T> List<T> getList(Class<T> clazz)
      获取所有数据
      Parameters:
      clazz -
      Returns:
    • getList

      public <T> List<T> getList(TypedCommonFilter<T> commonFilter)
      获取列表
      Type Parameters:
      T -
      Parameters:
      commonFilter -
      Returns:
    • count

      public <T> Long count(TypedCommonFilter<T> commonFilter)
      数量
      Type Parameters:
      T -
      Parameters:
      commonFilter -
      Returns:
    • countDistinct

      public <T> Long countDistinct(String field, TypedCommonFilter<T> commonFilter)
      数量
      Type Parameters:
      T -
      Parameters:
      field -
      commonFilter -
      Returns:
    • update

      public <T> Integer update(TypedCommonFilter<T> commonFilter)
    • updateWithNull

      public <T> Integer updateWithNull(TypedCommonFilter<T> commonFilter)
    • delete

      public <T> int delete(TypedCommonFilter<T> commonFilter)