public List getMaintainList(String persId, String status) {
String[] aStat = status.split(",");
String param = "?";
for(int i=1; i<aStat.length; i++)
{
param += ",?";
}
String hql = "select m.mtnId, m.devName, m.positionName from Maintain m, Planning p " +
"where m.planId = p.planId and p.beginDate<sysdate and p.endDate>sysdate" +
" and m.persIds like ? and m.status in ( " + param + ") ";
String pPersId = "%;" + persId + ";%";
Object[] oParam = new Object[aStat.length+1];
oParam[0] = pPersId;
for(int i=1; i<oParam.length; i++)
{
oParam[i] = new Long(aStat[i-1]);
}
List list = findListByHql(hql, oParam);
return list;
}
分享到:
相关推荐
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 ...
Along the way, the reader masters performance-boosting concepts like using Hibernate Search in a clustered environment and integrating with the features already in your applications. This book ...
1.4 HQL的多表查询 17 1.4.1 表之间的关联关系 17 1.4.2 表中的数据 18 1.4.3 修改持久化类 19 1.4.4 在映射文件中加入关联信息 20 1.4.5 左外连接 21 1.4.6 左外抓取连接 23 1.4.7 右外连接 24 1.4.8 内连接 24 ...
This is a bit like the way Hibernate uses optimistic locking for versioned objects. The benefit is that lock contention is totally removed because there aren’t any locks on rows! This means that ...
Readers will find this edition immensely helpful in answering questions like: What are the ways to leverage these technologies? What applications is AOP suitable for? What are the best practices and ...
=,LIKE,IN,IS NULL和IS EMPTY)对属性进行过滤。 使用(SOME,ALL,NONE)过滤集合和关联。 将单个过滤器与逻辑运算符(AND,OR,NOT)的任意组合组合。 按属性排序。 分页。 从客户端代码远程定义搜索。 ...
1、JDBC连接方式下sql注入的存在的形态及修复方法,like、in情况在如何安全使用预处理来防范sql注入 2、在使用Mybatis框架下如何审计sql注入代码,并详细的介绍了如何编写安全的数据库查询语句。 3、在使用Hibernate...
Readers will find this edition immensely helpful in answering questions like: What are the ways to leverage these technologies? What applications is AOP suitable for? What are the best practices and ...
Portlets in Action is a comprehensive guide to building portlet-driven applications in Java. It teaches portlet development hands-on as you develop a portal that incorporates most key features of the ...
PostgreSQL is one of the most powerful and easy to use database management ... Finally by the end of the book, you'll learn to use the JDBC driver and manipulate data objects in the Hibernate framework.
We’ll see how Grails allows us to use powerful frameworks like Spring and Hibernate without even knowing it. Using this hands-on, pragmatic approach, we’ll explore topics such as AJAX in Grails, ...
How to build transaction engines for your enterprise application and take advantage of other middle-tier features in Spring How to build Spring-based web applications using Spring MVC and more How to ...
* How to develop a full stack Guice / Struts 2 / Hibernate application. * What you can really do with modern Java. Who is this book for? This book is for professional Java developers who are ...
for(User x:User.WHERE().name.like("zzg%").status.in(0, 1).SELECT().select()){ System.out.println(x); } //SQL: SELECT * FROM `user` WHERE (`name` like 'zzg%' AND `status` >= 0) // OR (`name` = '...
mybatis实战教程mybatis in action之四实现关联数据的查询 mybatis实战教程mybatis in action之五与spring3集成附源码 mybatis实战教程mybatis in action之六与Spring MVC 的集成 mybatis实战教程mybatis in action...
2.1.2.1 Like 9 2.1.2.2 In 10 2.1.2.3 Between 10 2.1.2.4 Equal 10 2.1.2.5 NotEqual 10 2.1.2.6 GreaterThan 10 2.1.2.7 GreaterEqual 11 2.1.2.8 LessThan 11 2.1.2.9 LessEqual 11 2.1.2.10 直接Sql限制 11 2.1...
This book is for Java developers who would like to rapidly gain hands-on experience with Java/Java EE development using the Spring framework. If you are already a developer using Spring in your ...
Webview window in android used to load pages just works like browser, as well as there is only one webview running at the same time. (2)Cross-domain data interaction. Different webviews can not share...
194、In a architecture pattern like MVC, it is mandatory that Servlet should be the controller, why not JSP? 46 195、Why JSP is used as View part of MVC ? 46 196、Can a database connection pool be ...
194、In a architecture pattern like MVC, it is mandatory that Servlet should be the controller, why not JSP? 46 195、Why JSP is used as View part of MVC ? 46 196、Can a database connection pool be ...