Naked Search in service
public List<TplRelease> searchTplReleaseById(TplRelease tr)throws Exception{
DBOperator dbo = getDBOperator();
try{
List<TplRelease> tplReleaseList = new ArrayList<TplRelease>();
String sqlWhere = "select b.* from "+
"(SELECT max(a.CREATE_TIME) AS CREATE_TIME , a.TPL_ID FROM template.tpl_release a WHERE a.TPL_ID =? AND a.TPL_STATUS ='1' GROUP BY a.TPL_ID ) c "+
" left join template.tpl_release b on c.CREATE_TIME = b.CREATE_TIME and c.TPL_ID = b.TPL_ID";
PreparedStatement pst = dbo.createPreparedStatement(sqlWhere);
pst.setString(1,tr.getTplID());
ResultSet rs = pst.executeQuery();
while (rs.next()) {
TplRelease tplRelease = new TplRelease();
tplRelease.setTplID(rs.getString("Tpl_ID"));
tplRelease.setTplVersion(rs.getString("Tpl_Version"));
tplRelease.setTplName(rs.getString("Tpl_Name"));
tplRelease.setTplNamePy(rs.getString("Tpl_Name_Py"));
tplRelease.setTplDesc(rs.getString("Tpl_Desc"));
tplRelease.setTplData(rs.getString("Tpl_Data"));
tplRelease.setTplStatus(rs.getString("Tpl_Status"));
tplRelease.setTreeNode(rs.getString("Tree_Node"));
tplRelease.setNodeIndex(rs.getString("Node_Index"));
tplRelease.setCreator(rs.getString("Creator"));
tplRelease.setCreateTime(rs.getString("Create_Time"));
tplRelease.setModifier(rs.getString("Modifier"));
tplRelease.setModifyTime(rs.getString("Modify_Time"));
tplRelease.setOwnerOrg(rs.getString("Owner_Org"));
tplRelease.setInoutFlag(rs.getString("Inout_Flag"));
tplRelease.setTplType(rs.getString("Tpl_Type"));
tplReleaseList.add(tplRelease);
}
dbo.commit();
return tplReleaseList;
}catch(Exception e){
dbo.rollback();
throw e;
}finally{
dbo.close();
}
}
Naked Search in service的更多相关文章
- java.lang.ClassNotFoundException: com.demo.search.extractAbstract.service.ExtractAbstractServiceHandler
在利用 Spring 对 thrift 进行集成时,出现错误: avax.servlet.ServletException: Servlet.init() for servlet search-nlp ...
- SharePoint 2013 Search REST API 使用示例
前言:在SharePoint2013中,提供Search REST service搜索服务,你可以在自己的客户端搜索方法或者移动应用程序中使用,该服务支持REST web request.你可以使用K ...
- 修改SharePoint 2013中Search Topology时遇到的一些问题以及一些Tips
这次操作在笔者的场中涉及到5台服务器, CA, APP2, APP3, APP4, APP5. 原本只有CA运行着Search Service Applicaiton, 现在想让APP2-5运行这项服 ...
- Android的系统服务一览
System_Server进程 运行在system server进程中的服务比较多,这是整个Android框架的基础 Native服务 SurfaceFlinger 这是framebuffer合成的服 ...
- [SharePoint] SharePoint 错误集 2
1 Run command “New-SPConfigurationDatabase" Feature Description: error message popup after run ...
- AppStore 相关
App 跳转 AppStore 网址链接 https://itunes.apple.com/app/uri/id582319843?mt=8 https 可替换成 itms,可直接避免进入 S ...
- ATT GATT Profile
Bluetooth: ATT and GATT Bluetooth 4.0, which includes the Low Energy specification, brings two new c ...
- ElasticSearch在Azure中的集群配置和Auto-Scale
最近在项目中ElasticSearch的使用越来越多,最新的项目中要求ES使用集群,在啥都不知道的情况下弄了两天后,终于搞定,因此写个笔记记录下. 1.首先我们需要创建一个Virtual networ ...
- centos下 rpm包sphinx安装成功提示
sphinx: /etc/sphinx /usr/share/sphinx Sphinx installed! Now create a full-text index, start the sear ...
随机推荐
- [vb.net]判断窗体是否已打开
1.使用OpenForms if my.Application.OpenForms.Item("FormName") isnot nothing then搜索 do somethi ...
- Linux聊天室项目 -- ChatRome(select实现)
序 项目简介:采用I/O复用技术select实现socket通信,采用多线程负责每个客户操作处理,完成Linux下的多客户聊天室! OS:Ubuntu 15.04 IDE:vim gcc make D ...
- 斯坦福第十七课:大规模机器学习(Large Scale Machine Learning)
17.1 大型数据集的学习 17.2 随机梯度下降法 17.3 微型批量梯度下降 17.4 随机梯度下降收敛 17.5 在线学习 17.6 映射化简和数据并行 17.1 大型数据集的学习
- 【5_283】Move Zeroes
终于碰到一道水题,睡觉去~ Move Zeroes Total Accepted: 37369 Total Submissions: 88383 Difficulty: Easy Given an a ...
- WPF之 DataGrid分页
接着上一篇WPF之 DataGrid数据绑定,继续讲述WPF中DataGrid分页. 由于分页经常用到,就做了一个自定义控件,由于当时的局限性,只支持DataTable数据源,不过木关系,网上很多其他 ...
- 解决"java.lang.ClassNotFoundException: com.mysql.jdbc.Driver"
按照以前的老方法,写Java的主程序通过JDBC来连MySQL. //1: import java.sql.*; import java.sql.*; public class JDBC_Driver ...
- 完全背包问题:湫湫系列故事――减肥记I(HDU 4508)
湫湫系列故事――减肥记I HDU 4508 一道裸的完全背包 #include<iostream> #include<algorithm> #include<stdio ...
- haskell中的let和where
haskell中有两种定义局部变量的方法let和where,方法分别如下 roots a b c = ((-b + det) / (a2), (-b - det) / (a2)) *a*c) a2 = ...
- Swift的排序算法总结
下面让我们一起来见识一下swift中基于Array的扩展的冒泡排序,选择排序和快速排序吧. 1.冒泡排序 冒泡排序再基础不过了,这里就不再讲其原理了,实在不会可以看下百度百科冒泡排序 既然冒泡排序避免 ...
- 关于mvc中@Html.DropDownListFor和@Html.DropDownList默认值无法选中问题简单总结
当我们在做类似编辑功能的时候,会给定select选中默认值,然而mvc中偶尔这个功能不能用,或者是强类型的@Html.DropDownListFor不能用.凑巧今天遇到问题,解决问题时发现了mvc的一 ...