`
t02101235
  • 浏览: 2817 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

hibernate hql in

 
阅读更多
List list = session.createQuery(
"select sg5.sg5005 from lhyq.entity.changed.Yssg5 sg5 where sg5.sg5002="
+ id).list();
List listOther = session.createQuery(
"select sg5.sg5007 from lhyq.entity.changed.Yssg5 sg5 where sg5.sg5002="
+ id).list();
if (list != null && list.size() > 0 && listOther != null
&& listOther.size() > 0) {
String strSQL = "from lhyq.entity.unchanged.Ysgyb gyb where gyb.gyb004 in (:codeList) or gyb.gyb003 in (:codeListOther) ";
return session.createQuery(strSQL).setParameterList("codeList",
list.toArray()).setParameterList("codeListOther",
listOther.toArray()).list();
分享到:
评论

相关推荐

    Hibernate框架]Hql语句in中带参数的写法

    Hibernate框架]Hql语句in中带参数的写法

    Hibernate HQL教程

    hibernate HQL详细教程,简单易学易懂 1.1 HQL基础 2 1.1.1 默认数据库表和数据 2 1.1.2 检索类的所有对象 4 1.1.3 检索类的某几个属性 5 1.1.4 指定别名 5 1.1.5 where条件子句 5 1.1.6 使用distinct过滤掉重复值 6...

    Hibernate Search In Action

    Hibernate Search in Action aims not only at providing practical knowledge of Hibernate Search but also uncovering some of the background behind Hibernate Search’s design. We will start by describing ...

    Hibernate_HQL案例.zip

    范围查询(OR、IN、AND、NOT、>、<、、>=、、BETWEEN … AND …) // 4.排序查询(order by) // 5.分页查询 // 6.投影查询(只获取部分字段的结果) // 7.聚集函数使用(聚合函数)(count、sum、avg、max、min等)...

    hibernate的大部分的工具类

    这里面包含了大部分hibernate大部分常用的工具类和判断是否为空的工具类还有是否分页和hiberntae的hql通用分页

    hibernate增删改查和动态sql

    这里是hibernate增删查改和采用freemarker实现动态sql,hql

    Hibernate Recipes A Problem-Solution Approach

    How to use Hibernate Query Language (HQL) How to perform batch processing and use native SQL, criteria queries, caching objects, and more How to enable Hibernate in web applications with e-commerce ...

    hibernate.properties

    #hibernate.query.factory_class org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory ################# ### Platforms ### ################# ## JNDI Datasource #hibernate.connection....

    Hibernate注释大全收藏

    • Single Table per Class Hierarchy Strategy: the <subclass> element in Hibernate 每个类层次结构一张表 • Joined Subclass Strategy: the <joined-subclass> element in Hibernate 连接的子类策略 @...

    Hibernate_二级缓存总结

    一、缓存简介 Cache In Hibernate HIBERNATE 中的 CACHE 有两级 . 一级是在 Session 范围内的 CACHE . 即每个 Session 有自己的一个 CACHE, 当前操作的对象都会被保留在 CACHE 中 . 但是 Session 关闭后这个 CACHE...

    Hibernate Reference Documentation3.1

    14. HQL: The Hibernate Query Language 14.1. Case Sensitivity 14.2. The from clause 14.3. Associations and joins 14.4. Forms of join syntax 14.5. The select clause 14.6. Aggregate functions 14.7. ...

    hibernate总结

    2. 通过HQL/SQL 检索 hibernate query language (面向对象的查询语言) * a) 不再操纵表,它操纵的是持久化类的对象 b) 面向对象的 3. QBC ( query by criteria ) 更加面向对象 4. QBE ( query by Example ) 5....

    Hibernate开发指南

    77 Session管理...............................................................................................81 Hibernate in Spring.......................................................................

    hibernate3.6 文档(pdf 格式)

    1.1. Part 1 - The first Hibernate Application ................................................................ 1 1.1.1. Setup .............................................................................

    Mybatis 逆向工程使用及案例演示(一)

    我们做WEB开发,现在常用的ORM框架,如Mybatis,Hibernate等,现在较为常用的是Mybatis,不是因为Hibernate不好,在某些意义下Hibernate要比Mybatis要好,比如Hibernate的HQL语言,他进行数据库操作使用的非数据库...

    IKM在线测试 JAVA 88题带参考答案

    最新最全的IKM在线测试题库,增加如下内容: spring ioc hibernate multiple questions Concurrency/Threadpool Exceptions HQL Query interface, Criteria in Hibernate SimpleDateFormat

    idea-mini-ibatis.jar

    iBATIS和其他持久化框架,如Hibernate之间的显著区别在于,iBATIS强调使用SQL,而其他的框架通常使用一个自定义的查询语言,具有Hibernate查询语言(HQL)或Enterprise JavaBeans的查询语言(EJB QL)。

    《MyEclipse 6 Java 开发中文教程》前10章

    7.5.2 使用HQL编辑器 138 7.6 小结 140 7.7参考资料 141 第八章 开发Web应用 142 8.1介绍 142 8.2 Web项目和术语 142 8.2.1 Java EE 中的Web项目结构 142 8.2.2 MyEclipse Web 项目介绍 144 8.3 创建Web项目 144 8.4...

Global site tag (gtag.js) - Google Analytics