All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.quhaodian.data.core.BaseDao Maven / Gradle / Ivy

The newest version!
package com.quhaodian.data.core;

import com.quhaodian.data.page.Filter;
import com.quhaodian.data.page.Order;
import com.quhaodian.data.page.Page;
import com.quhaodian.data.page.Pageable;
import java.io.Serializable;
import java.util.List;
import org.hibernate.Criteria;

/**
 * 基础数据访问DAO
 *
 * @param 
 * @param 
 */
public interface BaseDao {

  /**
   * 根据条件查询数据,返回分页结果
   *
   * @param pageable 分页条件
   * @return
   */
  Page page(Pageable pageable);


  List list(Pageable pageable);


  /**
   * 分页方法

* 请采用{@link com.quhaodian.data.core.BaseDao#page(Pageable)} * * @param pageable * @return */ @Deprecated Pagination findByPage(Pageable pageable); List list(Integer first, Integer count, List filters, List orders); T add(T t); T delete(T t); T update(T t); T merge(T t); T findOne(Finder finder); @Deprecated Pagination find(Finder finder, int pageNo, int pageSize); Pagination findSql(Finder finder, int pageNo, int pageSize, Class otoclass); List find(Finder finder); Pagination findByCriteria(Criteria crit, int pageNo, int pageSize); List find(String hql, Object... values); List filters(Filter... filters); List findByProperty(String property, Object value); int countQueryResult(Finder finder); Long countQuery(Finder finder); Long countQuery(Filter... filters); int countQuerySqlResult(Finder finder); DTO hql(Finder finder); /** * hibernate 转换成sql * * @param hql * @return */ String transHqlToSql(String hql); /** * @param sql sql语句 * @param otoclass 需要转化的对象 * @return */ List listSQL(String sql, Class otoclass); List listSQL(String sql, Integer star, Integer max, Class otoclass); /** * @param sql sql语句 * @param otoclass 需要转化的对象 * @return */ DTO oneSQL(String sql, Class otoclass); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy