This repository has been archived on 2025-12-25. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
tdi-studio-se/main/plugins/org.talend.designer.components.localprovider/components/tPostgresqlInput/tPostgresqlInput_end.javajet
2023-08-18 09:56:50 +03:00

37 lines
899 B
Plaintext

<%@ jet
imports="
org.talend.core.model.process.INode
org.talend.designer.codegen.config.CodeGeneratorArgument
org.talend.core.model.process.ElementParameterParser
"
%>
<%@ include file="../templates/Log4j/Log4jDBConnUtil.javajet"%>
<%
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode)codeGenArgument.getArgument();
String cid = node.getUniqueName();
String useExistingConn = ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__");
%>
}
}finally{
if (rs_<%=cid%> != null) {
rs_<%=cid%>.close();
}
if (stmt_<%=cid%> != null) {
stmt_<%=cid%>.close();
}
<%
if(!("true").equals(useExistingConn))
{
%>
if(conn_<%=cid%> != null && !conn_<%=cid%>.isClosed()) {
<%log4jCodeGenerateUtil.close(node);%>
}
<%
}
%>
}
globalMap.put("<%=cid %>_NB_LINE",nb_line_<%=cid%>);
<%
log4jCodeGenerateUtil.retrieveRecordsCount(node);
%>