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. 【洛谷P3258】松鼠的新家

    很好的一道题 LCA+树上前缀和 sum数组是前缀和数组, 分类讨论一下, 1.访问到一个点p1,若下一个点p2需要往儿子下面找的话,那么lca就是这个点p1,则sum[p1]--; sum[p2]+ ...

  2. Android横竖屏切换小结

    Android横竖屏切换小结 (老样子,图片啥的详细文档,可以下载后观看 http://files.cnblogs.com/franksunny/635350788930000000.pdf) And ...

  3. KEIL MDK输出map文件分析

    一.文件分析流程 1.第一部分:Section Cross References 主要是各个源文件生成的模块之间相互引用的关系. stm32f10x.o(STACK) refers (Special) ...

  4. 解决Win7下打不开chm文件的方法

    win7 无法打开chm操作如下:1,在命令行运行regsvr32 itss.dll2,在命令行运行regsvr32 hhctrl.ocx

  5. python 常用函数(不定时更新)

    1.遍历文件夹 import os def FileList(rootDir): FL=[] for lists in os.listdir(rootDir): path=os.path.join(r ...

  6. mysql pid文件

    mysql pid文件记录的是当前mysqld进程的pid. 通过Mysqld_safe启动mysql时,mysqld_safe会检查pid文件,未指定PID文件时,pid文件默认名为$DATADIR ...

  7. Orchard Compact v1.7.2

    1. 仅包留了Core中的Settings和Shapes, 及Modules, Themes和jQuery模块. 2. 添加了对Oracle的支持. 下载地址: 二进制: Orchard.Compac ...

  8. 基于 IdentityServer3 实现 OAuth 2.0 授权服务【密码模式(Resource Owner Password Credentials)】

    密码模式(Resource Owner Password Credentials Grant)中,用户向客户端提供自己的用户名和密码.客户端使用这些信息,向"服务商提供商"索要授权 ...

  9. nodeJs开发app.js解析

    在 node.js 中模块分为核心模块和文件模块两种,核心模块是通过 require('xxxx') 导入的,文件模块是以 require('/xxxx') 或 require('./xxxx').r ...

  10. AngularJS快速入门指南01:导言

    AngularJS使用新的attributes扩展了HTML AngularJS对单页面应用的支持非常好(SPAs) AngularJS非常容易学习 现在就开始学习AngularJS吧! 关于本指南 ...