Hibernate 中批量查询

一、原生SQL查询

  1.  简单查询             
        1  返回数组List

Hibernate 中批量查询

Hibernate 中批量查询

        2.  返回对象List

Hibernate 中批量查询

Hibernate 中批量查询

2.条件查询

    Hibernate 中批量查询

Hibernate 中批量查询

3.分页查询

Hibernate 中批量查询Hibernate 中批量查询

二、HQL查询-hibernate Query Language(多表查询,但不复杂时使用)
    Hibernate独家查询语言,属于面向对象的查询语言

      1.  基本查询

      Hibernate 中批量查询       

   2.条件查询    

        1.?号占位符

        Hibernate 中批量查询   

Hibernate 中批量查询

            2.命名占位符

           

Hibernate 中批量查询

Hibernate 中批量查询


  3、  分页查询

       Hibernate 中批量查询
        

    三、Criteria查询(单表条件查询)

    Hibernate自创的无语句面向对象查询

           1.基本查询

        Hibernate 中批量查询
    条件查询
        Hibernate 中批量查询
     Hibernate 中批量查询   

  

    2. 分页 查询

       Hibernate 中批量查询 

    3设置查询总记录数

        Hibernate 中批量查询