@Test public void findByField() { }
public <TView> List<TView> findByField(Class<TView> viewClass, String field, Object param) { Sql sql = this.getDialect().select(viewClass) .where(Cond.eq(field, param)) .and(Cond.logicalDeleteCond(Metadata.get(viewClass))); return this.find(viewClass, sql); }
DB { public <TView> List<TView> findByField(Class<TView> viewClass, String field, Object param) { Sql sql = this.getDialect().select(viewClass) .where(Cond.eq(field, param)) .and(Cond.logicalDeleteCond(Metadata.get(viewClass))); return this.find(viewClass, sql); } }
DB { public <TView> List<TView> findByField(Class<TView> viewClass, String field, Object param) { Sql sql = this.getDialect().select(viewClass) .where(Cond.eq(field, param)) .and(Cond.logicalDeleteCond(Metadata.get(viewClass))); return this.find(viewClass, sql); } private  DB(DBTemplate dbTemplate); }
DB { public <TView> List<TView> findByField(Class<TView> viewClass, String field, Object param) { Sql sql = this.getDialect().select(viewClass) .where(Cond.eq(field, param)) .and(Cond.logicalDeleteCond(Metadata.get(viewClass))); return this.find(viewClass, sql); } private  DB(DBTemplate dbTemplate); static DB conn(DBTemplate dbTemplate); static DB conn(String dsName); static DB conn(); R tx(Function<DB, R> function); void tx(Consumer<DB> consumer); Connection open(); void close(); void commit(); void rollback(); List<TView> find(Class<TView> viewClass,
      String sql,
      Collection params); List<TView> find(Class<TView> viewClass,
      String sql); List<TView> find(Class<TView> viewClass,
      Sql sql); List<Record> find(String sql,
      Collection params); List<Record> find(Sql sql); Map<TKey, TView> findMap(Class<TView> viewClass,
      String keyField, String sql,
      Collection params); Map<TKey, TView> findMap(Class<TView> viewClass,
      String keyField, Sql sql); List<TView> findTop(Class<TView> viewClass,
      int top,
      String sql,
      Collection params); List<TView> findTop(Class<TView> viewClass,
      int top,
      Sql sql); List<Record> findTop(int top,
      String sql,
      Collection params); List<Record> findTop(int top,
      Sql sql); TView get(Class<TView> viewClass,
      String sql,
      Collection params); TView get(Class<TView> viewClass,
      Sql sql); Record get(String sql,
      Collection params); Record get(Sql sql); TView getById(Class<TView> viewClass,
      Object id); TView getByField(Class<TView> viewClass,
      String field,
      Object param); TView getByCond(Class<TView> viewClass,
      Cond cond); TView getByCondition(Class<TView> viewClass,
      Object object); TView getByCondition(Class<TView> viewClass,
      Object object,
      String conditionGroup); List<TView> findByIds(Class<TView> viewClass,
      Collection ids); List<TView> findByField(Class<TView> viewClass,
      String field,
      Object param); List<TView> findByField(Class<TView> viewClass,
      String field,
      Collection params); List<TView> findByCond(Class<TView> viewClass,
      Cond cond); List<TView> findByCondition(Class<TView> viewClass,
      Object object); List<TView> findByCondition(Class<TView> viewClass,
      Object object,
      String conditionGroup); long count(String sql,
      Collection params); long count(Sql sql); long countByCond(Class<TView> viewClass,
      Cond cond); boolean exists(Sql sql); boolean exists(String sql,
      Collection params); boolean existsByCond(Class<TView> viewClass,
      Cond cond); PageLite<TView> findPageLite(Class<TView> viewClass,
      String sql,
      Collection params,
      boolean enablePage,
      int currentPage,
      int pageSize); PageLite<TView> findPageLite(Class<TView> viewClass,
      Sql sql,
      boolean enablePage,
      int currentPage,
      int pageSize); PageLite<TView> findPageLite(Class<TView> viewClass,
      String sql,
      Collection params,
      IPageable pageable); PageLite<TView> findPageLite(Class<TView> viewClass,
      Sql sql,
      IPageable pageable); PageLite<Record> findPageLite(String sql,
      Collection params,
      boolean enablePage,
      int currentPage,
      int pageSize); PageLite<Record> findPageLite(Sql sql,
      boolean enablePage,
      int currentPage,
      int pageSize); PageLite<Record> findPageLite(String sql,
      Collection params,
      IPageable pageable); PageLite<Record> findPageLite(Sql sql,
      IPageable pageable); Page<TView> findPage(Class<TView> viewClass,
      String sql,
      Collection params,
      boolean enablePage,
      int currentPage,
      int pageSize); Page<TView> findPage(Class<TView> viewClass,
      Sql sql,
      boolean enablePage,
      int currentPage,
      int pageSize); Page<TView> findPage(Class<TView> viewClass,
      String sql,
      Collection params,
      IPageable pageable); Page<TView> findPage(Class<TView> viewClass,
      Sql sql,
      IPageable pageable); Page<Record> findPage(String sql,
      Collection params,
      boolean enablePage,
      int currentPage,
      int pageSize); Page<Record> findPage(Sql sql,
      boolean enablePage,
      int currentPage,
      int pageSize); Page<Record> findPage(String sql,
      Collection params,
      IPageable pageable); Page<Record> findPage(Sql sql,
      IPageable pageable); int execute(String sql,
      Collection params); int execute(Sql sql); int[] execute(List<Sql> sqlList); int create(Class<TModel> modelClass,
      TModel entity); long snowFlakeId(); int create(Class<TModel> modelClass,
      Collection<TModel> entities); String uuid(); int update(Class<TModel> modelClass,
      TModel entity); int updateIgnoreNull(Class<TModel> modelClass,
      TModel entity); int update(Class<TModel> modelClass,
      TModel entity,
      String[] columns); int update(Class<TModel> modelClass,
      Collection<TModel> entities,
      String[] columns); int update(Class<TModel> modelClass,
      Collection<TModel> entities); int delete(Class<TModel> modelClass,
      TModel entity); int delete(Class<TModel> modelClass,
      Collection<TModel> entities); int deleteByIds(Class<TModel> modelClass,
      Collection ids); int deleteById(Class<TModel> modelClass,
      Object id); int deleteByCond(Class<TModel> modelClass,
      Cond cond); }
DB { public <TView> List<TView> findByField(Class<TView> viewClass, String field, Object param) { Sql sql = this.getDialect().select(viewClass) .where(Cond.eq(field, param)) .and(Cond.logicalDeleteCond(Metadata.get(viewClass))); return this.find(viewClass, sql); } private  DB(DBTemplate dbTemplate); static DB conn(DBTemplate dbTemplate); static DB conn(String dsName); static DB conn(); R tx(Function<DB, R> function); void tx(Consumer<DB> consumer); Connection open(); void close(); void commit(); void rollback(); List<TView> find(Class<TView> viewClass,
      String sql,
      Collection params); List<TView> find(Class<TView> viewClass,
      String sql); List<TView> find(Class<TView> viewClass,
      Sql sql); List<Record> find(String sql,
      Collection params); List<Record> find(Sql sql); Map<TKey, TView> findMap(Class<TView> viewClass,
      String keyField, String sql,
      Collection params); Map<TKey, TView> findMap(Class<TView> viewClass,
      String keyField, Sql sql); List<TView> findTop(Class<TView> viewClass,
      int top,
      String sql,
      Collection params); List<TView> findTop(Class<TView> viewClass,
      int top,
      Sql sql); List<Record> findTop(int top,
      String sql,
      Collection params); List<Record> findTop(int top,
      Sql sql); TView get(Class<TView> viewClass,
      String sql,
      Collection params); TView get(Class<TView> viewClass,
      Sql sql); Record get(String sql,
      Collection params); Record get(Sql sql); TView getById(Class<TView> viewClass,
      Object id); TView getByField(Class<TView> viewClass,
      String field,
      Object param); TView getByCond(Class<TView> viewClass,
      Cond cond); TView getByCondition(Class<TView> viewClass,
      Object object); TView getByCondition(Class<TView> viewClass,
      Object object,
      String conditionGroup); List<TView> findByIds(Class<TView> viewClass,
      Collection ids); List<TView> findByField(Class<TView> viewClass,
      String field,
      Object param); List<TView> findByField(Class<TView> viewClass,
      String field,
      Collection params); List<TView> findByCond(Class<TView> viewClass,
      Cond cond); List<TView> findByCondition(Class<TView> viewClass,
      Object object); List<TView> findByCondition(Class<TView> viewClass,
      Object object,
      String conditionGroup); long count(String sql,
      Collection params); long count(Sql sql); long countByCond(Class<TView> viewClass,
      Cond cond); boolean exists(Sql sql); boolean exists(String sql,
      Collection params); boolean existsByCond(Class<TView> viewClass,
      Cond cond); PageLite<TView> findPageLite(Class<TView> viewClass,
      String sql,
      Collection params,
      boolean enablePage,
      int currentPage,
      int pageSize); PageLite<TView> findPageLite(Class<TView> viewClass,
      Sql sql,
      boolean enablePage,
      int currentPage,
      int pageSize); PageLite<TView> findPageLite(Class<TView> viewClass,
      String sql,
      Collection params,
      IPageable pageable); PageLite<TView> findPageLite(Class<TView> viewClass,
      Sql sql,
      IPageable pageable); PageLite<Record> findPageLite(String sql,
      Collection params,
      boolean enablePage,
      int currentPage,
      int pageSize); PageLite<Record> findPageLite(Sql sql,
      boolean enablePage,
      int currentPage,
      int pageSize); PageLite<Record> findPageLite(String sql,
      Collection params,
      IPageable pageable); PageLite<Record> findPageLite(Sql sql,
      IPageable pageable); Page<TView> findPage(Class<TView> viewClass,
      String sql,
      Collection params,
      boolean enablePage,
      int currentPage,
      int pageSize); Page<TView> findPage(Class<TView> viewClass,
      Sql sql,
      boolean enablePage,
      int currentPage,
      int pageSize); Page<TView> findPage(Class<TView> viewClass,
      String sql,
      Collection params,
      IPageable pageable); Page<TView> findPage(Class<TView> viewClass,
      Sql sql,
      IPageable pageable); Page<Record> findPage(String sql,
      Collection params,
      boolean enablePage,
      int currentPage,
      int pageSize); Page<Record> findPage(Sql sql,
      boolean enablePage,
      int currentPage,
      int pageSize); Page<Record> findPage(String sql,
      Collection params,
      IPageable pageable); Page<Record> findPage(Sql sql,
      IPageable pageable); int execute(String sql,
      Collection params); int execute(Sql sql); int[] execute(List<Sql> sqlList); int create(Class<TModel> modelClass,
      TModel entity); long snowFlakeId(); int create(Class<TModel> modelClass,
      Collection<TModel> entities); String uuid(); int update(Class<TModel> modelClass,
      TModel entity); int updateIgnoreNull(Class<TModel> modelClass,
      TModel entity); int update(Class<TModel> modelClass,
      TModel entity,
      String[] columns); int update(Class<TModel> modelClass,
      Collection<TModel> entities,
      String[] columns); int update(Class<TModel> modelClass,
      Collection<TModel> entities); int delete(Class<TModel> modelClass,
      TModel entity); int delete(Class<TModel> modelClass,
      Collection<TModel> entities); int deleteByIds(Class<TModel> modelClass,
      Collection ids); int deleteById(Class<TModel> modelClass,
      Object id); int deleteByCond(Class<TModel> modelClass,
      Cond cond);  }