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的更多相关文章

  1. java.lang.ClassNotFoundException: com.demo.search.extractAbstract.service.ExtractAbstractServiceHandler

    在利用 Spring 对 thrift 进行集成时,出现错误: avax.servlet.ServletException: Servlet.init() for servlet search-nlp ...

  2. SharePoint 2013 Search REST API 使用示例

    前言:在SharePoint2013中,提供Search REST service搜索服务,你可以在自己的客户端搜索方法或者移动应用程序中使用,该服务支持REST web request.你可以使用K ...

  3. 修改SharePoint 2013中Search Topology时遇到的一些问题以及一些Tips

    这次操作在笔者的场中涉及到5台服务器, CA, APP2, APP3, APP4, APP5. 原本只有CA运行着Search Service Applicaiton, 现在想让APP2-5运行这项服 ...

  4. Android的系统服务一览

    System_Server进程 运行在system server进程中的服务比较多,这是整个Android框架的基础 Native服务 SurfaceFlinger 这是framebuffer合成的服 ...

  5. [SharePoint] SharePoint 错误集 2

    1 Run command “New-SPConfigurationDatabase" Feature Description: error message popup after run ...

  6. AppStore 相关

    App 跳转 AppStore 网址链接   https://itunes.apple.com/app/uri/id582319843?mt=8   https 可替换成 itms,可直接避免进入 S ...

  7. ATT GATT Profile

    Bluetooth: ATT and GATT Bluetooth 4.0, which includes the Low Energy specification, brings two new c ...

  8. ElasticSearch在Azure中的集群配置和Auto-Scale

    最近在项目中ElasticSearch的使用越来越多,最新的项目中要求ES使用集群,在啥都不知道的情况下弄了两天后,终于搞定,因此写个笔记记录下. 1.首先我们需要创建一个Virtual networ ...

  9. centos下 rpm包sphinx安装成功提示

    sphinx: /etc/sphinx /usr/share/sphinx Sphinx installed! Now create a full-text index, start the sear ...

随机推荐

  1. 字符串链接strcat

    #include "stdafx.h" #include "iostream" #include "assert.h" #include & ...

  2. Jade之Doctype

    Doctype jade: doctype html html: <!DOCTYPE html>

  3. Android自动化测试之MonkeyRunner

    1.Monkeyrunner简介 Monkeyrunner是Android系统自带的四大自动化测试工具之一,其他三个是Monkey.CTS.Benchmark:Monkeyrunner需要通过Andr ...

  4. OpenLayers中的图层

    OpenLayers有多个不同的图层类,每一个都可以连接到不同的地图服务器.例如通过Layer.WMS类可以连接到WMS地图服务器,通过Layer.Google类可以连接到谷歌地图服务器.OpenLa ...

  5. OkHttp使用进阶 译自OkHttp Github官方教程

    版权声明: 欢迎转载,但请保留文章原始出处 作者:GavinCT 出处:http://www.cnblogs.com/ct2011/p/3997368.html 没有使用过OkHttp的,可以先看Ok ...

  6. iOS UIWebView中javascript与Objective-C交互、获取摄像头

    UIWebView是iOS开发中常用的一个视图控件,多数情况下,它被用来显示HTML格式的内容. 支持的文档格式 除了HTML以外,UIWebView还支持iWork, Office等文档格式: Ex ...

  7. 我没发现Mvc里的 web.config 有什么用。

    实验过程 由于 Mvc2+ 引入 Area ,导致文件夹结构发生变化. Mvc下的 web.config 所在的位置是: ~/Areas/MySystem/Views/Web.config 对应的请求 ...

  8. NodeJS package.json

    #3 NodeJS package.json 工作目录 package.json 导航至工作目录后,执行下图中的命令

  9. [Microsoft Test Manager]CodeUI初探

      开发环境: Widnows8 Microsoft Visual Studio Ultimate 2012   1. 新建一个 Windows Forms Application Figue1 Cr ...

  10. [JS13] ActivetX

    <HTML> <head> <title>JavaScript Unleashed</title> <script type="text ...