Compare commits
1 Commits
undx/TCOMP
...
allDeltaAn
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b7ef5e95c |
@@ -11,7 +11,7 @@
|
||||
|
||||
<!-- modification 2: compile classpath -->
|
||||
<path id="compile.classpath">
|
||||
<pathelement location="../../../../../../tcommon-studio-se/main/plugins/org.talend.libraries.dom4j-jaxen/lib/dom4j-2.1.3.jar" />
|
||||
<pathelement location="../../../../../../tcommon-studio-se/main/plugins/org.talend.libraries.dom4j-jaxen/lib/dom4j-1.6.1.jar" />
|
||||
<pathelement location="../../../../../../tcommon-studio-se/main/plugins/org.talend.libraries.apache.common/lib/commons-lang-2.6.jar" />
|
||||
</path>
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dom4j</groupId>
|
||||
<groupId>dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>2.1.3</version>
|
||||
<version>1.6.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
|
||||
@@ -73,10 +73,11 @@
|
||||
<artifactId>geronimo-stax-api_1.0_spec</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/dom4j/dom4j -->
|
||||
<dependency>
|
||||
<groupId>org.dom4j</groupId>
|
||||
<groupId>dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>2.1.3</version>
|
||||
<version>1.6.1</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans -->
|
||||
<dependency>
|
||||
|
||||
@@ -73,10 +73,11 @@
|
||||
<artifactId>geronimo-stax-api_1.0_spec</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/dom4j/dom4j -->
|
||||
<dependency>
|
||||
<groupId>org.dom4j</groupId>
|
||||
<groupId>dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>2.1.3</version>
|
||||
<version>1.6.1</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans -->
|
||||
<dependency>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<dependency>
|
||||
<groupId>org.dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>2.1.3</version>
|
||||
<version>2.1.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -132,7 +132,7 @@ int tmp_batchUpdateCount_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
String tableName_<%=cid%> = <%=table%>;
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
|
||||
|
||||
@@ -102,10 +102,12 @@ imports="
|
||||
if(("true").equals(useCommitControl)) {
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery)) {
|
||||
%>
|
||||
if(commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if(commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -310,7 +310,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.sql.SQLException e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -442,7 +444,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.sql.SQLException e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -589,7 +593,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.sql.SQLException e) {
|
||||
@@ -665,7 +671,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.sql.SQLException e) {
|
||||
@@ -795,6 +803,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
|
||||
@@ -840,7 +849,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -930,7 +941,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.sql.SQLException e) {
|
||||
@@ -1014,10 +1027,13 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
<%
|
||||
}%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
commitCounter_<%=cid%>=0;
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
String tableName_<%=cid%> = <%=tableName%>;
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
java.sql.Connection conn_<%=cid%> = null;
|
||||
|
||||
@@ -61,9 +61,13 @@ imports="
|
||||
{
|
||||
if(!("").equals(commitEvery)&&!("0").equals(commitEvery)){
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%> = 0;
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
@@ -140,7 +140,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -230,7 +232,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -348,7 +352,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -410,7 +416,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try{
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> = processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -511,7 +519,8 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
}
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
updatedCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
<%
|
||||
@@ -573,7 +582,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -585,7 +596,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
nb_line_<%=cid%>++;
|
||||
nb_line_<%=cid%>++;
|
||||
<%
|
||||
if(rejectConnName != null && rejectColumnList != null && rejectColumnList.size() > 0) {
|
||||
%>
|
||||
@@ -652,7 +663,8 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -697,7 +709,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
for(IConnection outgoingConn : outgoingConns) {
|
||||
if(rejectConnName == null || (rejectConnName != null && !outgoingConn.getName().equals(rejectConnName))) {
|
||||
if(outgoingConn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {
|
||||
if(outgoingConn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)){
|
||||
%>
|
||||
<%=outgoingConn.getName()%> = new <%=outgoingConn.getName()%>Struct();
|
||||
<%
|
||||
@@ -720,12 +732,15 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
commitCounter_<%=cid%>++;
|
||||
|
||||
if(commitEvery_<%=cid%><=commitCounter_<%=cid%>) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
if(commitEvery_<%=cid%> <= commitCounter_<%=cid%>){
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java_DOM4J" MODULE="dom4j-2.1.3.jar" MVN="mvn:org.dom4j/dom4j/2.1.3" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java_DOM4J_2.1.1" MODULE="dom4j-2.1.1.jar" MVN="mvn:org.dom4j/dom4j/2.1.1" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java_JAXEN_1.1.6" MODULE="jaxen-1.1.6.jar" MVN="mvn:jaxen/jaxen/1.1.6" REQUIRED="true" BundleID="" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -163,7 +163,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
String tableName_<%=cid%> = <%=table%>;
|
||||
|
||||
@@ -37,7 +37,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
String dataAction = ElementParameterParser.getValue(node,"__DATA_ACTION__");
|
||||
|
||||
String commitEvery = ElementParameterParser.getValue(node, "__COMMIT_EVERY__");
|
||||
|
||||
|
||||
boolean setAutoCommit = false;
|
||||
|
||||
boolean useExistingConnection = "true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
@@ -121,6 +121,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : 1);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -141,6 +142,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -196,6 +198,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : <%=("INSERT").equals(dataAction)? "1" : "countEach_" +cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -221,6 +224,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -254,10 +258,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery))
|
||||
{
|
||||
%>
|
||||
if (commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if (commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -631,7 +631,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -709,7 +711,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -844,7 +848,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -996,7 +1002,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1072,7 +1080,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1204,7 +1214,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
try {
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
|
||||
<%
|
||||
@@ -1250,7 +1260,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -1342,7 +1354,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1410,7 +1424,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
%>
|
||||
int replaceCount_<%=cid%> = 0;
|
||||
try {
|
||||
replaceCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
replaceCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().replacing(null);%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -1490,7 +1506,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
int count_on_duplicate_key_<%=cid%> = 0;
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
count_on_duplicate_key_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
count_on_duplicate_key_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().insertingOnDuplicateKeyUpdating(null);%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -1556,7 +1574,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().insertingOnDuplicateKeyUpdating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -1627,6 +1647,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : 1);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -1645,6 +1666,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -1674,6 +1696,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%
|
||||
if (("UPDATE").equals(dataAction)) {
|
||||
@@ -1697,6 +1720,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("UPDATE").equals(dataAction)) {%>
|
||||
updatedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<% }else if (("DELETE").equals(dataAction)) {%>
|
||||
@@ -1727,6 +1751,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : <%=("INSERT").equals(dataAction)? "1" : "countEach_" +cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -1753,6 +1778,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -1775,9 +1801,12 @@ if(columnList != null && columnList.size() > 0) {
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -188,6 +188,7 @@ int tmp_batchUpdateCount_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
|
||||
@@ -209,6 +209,7 @@ imports="
|
||||
<%
|
||||
}%>
|
||||
+= (tmp_batchUpdateCount_<%=cid%>!=-1?tmp_batchUpdateCount_<%=cid%>:0);
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%> != -1 ? tmp_batchUpdateCount_<%=cid%> : 0;
|
||||
}
|
||||
}
|
||||
<% } %>
|
||||
@@ -226,10 +227,12 @@ imports="
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery))
|
||||
{
|
||||
%>
|
||||
if (commitCounter_<%=cid%> > 0 ) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if (commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -454,7 +454,9 @@ IMetadataColumn talendDynCol = null;
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -596,7 +598,9 @@ IMetadataColumn talendDynCol = null;
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -761,7 +765,9 @@ IMetadataColumn talendDynCol = null;
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -842,7 +848,9 @@ IMetadataColumn talendDynCol = null;
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -980,6 +988,7 @@ IMetadataColumn talendDynCol = null;
|
||||
try {
|
||||
updateFlag_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
|
||||
<%
|
||||
@@ -1028,7 +1037,9 @@ IMetadataColumn talendDynCol = null;
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -1123,7 +1134,9 @@ IMetadataColumn talendDynCol = null;
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1222,6 +1235,7 @@ IMetadataColumn talendDynCol = null;
|
||||
<%
|
||||
}%>
|
||||
+= (tmp_batchUpdateCount_<%=cid%>!=-1?tmp_batchUpdateCount_<%=cid%>:0);
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%> != -1 ? tmp_batchUpdateCount_<%=cid%> : 0;
|
||||
batchSizeCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
@@ -1271,15 +1285,19 @@ IMetadataColumn talendDynCol = null;
|
||||
<%
|
||||
}%>
|
||||
+= (tmp_batchUpdateCount_<%=cid%>!=-1?tmp_batchUpdateCount_<%=cid%>:0);
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%> != -1 ? tmp_batchUpdateCount_<%=cid%> : 0;
|
||||
batchSizeCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
commitCounter_<%=cid%>=0;
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -94,6 +94,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
String dbschema_<%=cid%> = null;
|
||||
String tableName_<%=cid%> = null;
|
||||
|
||||
@@ -376,7 +376,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
|
||||
row2Count<%=cid%>++;
|
||||
}
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
}
|
||||
<% }else {
|
||||
%>
|
||||
@@ -393,6 +395,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
countSum_<%=cid%> += countEach_<%=cid%>;
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
}
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
@@ -419,6 +422,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -475,9 +479,13 @@ if(identityInsert){
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery))
|
||||
{
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
|
||||
@@ -581,7 +581,9 @@ if((cid.equals("talendLogs_DB") || cid.equals("talendStats_DB") || cid.equals("t
|
||||
%>
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -703,7 +705,9 @@ if((cid.equals("talendLogs_DB") || cid.equals("talendStats_DB") || cid.equals("t
|
||||
}
|
||||
%>
|
||||
if(rowCount<%=cid%> == <%=batchSize%>){
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
sInsertColValueList<%=cid%>.clear();
|
||||
rowCount<%=cid%> = 0;
|
||||
counter<%=cid%>=1;
|
||||
@@ -828,7 +832,9 @@ if((cid.equals("talendLogs_DB") || cid.equals("talendStats_DB") || cid.equals("t
|
||||
%>
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -998,7 +1004,9 @@ if((cid.equals("talendLogs_DB") || cid.equals("talendStats_DB") || cid.equals("t
|
||||
}//end issue0010403 date type
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1090,7 +1098,9 @@ if((cid.equals("talendLogs_DB") || cid.equals("talendStats_DB") || cid.equals("t
|
||||
}//end issue0010403 date type
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1237,6 +1247,7 @@ if((cid.equals("talendLogs_DB") || cid.equals("talendStats_DB") || cid.equals("t
|
||||
%>
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
if(isEnableDebug) {
|
||||
@@ -1283,7 +1294,9 @@ if((cid.equals("talendLogs_DB") || cid.equals("talendStats_DB") || cid.equals("t
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -1393,7 +1406,9 @@ if((cid.equals("talendLogs_DB") || cid.equals("talendStats_DB") || cid.equals("t
|
||||
}//end issue0010403 date type
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1512,7 +1527,9 @@ if((cid.equals("talendLogs_DB") || cid.equals("talendStats_DB") || cid.equals("t
|
||||
}//end issue0010403 date type
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1686,14 +1703,17 @@ if((cid.equals("talendLogs_DB") || cid.equals("talendStats_DB") || cid.equals("t
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> = new LimitBytesHelper_<%=cid%>().limitBytePart1(insertedCount_<%=cid%>,pstmt_<%=cid %>);
|
||||
rowsToCommitCount_<%=cid%> = insertedCount_<%=cid%>;
|
||||
<%
|
||||
}else if (("UPDATE").equals(dataAction)) {
|
||||
%>
|
||||
updatedCount_<%=cid%> = new LimitBytesHelper_<%=cid%>().limitBytePart1(updatedCount_<%=cid%>,pstmt_<%=cid %>);
|
||||
rowsToCommitCount_<%=cid%> = updatedCount_<%=cid%>;
|
||||
<%
|
||||
}else if (("DELETE").equals(dataAction)) {
|
||||
%>
|
||||
deletedCount_<%=cid%> = new LimitBytesHelper_<%=cid%>().limitBytePart1(deletedCount_<%=cid%>,pstmt_<%=cid %>);
|
||||
rowsToCommitCount_<%=cid%> = deletedCount_<%=cid%>;
|
||||
<%
|
||||
}%>
|
||||
batchSizeCounter_<%=cid%> = 0;
|
||||
@@ -1701,9 +1721,12 @@ if((cid.equals("talendLogs_DB") || cid.equals("talendStats_DB") || cid.equals("t
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
|
||||
<PARAMETER NAME="DB_VERSION" FIELD="CLOSED_LIST" NUM_ROW="1">
|
||||
<ITEMS DEFAULT="BONITA_523">
|
||||
<ITEM NAME="BONITA_523" VALUE="antlr-2.7.6.jar;asm-1.5.3.jar;asm-3.1.jar;asm-attrs-1.5.3.jar;cglib-nodep-2.1_3.jar;commons-collections-2.1.1.jar;commons-logging-1.0.4.jar;dom4j-2.1.3.jar;ehcache-1.2.3.jar;groovy-all-1.7.0.jar;h2-1.2.132.jar;hibernate-3.2.6.ga.jar;jline-0.9.94.jar;jta-1.1.jar;novaBpmIdentity-1.0.jar;novaBpmPerf-1.0.jar;novaBpmUtil-1.0.jar" />
|
||||
<ITEM NAME="BONITA_531" VALUE="novaBpmIdentity-1.0.jar;novaBpmPerf-1.0.jar;novaBpmUtil-1.0.jar;hibernate-core-3.5.6-Final.jar;commons-collections-3.2.2.jar;ehcache-core-2.2.0.jar;hibernate-commons-annotations-3.2.0.Final.jar;hibernate-search-3.2.1.Final.jar;javassist-3.8.0.GA.jar;lucene-core-2.9.3.jar;slf4j-api-1.6.1.jar;dom4j-2.1.3.jar;h2-1.2.132.jar;jta-1.1.jar;antlr-2.7.6.jar;commons-logging-1.1.1.jar" />
|
||||
<ITEM NAME="BONITA_523" VALUE="antlr-2.7.6.jar;asm-1.5.3.jar;asm-3.1.jar;asm-attrs-1.5.3.jar;cglib-nodep-2.1_3.jar;commons-collections-2.1.1.jar;commons-logging-1.0.4.jar;dom4j-2.1.1.jar;ehcache-1.2.3.jar;groovy-all-1.7.0.jar;h2-1.2.132.jar;hibernate-3.2.6.ga.jar;jline-0.9.94.jar;jta-1.1.jar;novaBpmIdentity-1.0.jar;novaBpmPerf-1.0.jar;novaBpmUtil-1.0.jar" />
|
||||
<ITEM NAME="BONITA_531" VALUE="novaBpmIdentity-1.0.jar;novaBpmPerf-1.0.jar;novaBpmUtil-1.0.jar;hibernate-core-3.5.6-Final.jar;commons-collections-3.2.2.jar;ehcache-core-2.2.0.jar;hibernate-commons-annotations-3.2.0.Final.jar;hibernate-search-3.2.1.Final.jar;javassist-3.8.0.GA.jar;lucene-core-2.9.3.jar;slf4j-api-1.6.1.jar;dom4j-2.1.1.jar;h2-1.2.132.jar;jta-1.1.jar;antlr-2.7.6.jar;commons-logging-1.1.1.jar" />
|
||||
<ITEM NAME="BONITA_561" VALUE="BONITA_561" />
|
||||
<ITEM NAME="BONITA_5101" VALUE="BONITA_5101" />
|
||||
<ITEM NAME="BONITA_652" VALUE="BONITA_652" />
|
||||
@@ -177,7 +177,7 @@
|
||||
<IMPORT NAME="cglib_nodep_213" MODULE="cglib-nodep-2.1_3.jar" MVN="mvn:org.talend.libraries/cglib-nodep-2.1_3/6.0.0" REQUIRED="false" />
|
||||
<IMPORT NAME="commons_collections_211" MODULE="commons-collections-2.1.1.jar" MVN="mvn:org.talend.libraries/commons-collections-2.1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-collections-2.1.1.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="commons_logging_104" MODULE="commons-logging-1.0.4.jar" MVN="mvn:org.talend.libraries/commons-logging-1.0.4/6.0.0" UrlPath="platform:/base/plugins/org.apache.commons.logging_1.0.4.v201101211617.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="dom4j2" MODULE="dom4j-2.1.3.jar" MVN="mvn:org.dom4j/dom4j/2.1.3" REQUIRED_IF="DB_VERSION=='BONITA_561'" BundleID="" />
|
||||
<IMPORT NAME="dom4j_2.1.1" MODULE="dom4j-2.1.1.jar" MVN="mvn:org.dom4j/dom4j/2.1.1" REQUIRED_IF="DB_VERSION=='BONITA_561'" BundleID="" />
|
||||
<IMPORT NAME="ehcache_123" MODULE="ehcache-1.2.3.jar" MVN="mvn:org.talend.libraries/ehcache-1.2.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.ehcache/lib/ehcache-1.2.3.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="groovy_all_170" MODULE="groovy-all-1.7.0.jar" MVN="mvn:org.talend.libraries/groovy-all-1.7.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.groovy/lib/groovy-all-1.7.0.jar" REQUIRED="false" />
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
|
||||
<PARAMETER NAME="DB_VERSION" FIELD="CLOSED_LIST" NUM_ROW="2">
|
||||
<ITEMS DEFAULT="BONITA_523">
|
||||
<ITEM NAME="BONITA_523" VALUE="antlr-2.7.6.jar;asm-1.5.3.jar;asm-3.1.jar;asm-attrs-1.5.3.jar;cglib-nodep-2.1_3.jar;commons-collections-2.1.1.jar;commons-logging-1.0.4.jar;dom4j-2.1.3.jar;ehcache-1.2.3.jar;groovy-all-1.7.0.jar;h2-1.2.132.jar;hibernate-3.2.6.ga.jar;jline-0.9.94.jar;jta-1.1.jar;novaBpmIdentity-1.0.jar;novaBpmPerf-1.0.jar;novaBpmUtil-1.0.jar" />
|
||||
<ITEM NAME="BONITA_531" VALUE="novaBpmIdentity-1.0.jar;novaBpmPerf-1.0.jar;novaBpmUtil-1.0.jar;hibernate-core-3.5.6-Final.jar;commons-collections-3.2.2.jar;ehcache-core-2.2.0.jar;hibernate-commons-annotations-3.2.0.Final.jar;hibernate-search-3.2.1.Final.jar;javassist-3.8.0.GA.jar;lucene-core-2.9.3.jar;slf4j-api-1.6.1.jar;dom4j-2.1.3.jar;h2-1.2.132.jar;jta-1.1.jar;antlr-2.7.6.jar;commons-logging-1.1.1.jar" />
|
||||
<ITEM NAME="BONITA_523" VALUE="antlr-2.7.6.jar;asm-1.5.3.jar;asm-3.1.jar;asm-attrs-1.5.3.jar;cglib-nodep-2.1_3.jar;commons-collections-2.1.1.jar;commons-logging-1.0.4.jar;dom4j-2.1.1.jar;ehcache-1.2.3.jar;groovy-all-1.7.0.jar;h2-1.2.132.jar;hibernate-3.2.6.ga.jar;jline-0.9.94.jar;jta-1.1.jar;novaBpmIdentity-1.0.jar;novaBpmPerf-1.0.jar;novaBpmUtil-1.0.jar" />
|
||||
<ITEM NAME="BONITA_531" VALUE="novaBpmIdentity-1.0.jar;novaBpmPerf-1.0.jar;novaBpmUtil-1.0.jar;hibernate-core-3.5.6-Final.jar;commons-collections-3.2.2.jar;ehcache-core-2.2.0.jar;hibernate-commons-annotations-3.2.0.Final.jar;hibernate-search-3.2.1.Final.jar;javassist-3.8.0.GA.jar;lucene-core-2.9.3.jar;slf4j-api-1.6.1.jar;dom4j-2.1.1.jar;h2-1.2.132.jar;jta-1.1.jar;antlr-2.7.6.jar;commons-logging-1.1.1.jar" />
|
||||
<ITEM NAME="BONITA_561" VALUE="BONITA_561" />
|
||||
<ITEM NAME="BONITA_5101" VALUE="BONITA_5101" />
|
||||
<ITEM NAME="BONITA_652" VALUE="BONITA_652" />
|
||||
@@ -226,7 +226,7 @@
|
||||
<IMPORT NAME="cglib_nodep_213" MODULE="cglib-nodep-2.1_3.jar" MVN="mvn:org.talend.libraries/cglib-nodep-2.1_3/6.0.0" REQUIRED="false" />
|
||||
<IMPORT NAME="commons_collections_211" MODULE="commons-collections-2.1.1.jar" MVN="mvn:org.talend.libraries/commons-collections-2.1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-collections-2.1.1.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="commons_logging_104" MODULE="commons-logging-1.0.4.jar" MVN="mvn:org.talend.libraries/commons-logging-1.0.4/6.0.0" UrlPath="platform:/base/plugins/org.apache.commons.logging_1.0.4.v201101211617.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="dom4j2" MODULE="dom4j-2.1.3.jar" MVN="mvn:org.dom4j/dom4j/2.1.3" REQUIRED_IF="(CLIENT_MODE=='JAVA_CLIENT') AND (DB_VERSION=='BONITA_561')" BundleID="" />
|
||||
<IMPORT NAME="dom4j_2.1.1" MODULE="dom4j-2.1.1.jar" MVN="mvn:org.dom4j/dom4j/2.1.1" REQUIRED_IF="(CLIENT_MODE=='JAVA_CLIENT') AND (DB_VERSION=='BONITA_561')" BundleID="" />
|
||||
<IMPORT NAME="ehcache_123" MODULE="ehcache-1.2.3.jar" MVN="mvn:org.talend.libraries/ehcache-1.2.3/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.ehcache/lib/ehcache-1.2.3.jar" REQUIRED="false" />
|
||||
<IMPORT NAME="groovy_all_170" MODULE="groovy-all-1.7.0.jar" MVN="mvn:org.talend.libraries/groovy-all-1.7.0/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.groovy/lib/groovy-all-1.7.0.jar" REQUIRED="false" />
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%> = 0;
|
||||
int updatedCount_<%=cid%> = 0;
|
||||
int insertedCount_<%=cid%> = 0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%> = 0;
|
||||
<%
|
||||
getManager(dbmsId, cid, node);
|
||||
|
||||
@@ -93,6 +93,7 @@ imports="
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
}
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
@@ -139,6 +140,7 @@ imports="
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -171,10 +173,12 @@ imports="
|
||||
if(!useExistingConnection) {
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery)) {
|
||||
%>
|
||||
if (commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if (commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -348,7 +348,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -505,7 +507,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -680,7 +684,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -779,7 +785,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -932,6 +940,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
if(isEnableDebug) {
|
||||
@@ -987,7 +996,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -1093,7 +1104,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1194,6 +1207,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -1240,6 +1254,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -1281,6 +1296,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -1326,6 +1342,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -1346,9 +1363,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="commons-lang" MODULE="commons-lang-2.6.jar" MVN="mvn:commons-lang/commons-lang/2.6" UrlPath="platform:/base/plugins/org.apache.commons.lang_2.6.0.v201404270220.jar"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="dom4j" MODULE="dom4j-2.1.3.jar" MVN="mvn:org.dom4j/dom4j/2.1.3" BundleID="org.apache.servicemix.bundles.dom4j" REQUIRED="true" />
|
||||
<IMPORT NAME="dom4j" MODULE="dom4j-2.1.1.jar" MVN="mvn:org.dom4j/dom4j/2.1.1" BundleID="org.apache.servicemix.bundles.dom4j" REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
<RETURNS/>
|
||||
|
||||
@@ -153,6 +153,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
|
||||
@@ -96,6 +96,7 @@ imports="
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> != java.sql.Statement.EXECUTE_FAILED ? 1 : 0);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
}
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
@@ -141,6 +142,7 @@ imports="
|
||||
for(int countEach_<%=cid%> : bue_<%=cid%>.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> != java.sql.Statement.EXECUTE_FAILED ? 1 : 0);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -177,9 +179,13 @@ imports="
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery))
|
||||
{
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
|
||||
@@ -323,7 +323,9 @@ skeleton="@{org.talend.designer.components.localprovider}/components/templates/d
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -461,7 +463,9 @@ skeleton="@{org.talend.designer.components.localprovider}/components/templates/d
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -611,7 +615,9 @@ skeleton="@{org.talend.designer.components.localprovider}/components/templates/d
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -689,7 +695,9 @@ skeleton="@{org.talend.designer.components.localprovider}/components/templates/d
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -819,6 +827,7 @@ skeleton="@{org.talend.designer.components.localprovider}/components/templates/d
|
||||
try {
|
||||
updateFlag_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
if(isEnableDebug) {
|
||||
@@ -862,7 +871,9 @@ skeleton="@{org.talend.designer.components.localprovider}/components/templates/d
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -958,7 +969,9 @@ skeleton="@{org.talend.designer.components.localprovider}/components/templates/d
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1036,6 +1049,7 @@ skeleton="@{org.talend.designer.components.localprovider}/components/templates/d
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> != java.sql.Statement.EXECUTE_FAILED ? 1 : 0);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -1081,6 +1095,7 @@ skeleton="@{org.talend.designer.components.localprovider}/components/templates/d
|
||||
for(int countEach_<%=cid%>: bue_<%=cid%>.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> != java.sql.Statement.EXECUTE_FAILED ? 1 : 0);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -1120,6 +1135,7 @@ skeleton="@{org.talend.designer.components.localprovider}/components/templates/d
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> != java.sql.Statement.EXECUTE_FAILED ? 1 : 0);
|
||||
}
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -1164,6 +1180,7 @@ skeleton="@{org.talend.designer.components.localprovider}/components/templates/d
|
||||
for(int countEach_<%=cid%>: bue_<%=cid%>.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> != java.sql.Statement.EXECUTE_FAILED ? 1 : 0);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -1187,9 +1204,12 @@ skeleton="@{org.talend.designer.components.localprovider}/components/templates/d
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java_DOM4J2" MODULE="dom4j-2.1.3.jar" MVN="mvn:org.dom4j/dom4j/2.1.3" REQUIRED_IF="READ_BY == 'XPATH'" BundleID="" />
|
||||
<IMPORT NAME="Java_DOM4J_2.1.1" MODULE="dom4j-2.1.1.jar" MVN="mvn:org.dom4j/dom4j/2.1.1" REQUIRED_IF="READ_BY == 'XPATH'" BundleID="" />
|
||||
<IMPORT NAME="Java_JAXEN_1.1.6" MODULE="jaxen-1.1.6.jar" MVN="mvn:jaxen/jaxen/1.1.6" REQUIRED_IF="READ_BY == 'XPATH'" BundleID="" />
|
||||
<IMPORT NAME="json-lib" MODULE="json-lib-2.4.5-talend.jar" MVN="mvn:net.sf.json-lib/json-lib/2.4.5-talend" REQUIRED_IF="READ_BY == 'XPATH'" />
|
||||
<IMPORT NAME="commons_lang" MODULE="commons-lang-2.6.jar" MVN="mvn:commons-lang/commons-lang/2.6" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-lang-2.6.jar" REQUIRED_IF="READ_BY == 'XPATH'" />
|
||||
|
||||
@@ -157,9 +157,9 @@
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT
|
||||
NAME="Java_DOM4J2"
|
||||
MODULE="dom4j-2.1.3.jar"
|
||||
MVN="mvn:org.dom4j/dom4j/2.1.3"
|
||||
NAME="Java_DOM4J_2.1.1"
|
||||
MODULE="dom4j-2.1.1.jar"
|
||||
MVN="mvn:org.dom4j/dom4j/2.1.1"
|
||||
REQUIRED="true"
|
||||
BundleID=""
|
||||
/>
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java_Excel" MODULE="jxl.jar" MVN="mvn:org.talend.libraries/jxl/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jexcel/lib/jxl.jar" REQUIRED_IF="(VERSION_2007 == 'false')" />
|
||||
|
||||
<IMPORT NAME="Java_DOM4J2" MODULE="dom4j-2.1.3.jar" MVN="mvn:org.dom4j/dom4j/2.1.3" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />
|
||||
<IMPORT NAME="dom4j" MODULE="dom4j-2.1.1.jar" MVN="mvn:org.dom4j/dom4j/2.1.1" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />
|
||||
<IMPORT NAME="geronimo-stax-api" MODULE="geronimo-stax-api_1.0_spec-1.0.1.jar" MVN="mvn:org.talend.libraries/geronimo-stax-api_1.0_spec-1.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/geronimo-stax-api_1.0_spec-1.0.1.jar" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />
|
||||
<IMPORT NAME="log4j" MODULE="log4j-1.2.17.jar" MVN="mvn:log4j/log4j/1.2.17" UrlPath="platform:/plugin/org.talend.libraries.apache/lib/log4j-1.2.17.jar" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />
|
||||
<IMPORT NAME="poi" MODULE="poi-4.1.0-20190523141255_modified_talend.jar" MVN="mvn:org.apache.poi/poi/4.1.0-20190523141255_modified_talend" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/poi-4.1.0-20190523141255_modified_talend.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
REQUIRED_IF="(READ_BY == 'JSONPATH_WITHOUTPUT_LOOP')" />
|
||||
|
||||
<!-- xpath -->
|
||||
<IMPORT NAME="Java_DOM4J2" MODULE="dom4j-2.1.3.jar" MVN="mvn:org.dom4j/dom4j/2.1.3" REQUIRED_IF="(READ_BY == 'XPATH')" BundleID="" />
|
||||
<IMPORT NAME="Java_DOM4J_2.1.1" MODULE="dom4j-2.1.1.jar" MVN="mvn:org.dom4j/dom4j/2.1.1" REQUIRED_IF="(READ_BY == 'XPATH')" BundleID="" />
|
||||
<IMPORT NAME="Java_JAXEN_1.1.6" MODULE="jaxen-1.1.6.jar" MVN="mvn:jaxen/jaxen/1.1.6" REQUIRED_IF="(READ_BY == 'XPATH')" BundleID="" />
|
||||
<IMPORT NAME="json-lib" MODULE="json-lib-2.4.5-talend.jar" MVN="mvn:net.sf.json-lib/json-lib/2.4.5-talend" REQUIRED_IF="(READ_BY == 'XPATH')" />
|
||||
<IMPORT NAME="commons_lang" MODULE="commons-lang-2.6.jar" MVN="mvn:commons-lang/commons-lang/2.6" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-lang-2.6.jar"
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java_DOM4J2" MODULE="dom4j-2.1.3.jar" MVN="mvn:org.dom4j/dom4j/2.1.3" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java_DOM4J_2.1.1" MODULE="dom4j-2.1.1.jar" MVN="mvn:org.dom4j/dom4j/2.1.1" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java_JAXEN_1.1.6" MODULE="jaxen-1.1.6.jar" MVN="mvn:jaxen/jaxen/1.1.6" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java_talendSAX" MODULE="TalendSAX-1.0.1-20190326.jar" MVN="mvn:org.talend.libraries/TalendSAX/1.0.1-20190326" UrlPath="platform:/plugin/org.talend.libraries.xml/lib/TalendSAX-1.0.1-20190326.jar"
|
||||
REQUIRED="true" />
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java_DOM4J2" MODULE="dom4j-2.1.3.jar" MVN="mvn:org.dom4j/dom4j/2.1.3" BundleID="org.apache.servicemix.bundles.dom4j" REQUIRED_IF="GENERATION_MODE == 'DOM4J'" />
|
||||
<IMPORT NAME="Java_DOM4J_2.1.1" MODULE="dom4j-2.1.1.jar" MVN="mvn:org.dom4j/dom4j/2.1.1" BundleID="org.apache.servicemix.bundles.dom4j" REQUIRED_IF="GENERATION_MODE == 'DOM4J'" />
|
||||
<IMPORT NAME="Java_JAXEN_1.1.6" MODULE="jaxen-1.1.6.jar" MVN="mvn:jaxen/jaxen/1.1.6" BundleID="org.apache.servicemix.bundles.jaxen" REQUIRED_IF="GENERATION_MODE == 'DOM4J'" />
|
||||
<IMPORT NAME="Java_xercesImpl" MODULE="xercesImpl.jar" MVN="mvn:org.talend.libraries/xercesImpl/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.xml/lib/xercesImpl.jar"
|
||||
REQUIRED_IF="(GENERATION_MODE == 'XERCES') OR (GENERATION_MODE == 'SAX')" BundleID="" />
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
<IMPORT NAME="Java_Excel" MODULE="jxl.jar" MVN="mvn:org.talend.libraries/jxl/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.jexcel/lib/jxl.jar" REQUIRED_IF="(VERSION_2007 == 'false')" />
|
||||
<IMPORT NAME="TALEND_EXCEL" MODULE="talendExcel-1.5-20190731.jar" MVN="mvn:org.talend.libraries/talendExcel-1.5-20190731/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/talendExcel-1.5-20190731.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
|
||||
<IMPORT NAME="commons-lang3" MODULE="commons-lang3-3.8.1.jar" MVN="mvn:org.apache.commons/commons-lang3/3.8.1" REQUIRED_IF="(VERSION_2007 == 'true')" />
|
||||
<IMPORT NAME="Java_DOM4J2" MODULE="dom4j-2.1.3.jar" MVN="mvn:org.dom4j/dom4j/2.1.3" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />
|
||||
<IMPORT NAME="dom4j" MODULE="dom4j-2.1.1.jar" MVN="mvn:org.dom4j/dom4j/2.1.1" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />
|
||||
<IMPORT NAME="geronimo-stax-api" MODULE="geronimo-stax-api_1.0_spec-1.0.1.jar" MVN="mvn:org.talend.libraries/geronimo-stax-api_1.0_spec-1.0.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/geronimo-stax-api_1.0_spec-1.0.1.jar" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />
|
||||
<IMPORT NAME="log4j" MODULE="log4j-1.2.17.jar" MVN="mvn:log4j/log4j/1.2.17" UrlPath="platform:/plugin/org.talend.libraries.apache/lib/log4j-1.2.17.jar" REQUIRED_IF="(VERSION_2007 == 'true')" BundleID="" />
|
||||
<IMPORT NAME="poi" MODULE="poi-4.1.0-20190523141255_modified_talend.jar" MVN="mvn:org.apache.poi/poi/4.1.0-20190523141255_modified_talend" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/poi-4.1.0-20190523141255_modified_talend.jar" REQUIRED_IF="(VERSION_2007 == 'true')" />
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java_DOM4J2" MODULE="dom4j-2.1.3.jar" MVN="mvn:org.dom4j/dom4j/2.1.3" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java_DOM4J_2.1.1" MODULE="dom4j-2.1.1.jar" MVN="mvn:org.dom4j/dom4j/2.1.1" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java_JAXEN_1.1.6" MODULE="jaxen-1.1.6.jar" MVN="mvn:jaxen/jaxen/1.1.6" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java_xmlUtil" MODULE="xmlUtil.jar" MVN="mvn:org.talend.libraries/xmlUtil/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.xml/lib/xmlUtil.jar"
|
||||
REQUIRED="true" />
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java_DOM4J2" MODULE="dom4j-2.1.3.jar" MVN="mvn:org.dom4j/dom4j/2.1.3" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="dom4j-2.1.1" MODULE="dom4j-2.1.1.jar" MVN="mvn:org.dom4j/dom4j/2.1.1" REQUIRED="true" BundleID="" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
String tableName_<%=cid%> = <%=tableName%>;
|
||||
|
||||
@@ -94,6 +94,7 @@ imports="
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
}catch (java.sql.BatchUpdateException e){
|
||||
<%
|
||||
if(("true").equals(dieOnError)) {
|
||||
@@ -118,6 +119,7 @@ imports="
|
||||
|
||||
}
|
||||
tmp_batchUpdateCount_<%=cid%> = tmp_batchUpdateCount_<%=cid%> > countSum_<%=cid%> ? tmp_batchUpdateCount_<%=cid%> : countSum_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
@@ -152,10 +154,12 @@ imports="
|
||||
<%
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery)) {
|
||||
%>
|
||||
if (commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if (commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -161,7 +161,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -266,7 +268,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -388,7 +392,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -450,7 +456,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -549,6 +557,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
@@ -579,7 +588,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -675,7 +686,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -777,6 +790,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
System.err.println(e.getMessage());
|
||||
}
|
||||
tmp_batchUpdateCount_<%=cid%> = tmp_batchUpdateCount_<%=cid%> > countSum_<%=cid%> ? tmp_batchUpdateCount_<%=cid%> : countSum_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
@@ -810,6 +824,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -837,6 +852,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -858,10 +874,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
<%
|
||||
}%>
|
||||
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -155,6 +155,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
|
||||
@@ -118,6 +118,7 @@ imports="
|
||||
|
||||
}
|
||||
tmp_batchUpdateCount_<%=cid%> = tmp_batchUpdateCount_<%=cid%> > countSum_<%=cid%> ? tmp_batchUpdateCount_<%=cid%> : countSum_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
@@ -151,10 +152,12 @@ imports="
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery))
|
||||
{
|
||||
%>
|
||||
if (commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
if (commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -139,7 +139,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}else{
|
||||
%>
|
||||
try {
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -226,7 +228,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}else{
|
||||
%>
|
||||
try {
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -334,7 +338,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
try {
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -385,7 +391,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
try {
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -469,6 +477,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
int counter = 1;
|
||||
@@ -482,7 +491,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
}
|
||||
%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -562,7 +573,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}else{
|
||||
%>
|
||||
try {
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -662,6 +675,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
System.err.println(e.getMessage());
|
||||
}
|
||||
tmp_batchUpdateCount_<%=cid%> = tmp_batchUpdateCount_<%=cid%> > countSum_<%=cid%> ? tmp_batchUpdateCount_<%=cid%> : countSum_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
@@ -695,6 +709,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -722,6 +737,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -744,9 +760,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
}%>
|
||||
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -105,6 +105,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
String tableName_<%=cid%> = <%=tableName%>;
|
||||
|
||||
@@ -21,10 +21,12 @@ imports="
|
||||
|
||||
if(!("").equals(commitEvery)&&!("0").equals(commitEvery)){
|
||||
%>
|
||||
if (commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if (commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -126,7 +126,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -200,7 +202,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -292,7 +296,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -354,7 +360,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -436,6 +444,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
if(isEnableDebug) {
|
||||
@@ -465,7 +474,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -532,7 +543,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -601,9 +614,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
commitCounter_<%=cid%>++;
|
||||
|
||||
if(commitEvery_<%=cid%> <= commitCounter_<%=cid%>) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
|
||||
}
|
||||
|
||||
@@ -102,6 +102,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
String dbschema_<%=cid%> = null;
|
||||
|
||||
@@ -24,7 +24,7 @@ imports="
|
||||
|
||||
boolean setAutoCommit = false;
|
||||
|
||||
boolean useExistingConnection = "true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
boolean useExistingConnection = "true".equals(ElementParameterParser.getValue(node, "__USE_EXISTING_CONNECTION__"));
|
||||
String useBatchAndUseConn = ElementParameterParser.getValue(node,"__USE_BATCH_AND_USE_CONN__");
|
||||
|
||||
String dieOnError = ElementParameterParser.getValue(node, "__DIE_ON_ERROR__");
|
||||
@@ -103,6 +103,7 @@ imports="
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%
|
||||
if (("INSERT").equals(dataAction)) {
|
||||
@@ -148,9 +149,13 @@ imports="
|
||||
<%
|
||||
if(!useExistingConnection && useTransaction && !("").equals(commitEvery)&&!("0").equals(commitEvery)){
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
if (!useExistingConnection) {
|
||||
|
||||
@@ -341,7 +341,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -479,7 +481,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -628,7 +632,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -704,7 +710,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -833,6 +841,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
if(isEnableDebug) {
|
||||
@@ -876,7 +885,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -975,7 +986,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1050,6 +1063,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%
|
||||
if (("INSERT").equals(dataAction)) {
|
||||
@@ -1087,10 +1101,13 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
commitCounter_<%=cid%>++;
|
||||
|
||||
if(commitEvery_<%=cid%><=commitCounter_<%=cid%>) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(commitEvery_<%=cid%> <= commitCounter_<%=cid%>) {
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%> = 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%> = 0;
|
||||
|
||||
String tableName_<%=cid%> = <%=tableName%>;
|
||||
|
||||
@@ -131,6 +131,7 @@ imports="
|
||||
|
||||
}
|
||||
tmp_batchUpdateCount_<%=cid%> = tmp_batchUpdateCount_<%=cid%> > countSum_<%=cid%> ? tmp_batchUpdateCount_<%=cid%> : countSum_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
@@ -150,10 +151,12 @@ imports="
|
||||
if(!useExistingConnection) {
|
||||
if(!("").equals(commitEvery)&&!("0").equals(commitEvery)){
|
||||
%>
|
||||
if (commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if (commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -158,7 +158,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -262,7 +264,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -382,7 +386,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -444,7 +450,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -543,6 +551,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
if(isEnableDebug) {
|
||||
@@ -572,7 +581,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -667,7 +678,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -767,6 +780,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
System.err.println(e.getMessage());
|
||||
}
|
||||
tmp_batchUpdateCount_<%=cid%> = tmp_batchUpdateCount_<%=cid%> > countSum_<%=cid%> ? tmp_batchUpdateCount_<%=cid%> : countSum_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
@@ -800,6 +814,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -827,6 +842,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -848,10 +864,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
<%
|
||||
}%>
|
||||
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -78,6 +78,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
String tableName_<%=cid%> = <%=tableName%>;
|
||||
|
||||
@@ -116,6 +116,7 @@ imports="
|
||||
|
||||
}
|
||||
tmp_batchUpdateCount_<%=cid%> = tmp_batchUpdateCount_<%=cid%> > countSum_<%=cid%> ? tmp_batchUpdateCount_<%=cid%> : countSum_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
@@ -147,10 +148,12 @@ imports="
|
||||
if(!useExistingConnection){
|
||||
if(!("").equals(commitEvery)&&!("0").equals(commitEvery)){
|
||||
%>
|
||||
if (commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if (commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -153,7 +153,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -254,7 +256,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -373,7 +377,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -435,7 +441,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -532,6 +540,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
if(isEnableDebug) {
|
||||
@@ -561,7 +570,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -652,7 +663,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -753,6 +766,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
System.err.println(e.getMessage());
|
||||
}
|
||||
tmp_batchUpdateCount_<%=cid%> = tmp_batchUpdateCount_<%=cid%> > countSum_<%=cid%> ? tmp_batchUpdateCount_<%=cid%> : countSum_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
@@ -787,6 +801,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
pstmt_<%= cid %>.clearBatch();
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -814,6 +829,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -835,10 +851,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
<%
|
||||
}%>
|
||||
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -174,7 +174,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
String tableName_<%=cid%> = <%=tableName%>;
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
|
||||
|
||||
@@ -24,10 +24,12 @@ imports="
|
||||
String connectionFlag = ElementParameterParser.getValue(node, "__CONNECTION_FLAG__");
|
||||
if(!("").equals(commitEvery)&&!("0").equals(commitEvery)){
|
||||
%>
|
||||
if (commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if (commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -126,7 +126,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -200,7 +202,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -292,7 +296,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -354,7 +360,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -442,6 +450,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
}
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
<%
|
||||
@@ -503,7 +512,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -566,7 +577,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -635,9 +648,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
commitCounter_<%=cid%>++;
|
||||
|
||||
if(commitEvery_<%=cid%> <= commitCounter_<%=cid%>) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
|
||||
}
|
||||
|
||||
@@ -94,6 +94,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
String dbschema_<%=cid%> = null;
|
||||
String tableName_<%=cid%> = null;
|
||||
|
||||
@@ -98,7 +98,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
isSpecifyIdentityKey = false;
|
||||
}
|
||||
String identityKey = ElementParameterParser.getValue(node, "__IDENTITY_FIELD__");
|
||||
if(identityInsert && useExistingConnection ) {
|
||||
if(identityInsert && useExistingConnection) {
|
||||
%>
|
||||
if ( isShareIdentity_<%=cid%> ) {
|
||||
String setIdentityInsertONSQL_<%=cid%> = "SET IDENTITY_INSERT ["+ tableName_<%=cid%> +"] ON";
|
||||
@@ -379,7 +379,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
|
||||
row2Count<%=cid%>++;
|
||||
}
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
}
|
||||
<% }else {
|
||||
%>
|
||||
@@ -396,6 +398,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
countSum_<%=cid%> += countEach_<%=cid%>;
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
}
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
@@ -422,6 +425,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -478,9 +482,13 @@ if(identityInsert){
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery))
|
||||
{
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
|
||||
@@ -604,7 +604,9 @@ if(incomingConnName != null && columnList != null){
|
||||
%>
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -726,7 +728,9 @@ if(incomingConnName != null && columnList != null){
|
||||
}
|
||||
%>
|
||||
if(rowCount<%=cid%> == <%=batchSize%>){
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
sInsertColValueList<%=cid%>.clear();
|
||||
rowCount<%=cid%> = 0;
|
||||
counter<%=cid%>=1;
|
||||
@@ -851,8 +855,10 @@ if(incomingConnName != null && columnList != null){
|
||||
%>
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
<%
|
||||
@@ -1021,7 +1027,9 @@ if(incomingConnName != null && columnList != null){
|
||||
}//end issue0010403 date type
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1113,7 +1121,9 @@ if(incomingConnName != null && columnList != null){
|
||||
}//end issue0010403 date type
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1260,6 +1270,7 @@ if(incomingConnName != null && columnList != null){
|
||||
%>
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
if(isEnableDebug) {
|
||||
@@ -1305,12 +1316,13 @@ if(incomingConnName != null && columnList != null){
|
||||
<%
|
||||
}
|
||||
%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
nb_line_<%=cid%>++;
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
nb_line_<%=cid%>++;
|
||||
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
}
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1417,7 +1429,9 @@ if(incomingConnName != null && columnList != null){
|
||||
}//end issue0010403 date type
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1536,7 +1550,9 @@ if(incomingConnName != null && columnList != null){
|
||||
}//end issue0010403 date type
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1679,14 +1695,17 @@ if(incomingConnName != null && columnList != null){
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> = new LimitBytesHelper_<%=cid%>().limitBytePart1(insertedCount_<%=cid%>,pstmt_<%=cid %>);
|
||||
rowsToCommitCount_<%=cid%> = insertedCount_<%=cid%>;
|
||||
<%
|
||||
}else if (("UPDATE").equals(dataAction)) {
|
||||
%>
|
||||
updatedCount_<%=cid%> = new LimitBytesHelper_<%=cid%>().limitBytePart1(updatedCount_<%=cid%>,pstmt_<%=cid %>);
|
||||
rowsToCommitCount_<%=cid%> = updatedCount_<%=cid%>;
|
||||
<%
|
||||
}else if (("DELETE").equals(dataAction)) {
|
||||
%>
|
||||
deletedCount_<%=cid%> = new LimitBytesHelper_<%=cid%>().limitBytePart1(deletedCount_<%=cid%>,pstmt_<%=cid %>);
|
||||
rowsToCommitCount_<%=cid%> = deletedCount_<%=cid%>;
|
||||
<%
|
||||
}%>
|
||||
|
||||
@@ -1725,10 +1744,13 @@ if(incomingConnName != null && columnList != null){
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
commitCounter_<%=cid%>=0;
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
|
||||
String tableName_<%=cid%> = <%=tableName%>;
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
|
||||
@@ -21,10 +21,12 @@ imports="
|
||||
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery)) {
|
||||
%>
|
||||
if (commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if (commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -131,7 +131,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -218,7 +220,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -334,7 +338,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -393,7 +399,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -487,6 +495,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
updateFlag_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
<%
|
||||
@@ -546,7 +555,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -625,7 +636,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -690,14 +703,14 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
commitCounter_<%=cid%>++;
|
||||
|
||||
if(commitEvery_<%=cid%> <= commitCounter_<%=cid%>) {
|
||||
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
|
||||
}
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27755,9 +27755,9 @@
|
||||
MVN="mvn:org.apache.santuario/xmlsec/2.1.2"
|
||||
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
|
||||
<IMPORT
|
||||
NAME="Java_DOM4J2"
|
||||
MODULE="dom4j-2.1.3.jar"
|
||||
MVN="mvn:org.dom4j/dom4j/2.1.3"
|
||||
NAME="dom4j-2.1.1"
|
||||
MODULE="dom4j-2.1.1.jar"
|
||||
MVN="mvn:org.dom4j/dom4j/2.1.1"
|
||||
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')"
|
||||
BundleID="" />
|
||||
<IMPORT
|
||||
|
||||
@@ -38518,9 +38518,9 @@
|
||||
MVN="mvn:org.apache.santuario/xmlsec/2.1.2"
|
||||
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')" />
|
||||
<IMPORT
|
||||
NAME="Java_DOM4J2"
|
||||
MODULE="dom4j-2.1.3.jar"
|
||||
MVN="mvn:org.dom4j/dom4j/2.1.3"
|
||||
NAME="dom4j-2.1.1"
|
||||
MODULE="dom4j-2.1.1.jar"
|
||||
MVN="mvn:org.dom4j/dom4j/2.1.1"
|
||||
REQUIRED_IF="(AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2015')"
|
||||
BundleID="" />
|
||||
<IMPORT
|
||||
|
||||
@@ -147,7 +147,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
String tableName_<%=cid%> = <%=table%>;
|
||||
|
||||
@@ -362,7 +362,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
}
|
||||
try{
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
}catch(java.lang.Exception e){
|
||||
<% if(onErrDie){%>
|
||||
throw e;
|
||||
@@ -387,6 +389,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> == java.sql.Statement.EXECUTE_FAILED ? 0 : 1);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -407,6 +410,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -465,6 +469,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("UPDATE").equals(dataAction)) {
|
||||
%>
|
||||
@@ -487,6 +492,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("UPDATE").equals(dataAction)) {
|
||||
%>
|
||||
updatedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -528,10 +534,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery))
|
||||
{
|
||||
%>
|
||||
if (commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if (commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -723,7 +723,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
%>
|
||||
if(rowCount<%=cid%> == <%=numPerInsert%>){
|
||||
try{
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
}catch(java.lang.Exception e){
|
||||
<% if(onErrDie){%>
|
||||
throw e;
|
||||
@@ -795,7 +797,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -873,7 +877,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -1001,7 +1007,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
%>
|
||||
pstmt_<%=cid %>.addBatch();
|
||||
nb_line_<%=cid%>++;
|
||||
|
||||
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
<%dbLog.data().addingToBatch(dbLog.var("nb_line"), dbLog.str(dataAction));%>
|
||||
<%
|
||||
@@ -1017,7 +1023,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -1175,7 +1183,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1247,7 +1257,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1379,6 +1391,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
try {
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
|
||||
@@ -1421,7 +1434,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -1526,7 +1541,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1600,7 +1617,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
int replaceCount_<%=cid%> = 0;
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
replaceCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
replaceCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().replacing(null);%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -1690,7 +1709,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
int count_on_duplicate_key_<%=cid%> = 0;
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
count_on_duplicate_key_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
count_on_duplicate_key_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().insertingOnDuplicateKeyUpdating(null);%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -1761,7 +1782,9 @@ if(columnList != null && columnList.size() > 0) {
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().insertingIgnore(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -1833,6 +1856,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> == java.sql.Statement.EXECUTE_FAILED ? 0 : 1);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -1851,6 +1875,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -1883,6 +1908,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%
|
||||
if (("UPDATE").equals(dataAction)) {
|
||||
@@ -1906,6 +1932,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("UPDATE").equals(dataAction)) {%>
|
||||
updatedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<% }else if (("DELETE").equals(dataAction)) {%>
|
||||
@@ -1942,6 +1969,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : <%=("INSERT").equals(dataAction)? "1" : "countEach_" +cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -1967,6 +1995,7 @@ if(columnList != null && columnList.size() > 0) {
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -1988,9 +2017,12 @@ if(columnList != null && columnList.size() > 0) {
|
||||
}
|
||||
<%
|
||||
}%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
|
||||
}
|
||||
|
||||
@@ -107,6 +107,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
String tableName_<%=cid%> = <%=tableName%>;
|
||||
|
||||
@@ -96,6 +96,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
pstmt_<%=cid %>.executeBatch();
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
pstmt_<%=cid %>.clearBatch();
|
||||
rowsToCommitCount_<%=cid%> += pstmt_<%=cid %>.getUpdateCount();
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> +=pstmt_<%=cid %>.getUpdateCount();
|
||||
@@ -150,10 +151,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery))
|
||||
{
|
||||
%>
|
||||
if(commitCounter_<%=cid%> > 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if(commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -142,7 +142,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%}else{%>
|
||||
try{
|
||||
nb_line_<%=cid%>++;
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}catch(java.lang.Exception e)
|
||||
{
|
||||
@@ -230,7 +232,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try{
|
||||
nb_line_<%=cid%>++;
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
}catch(java.lang.Exception e)
|
||||
{
|
||||
@@ -340,7 +344,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
try{
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
}catch(java.lang.Exception e)
|
||||
@@ -394,7 +400,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
try{
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}catch(java.lang.Exception e)
|
||||
@@ -477,7 +485,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try{
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
int counter = 1;
|
||||
@@ -492,7 +500,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
}
|
||||
%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -575,7 +585,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}else {
|
||||
%>
|
||||
try{
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
}catch(java.lang.Exception e)
|
||||
@@ -651,6 +663,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
pstmt_<%=cid %>.executeBatch();
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
pstmt_<%=cid %>.clearBatch();
|
||||
rowsToCommitCount_<%=cid%> += pstmt_<%=cid %>.getUpdateCount();
|
||||
<%
|
||||
if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -711,7 +724,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
pstmt_<%=cid %>.executeBatch();
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
pstmt_<%=cid %>.clearBatch();
|
||||
|
||||
rowsToCommitCount_<%=cid%> += pstmt_<%=cid %>.getUpdateCount();
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += pstmt_<%=cid %>.getUpdateCount();
|
||||
@@ -752,9 +765,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
<%
|
||||
}%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
|
||||
}
|
||||
|
||||
@@ -10604,7 +10604,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java_DOM4J2" MODULE="dom4j-2.1.3.jar" MVN="mvn:org.dom4j/dom4j/2.1.3" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java_DOM4J_2.1.1" MODULE="dom4j-2.1.1.jar" MVN="mvn:org.dom4j/dom4j/2.1.1" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java_JAXEN_1.1.6" MODULE="jaxen-1.1.6.jar" MVN="mvn:jaxen/jaxen/1.1.6" REQUIRED="true" BundleID="" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -10592,7 +10592,7 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java_DOM4J2" MODULE="dom4j-2.1.3.jar" MVN="mvn:org.dom4j/dom4j/2.1.3" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java_DOM4J_2.1.1" MODULE="dom4j-2.1.1.jar" MVN="mvn:org.dom4j/dom4j/2.1.1" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java_JAXEN_1.1.6" MODULE="jaxen-1.1.6.jar" MVN="mvn:jaxen/jaxen/1.1.6" REQUIRED="true" BundleID="" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -194,6 +194,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
|
||||
@@ -270,10 +270,12 @@ imports="
|
||||
if(!useExistingConnection){
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery)){
|
||||
%>
|
||||
if(commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
if(commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -482,7 +482,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e_<%=cid%>) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -624,7 +626,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e_<%=cid%>) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -781,7 +785,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e_<%=cid%>) {
|
||||
@@ -861,7 +867,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e_<%=cid%>) {
|
||||
@@ -999,6 +1007,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
updateFlag_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
if(isEnableDebug) {
|
||||
@@ -1046,7 +1055,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -1140,7 +1151,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e_<%=cid%>) {
|
||||
@@ -1257,6 +1270,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
+= (tmp_batchUpdateCount_<%=cid%>!=-1?tmp_batchUpdateCount_<%=cid%>:0);
|
||||
rowsToCommitCount_<%=cid%> += (tmp_batchUpdateCount_<%=cid%>!=-1?tmp_batchUpdateCount_<%=cid%>:0);
|
||||
batchSizeCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
@@ -1321,12 +1335,16 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
+= (tmp_batchUpdateCount_<%=cid%>!=-1?tmp_batchUpdateCount_<%=cid%>:0);
|
||||
rowsToCommitCount_<%=cid%> += (tmp_batchUpdateCount_<%=cid%>!=-1?tmp_batchUpdateCount_<%=cid%>:0);
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -156,6 +156,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
|
||||
@@ -117,6 +117,7 @@ imports="
|
||||
|
||||
}
|
||||
tmp_batchUpdateCount_<%=cid%> = tmp_batchUpdateCount_<%=cid%> > countSum_<%=cid%> ? tmp_batchUpdateCount_<%=cid%> : countSum_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
@@ -148,10 +149,14 @@ imports="
|
||||
{
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery))
|
||||
{
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
@@ -141,7 +141,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}else{
|
||||
%>
|
||||
try {
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -226,7 +228,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}else{
|
||||
%>
|
||||
try {
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -331,7 +335,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
try {
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -382,9 +388,11 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
try {
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
<%
|
||||
@@ -465,6 +473,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
int counter = 1;
|
||||
@@ -478,7 +487,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
}
|
||||
%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -557,7 +568,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}else{
|
||||
%>
|
||||
try {
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -657,6 +670,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
System.err.println(e.getMessage());
|
||||
}
|
||||
tmp_batchUpdateCount_<%=cid%> = tmp_batchUpdateCount_<%=cid%> > countSum_<%=cid%> ? tmp_batchUpdateCount_<%=cid%> : countSum_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
@@ -690,6 +704,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -717,6 +732,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -738,10 +754,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
<%
|
||||
}%>
|
||||
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -158,6 +158,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
|
||||
@@ -23,7 +23,6 @@ imports="
|
||||
boolean setAutoCommit = false;
|
||||
|
||||
boolean useExistingConnection = "true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
|
||||
boolean useBatch = "true".equals(ElementParameterParser.getValue(node, "__USE_BATCH__"));
|
||||
String batchSize = ElementParameterParser.getValue(node, "__BATCH_SIZE__");
|
||||
String dieOnError = ElementParameterParser.getValue(node, "__DIE_ON_ERROR__");
|
||||
@@ -118,6 +117,7 @@ imports="
|
||||
|
||||
}
|
||||
tmp_batchUpdateCount_<%=cid%> = tmp_batchUpdateCount_<%=cid%> > countSum_<%=cid%> ? tmp_batchUpdateCount_<%=cid%> : countSum_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
@@ -151,10 +151,12 @@ imports="
|
||||
<%
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery)) {
|
||||
%>
|
||||
if (commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if (commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -160,7 +160,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -266,7 +268,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -386,7 +390,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -448,7 +454,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -546,6 +554,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
if(isEnableDebug) {
|
||||
@@ -575,7 +584,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -668,7 +679,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -771,6 +784,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
System.err.println(e.getMessage());
|
||||
}
|
||||
tmp_batchUpdateCount_<%=cid%> = tmp_batchUpdateCount_<%=cid%> > countSum_<%=cid%> ? tmp_batchUpdateCount_<%=cid%> : countSum_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
@@ -804,6 +818,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -831,6 +846,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -852,10 +868,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
<%
|
||||
}%>
|
||||
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -187,6 +187,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
|
||||
@@ -133,6 +133,7 @@ imports="
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
}
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
@@ -172,6 +173,7 @@ imports="
|
||||
for(int countEach_<%=cid%>: e_<%=cid%>.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -212,9 +214,13 @@ imports="
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery))
|
||||
{
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
|
||||
@@ -442,7 +442,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
sp_<%=cid %> = conn_<%=cid%>.setSavepoint();
|
||||
<%}%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
<%if(showSavePoint){%>
|
||||
conn_<%=cid%>.releaseSavepoint(sp_<%=cid %>);
|
||||
@@ -590,7 +592,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
sp_<%=cid %> = conn_<%=cid%>.setSavepoint();
|
||||
<%}%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
<%if(showSavePoint){%>
|
||||
conn_<%=cid%>.releaseSavepoint(sp_<%=cid %>);
|
||||
@@ -748,7 +752,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
sp_<%=cid %> = conn_<%=cid%>.setSavepoint();
|
||||
<%}%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
<%if(showSavePoint){%>
|
||||
@@ -835,7 +841,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
sp_<%=cid %> = conn_<%=cid%>.setSavepoint();
|
||||
<%}%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
<%if(showSavePoint){%>
|
||||
@@ -980,6 +988,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%}%>
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
<%if(showSavePoint){%>
|
||||
conn_<%=cid%>.releaseSavepoint(sp_<%=cid %>);
|
||||
<%}%>
|
||||
@@ -1031,7 +1040,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
sp_<%=cid %> = conn_<%=cid%>.setSavepoint();
|
||||
<%}%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
<%if(showSavePoint){%>
|
||||
@@ -1139,7 +1150,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
sp_<%=cid %> = conn_<%=cid%>.setSavepoint();
|
||||
<%}%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
<%if(showSavePoint){%>
|
||||
@@ -1224,6 +1237,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -1262,6 +1276,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e_<%=cid%>.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -1300,6 +1315,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -1338,6 +1354,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e_<%=cid%>.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -1360,10 +1377,13 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
commitCounter_<%=cid%>=0;
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java-Feed" MODULE="feed4j.jar" MVN="mvn:org.talend.libraries/feed4j/6.0.0" REQUIRED="true" />
|
||||
<IMPORT NAME="Java-DOM" MODULE="dom4j-2.1.3.jar" MVN="mvn:org.dom4j/dom4j/2.1.3" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java-DOM" MODULE="dom4j-2.1.1.jar" MVN="mvn:org.dom4j/dom4j/2.1.1" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java-NEKO" MODULE="nekohtml.jar" MVN="mvn:org.talend.libraries/nekohtml/6.0.0" REQUIRED="true" />
|
||||
<IMPORT NAME="Java-XER" MODULE="xercesImpl.jar" MVN="mvn:org.talend.libraries/xercesImpl/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.xml/lib/xercesImpl.jar" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java-XML" MODULE="xml-apis.jar" MVN="mvn:org.talend.libraries/xml-apis/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.xml/lib/xml-apis.jar" REQUIRED="true" />
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
</PARAMETERS>
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Java-DOM4J" MODULE="dom4j-2.1.3.jar" MVN="mvn:org.dom4j/dom4j/2.1.3" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java-DOM4J" MODULE="dom4j-2.1.1.jar" MVN="mvn:org.dom4j/dom4j/2.1.1" REQUIRED="true" BundleID="" />
|
||||
<IMPORT NAME="Java-JAXEN" MODULE="jaxen-1.1.6.jar" MVN="mvn:jaxen/jaxen/1.1.6" REQUIRED="true" BundleID="" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -195,6 +195,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
java.util.Calendar calendar_<%=cid %> = java.util.Calendar.getInstance();
|
||||
|
||||
@@ -361,7 +361,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
|
||||
rowCount<%=cid%>++;
|
||||
}
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
}
|
||||
<%
|
||||
} // end extended insert case
|
||||
@@ -431,6 +433,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
|
||||
}
|
||||
tmp_batchUpdateCount_<%=cid%> = tmp_batchUpdateCount_<%=cid%> > countSum_<%=cid%> ? tmp_batchUpdateCount_<%=cid%> : countSum_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
@@ -463,10 +466,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery))
|
||||
{
|
||||
%>
|
||||
if (commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if (commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -342,7 +342,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
|
||||
try {
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -606,7 +608,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
nb_line_<%=cid%>++;
|
||||
|
||||
if(rowCount<%=cid%> == numPerInsert_<%=cid%>){
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
exInsertColValueList<%=cid%>.clear();
|
||||
rowCount<%=cid%> = 0;
|
||||
counter<%=cid%>=1;
|
||||
@@ -672,7 +676,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}else{
|
||||
%>
|
||||
try {
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -792,7 +798,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
try {
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -853,7 +861,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
try {
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -948,6 +958,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
int counter = 1;
|
||||
@@ -971,7 +982,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
}
|
||||
%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -1051,7 +1064,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}else{
|
||||
%>
|
||||
try {
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1143,10 +1158,13 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
commitCounter_<%=cid%>=0;
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ String inputConnName = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(useDynamicJob){
|
||||
useIndependentProcess = true;
|
||||
%>
|
||||
@@ -207,9 +207,8 @@ String inputConnName = null;
|
||||
%>
|
||||
jvm_argument_helper_<%=cid%>.addArgumentsTo(paraList_<%=cid %>, dealChildJobLibrary_<%=cid %>.replaceJarPathsFromCrcMap("<%=commandLineWindows[i] %>"));
|
||||
<%
|
||||
}else if (commandLineWindows[i].indexOf("talend.component.manager.m2.repository")>0) {%>
|
||||
// nope !
|
||||
<%}else{%>
|
||||
}else{
|
||||
%>
|
||||
jvm_argument_helper_<%=cid%>.addArgumentsTo(paraList_<%=cid %>, "<%=commandLineWindows[i] %>");
|
||||
<%
|
||||
}
|
||||
@@ -247,9 +246,7 @@ String inputConnName = null;
|
||||
if(param.indexOf(".jar") >= 0){
|
||||
%>
|
||||
jvm_argument_helper_<%=cid%>.addArgumentsTo(paraList_<%=cid %>, dealChildJobLibrary_<%=cid %>.replaceJarPathsFromCrcMap(<%=param %>).replace("$ROOT_PATH",System.getProperty("user.dir")));
|
||||
<%}else if (param.indexOf("talend.component.manager.m2.repository")>0) {%>
|
||||
// nope !
|
||||
<%}else {%>
|
||||
<%}else{%>
|
||||
jvm_argument_helper_<%=cid%>.addArgumentsTo(paraList_<%=cid %>, <%=param %>);
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
|
||||
String tableName_<%=cid%> = <%=tableName%>;
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
|
||||
@@ -124,6 +124,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
|
||||
}
|
||||
tmp_batchUpdateCount_<%=cid%> = tmp_batchUpdateCount_<%=cid%> > countSum_<%=cid%> ? tmp_batchUpdateCount_<%=cid%> : countSum_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
@@ -155,10 +156,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
if(!useExistingConnection) {
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery)) {
|
||||
%>
|
||||
if (commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null,dbLog.var("commitCounter"));%>
|
||||
if (commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null,dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -160,7 +160,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -264,7 +266,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -383,7 +387,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -445,7 +451,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -543,6 +551,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
<%
|
||||
@@ -604,7 +613,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -697,7 +708,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -799,6 +812,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
System.err.println(e.getMessage());
|
||||
}
|
||||
tmp_batchUpdateCount_<%=cid%> = tmp_batchUpdateCount_<%=cid%> > countSum_<%=cid%> ? tmp_batchUpdateCount_<%=cid%> : countSum_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += tmp_batchUpdateCount_<%=cid%>;
|
||||
@@ -831,6 +845,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -858,6 +873,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -879,10 +895,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
<%
|
||||
}%>
|
||||
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -92,6 +92,7 @@ int nb_line_rejected_<%=cid%> = 0;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
int updatedCount_<%=cid%>=0;
|
||||
int insertedCount_<%=cid%>=0;
|
||||
int rowsToCommitCount_<%=cid%>=0;
|
||||
int rejectedCount_<%=cid%>=0;
|
||||
|
||||
String tableName_<%=cid%> = <%=table%>;
|
||||
|
||||
@@ -94,6 +94,7 @@ imports="
|
||||
}
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -118,6 +119,7 @@ imports="
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -161,10 +163,12 @@ imports="
|
||||
if(!useExistingConnection){
|
||||
if(!("").equals(commitEvery) && !("0").equals(commitEvery)){
|
||||
%>
|
||||
if (commitCounter_<%=cid%> > 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
if (commitCounter_<%=cid%> > 0 && rowsToCommitCount_<%=cid%> != 0) {
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
commitCounter_<%=cid%> = 0;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
@@ -317,7 +317,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -452,7 +454,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
nb_line_<%=cid%>++;
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
whetherReject_<%=cid%> = true;
|
||||
@@ -603,7 +607,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%> + pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().updating(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -679,7 +685,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -808,6 +816,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
try {
|
||||
updateFlag_<%=cid%>=pstmtUpdate_<%=cid %>.executeUpdate();
|
||||
updatedCount_<%=cid%> = updatedCount_<%=cid%>+updateFlag_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += updateFlag_<%=cid%>;
|
||||
if(updateFlag_<%=cid%> == 0) {
|
||||
<%
|
||||
if(isEnableDebug) {
|
||||
@@ -851,7 +860,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
insertedCount_<%=cid%> = insertedCount_<%=cid%> + pstmtInsert_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmtInsert_<%=cid %>.executeUpdate();
|
||||
insertedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().inserting(dbLog.var("nb_line"));%>
|
||||
}else{
|
||||
@@ -947,7 +958,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
try {
|
||||
<%if(isEnableDebug){dbLog.data().sqlDebugPrint("globalMap.get(\""+cid+"_QUERY\")");}%>
|
||||
deletedCount_<%=cid%> = deletedCount_<%=cid%> + pstmt_<%=cid %>.executeUpdate();
|
||||
int processedCount_<%=cid%> = pstmt_<%=cid %>.executeUpdate();
|
||||
deletedCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
rowsToCommitCount_<%=cid%> += processedCount_<%=cid%>;
|
||||
nb_line_<%=cid%>++;
|
||||
<%dbLog.data().deleting(dbLog.var("nb_line"));%>
|
||||
} catch(java.lang.Exception e) {
|
||||
@@ -1024,6 +1037,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -1050,6 +1064,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -1088,6 +1103,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: pstmt_<%=cid %>.executeBatch()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%dbLog.batch().executeDone(dbLog.str(dataAction));%>
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
@@ -1115,6 +1131,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
for(int countEach_<%=cid%>: e.getUpdateCounts()) {
|
||||
countSum_<%=cid%> += (countEach_<%=cid%> < 0 ? 0 : countEach_<%=cid%>);
|
||||
}
|
||||
rowsToCommitCount_<%=cid%> += countSum_<%=cid%>;
|
||||
<%if (("INSERT").equals(dataAction)) {
|
||||
%>
|
||||
insertedCount_<%=cid%> += countSum_<%=cid%>;
|
||||
@@ -1136,9 +1153,12 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
<%
|
||||
}%>
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("commitCounter"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
if(rowsToCommitCount_<%=cid%> != 0){
|
||||
<%dbLog.commit().commitTry(null, dbLog.var("rowsToCommitCount"));%>
|
||||
conn_<%=cid%>.commit();
|
||||
<%dbLog.commit().commitDone(null);%>
|
||||
rowsToCommitCount_<%=cid%> = 0;
|
||||
}
|
||||
commitCounter_<%=cid%>=0;
|
||||
}
|
||||
<%
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user