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 ...
随机推荐
- MSSQL系统进程锁GHOST CLEANUP
DBCC TRACEON(661 , -1);启用指定的跟踪标志. DBCC TRACEoff(661 , -1); DBCC TRACESTATUS;查看标记
- Jetty入门
Jetty的入门 一.开发环境 Eclipse 4.3.1 Maven 3.1 Jetty 9.0.6.v20130930 Jetty的下载地址: http://download.eclipse ...
- 取td里面的内容
var rowLength = document.getElementById("table名字").rows.length; for(var i=0;i<rowLeng ...
- Linux内核--网络栈实现分析(一)--网络栈初始化
本文分析基于内核Linux Kernel 1.2.13 原创作品,转载请标明http://blog.csdn.net/yming0221/article/details/7488828 更多请看专栏, ...
- Android 5.x特性概览二
上文 ,对Android 5.X特性,主要是Material Design的特性进行了介绍,这篇文章我们来使用Material Design主题. Material Design 现在有三种默认的主题 ...
- Gedit中文乱码
缺省配置下,用 Ubuntu 的文本编辑器(Gedit)打开GB18030(繁体中文用户请将这里的出现的GB18030替换成BIG5或BIG5-HKSCS)类型的中文编码文本文件时,将会出现乱码. 出 ...
- ubuntu adobe flash player 安装
常规做法 1.先更新sudo apt-get update 2. sudo apt-get install flashplugin-installer 这次却卡在downloading这里 下不去.无 ...
- spring MVC注解深入研究
@Controller @Service @Controller和 @Component注册一个action 到spring 上下文中,bean 的ID 默认为类名称开头字母小写.@Reposito ...
- 创建链接服务器(dblink)
--创建链接服务器(dblink) exec sp_addlinkedserver 'srv_lnk','','SQLOLEDB','远程服务器名或ip地址' exec sp_addlinkedsrv ...
- 一致性Hash算法在Redis分布式中的使用
由于redis是单点,但是项目中不可避免的会使用多台Redis缓存服务器,那么怎么把缓存的Key均匀的映射到多台Redis服务器上,且随着缓存服务器的增加或减少时做到最小化的减少缓存Key的命中率呢? ...