List of usage examples for org.hibernate Query setParameterList
Query<R> setParameterList(int position, Object[] values);
From source file:com.ut.healthelink.dao.impl.transactionInDAOImpl.java
@Override @Transactional//from w ww . j av a 2 s. com public void updateBlanksToNull(configurationFormFields cff, Integer batchUploadId) { String sql = "update transactiontranslatedIn set F" + cff.getFieldNo() + " = null where length(F" + cff.getFieldNo() + ") = 0 " + "and transactionInId in (select id from transactionIn where batchId = :batchUploadId " + "and configId = :configId and statusId in (:transRELId));"; Query updateData = sessionFactory.getCurrentSession().createSQLQuery(sql); updateData.setParameter("batchUploadId", batchUploadId); updateData.setParameter("configId", cff.getconfigId()); updateData.setParameterList("transRELId", transRELId); try { updateData.executeUpdate(); } catch (Exception ex) { System.err.println("updateBlanksToNull " + ex.getCause()); } }
From source file:com.ut.healthelink.dao.impl.transactionInDAOImpl.java
@Override @Transactional/*from w w w. j a va 2 s . c o m*/ public void nullForCWCol(Integer configId, Integer batchId, boolean foroutboundProcessing, Integer transactionId) { String sql; Integer id = batchId; if (foroutboundProcessing == false) { sql = "update transactionTranslatedIn set forcw = null where " + " transactionInId "; if (transactionId == 0) { sql = sql + "in (select id from transactionIn where "; if (configId != 0) { sql = sql + " configId = :configId and "; } sql = sql + " batchId = :id and statusId not in ( :transRELId ));"; } else { sql = sql + " = :id"; id = transactionId; } } else { sql = "update transactionTranslatedOut set forcw = null where " + "transactionTargetId "; if (transactionId == 0) { sql = sql + " in (select id from transactionTarget where "; if (configId != 0) { sql = sql + "configId = :configId and "; } sql = sql + " batchDLId = :id and statusId not in ( :transRELId ));"; } else { sql = sql + " = :id"; id = transactionId; } } Query updateData = sessionFactory.getCurrentSession().createSQLQuery(sql).setParameter("id", id); if (transactionId == 0) { updateData.setParameterList("transRELId", transRELId); if (configId != 0) { updateData.setParameter("configId", configId); } } try { updateData.executeUpdate(); } catch (Exception ex) { System.err.println("nullForCWCol " + ex.getCause()); ex.printStackTrace(); } }
From source file:com.ut.healthelink.dao.impl.transactionInDAOImpl.java
@Override @Transactional/*from w ww . j ava 2s . co m*/ public void executeSingleValueCWData(Integer configId, Integer batchId, Integer fieldNo, CrosswalkData cwd, boolean foroutboundProcessing, Integer fieldId, Integer transactionId) { String sql; Integer id = batchId; if (foroutboundProcessing == false) { sql = "update transactionTranslatedIn set forcw = :targetValue where " + "REPLACE(REPLACE(trim(f" + fieldNo + "), '\n', ''), '\r', '') = :sourceValue and transactionInId "; if (transactionId == 0) { sql = sql + "in (select id from transactionIn where configId = :configId " + " and batchId = :id and statusId not in ( :transRELId ));"; } else { sql = sql + " = :id"; id = transactionId; } } else { sql = "update transactionTranslatedOut set forcw = :targetValue where " + "REPLACE(REPLACE(trim(f" + fieldNo + "), '\n', ''), '\r', '') = :sourceValue and transactionTargetId "; if (transactionId == 0) { sql = sql + " in (select id from transactionTarget where configId = :configId and batchDLId = :id and statusId not in ( :transRELId ));"; } else { sql = sql + " = :id"; id = transactionId; } } Query updateData = sessionFactory.getCurrentSession().createSQLQuery(sql) .setParameter("targetValue", cwd.getTargetValue()).setParameter("sourceValue", cwd.getSourceValue()) .setParameter("id", id); if (transactionId == 0) { updateData.setParameter("configId", configId); updateData.setParameterList("transRELId", transRELId); } try { updateData.executeUpdate(); } catch (Exception ex) { System.err.println("executeSingleValueCWData " + ex.getCause()); ex.printStackTrace(); insertProcessingError(processingSysErrorId, configId, batchId, fieldNo, null, cwd.getCrosswalkId(), null, false, foroutboundProcessing, ("executeSingleValueCWData " + ex.getCause().toString())); } }
From source file:com.ut.healthelink.dao.impl.transactionInDAOImpl.java
@Override @Transactional/*from w ww. j a va2 s. c o m*/ public void updateFieldNoWithCWData(Integer configId, Integer batchId, Integer fieldNo, Integer passClear, boolean foroutboundProcessing, Integer transactionId) { try { String sql; Integer id = batchId; if (foroutboundProcessing == false) { if (transactionId == 0) { sql = "update transactionTranslatedIn " + " JOIN (SELECT id from transactionIn WHERE configId = :configId" + " and batchId = :id and statusId not in ( :transRELId )" + ") as ti ON transactionTranslatedIn.transactionInId = ti.id " + " SET transactionTranslatedIn.F" + fieldNo + " = forcw "; if (passClear == 1) { // 1 is pass, we leave original values in fieldNo alone sql = sql + "where forcw is not null;"; } } else { sql = "update transactionTranslatedIn SET transactionTranslatedIn.F" + fieldNo + " = forcw " + " where transactionInId = :id"; id = transactionId; if (passClear == 1) { // 1 is pass, we leave original values in fieldNo alone sql = sql + " and forcw is not null;"; } } } else { if (transactionId == 0) { sql = "update transactionTranslatedOut " + " JOIN (SELECT id from transactionTarget WHERE configId = :configId" + " and batchDLId = :id and statusId not in ( :transRELId )) as ti ON transactionTranslatedOut.transactionTargetId = ti.id " + " SET transactionTranslatedOut.F" + fieldNo + " = forcw "; if (passClear == 1) { // 1 is pass, we leave original values in fieldNo alone sql = sql + "where forcw is not null;"; } } else { sql = "update transactionTranslatedOut " + " SET transactionTranslatedOut.F" + fieldNo + " = forcw " + " where transactionTargetId = :id"; if (passClear == 1) { // 1 is pass, we leave original values in fieldNo alone sql = sql + " and forcw is not null;"; } id = transactionId; } } Query updateData = sessionFactory.getCurrentSession().createSQLQuery(sql).setParameter("id", id); if (transactionId == 0) { updateData.setParameter("configId", configId); updateData.setParameterList("transRELId", transRELId); } updateData.executeUpdate(); } catch (Exception ex) { System.err.println("updateFieldNoWithCWData " + ex.getCause()); ex.printStackTrace(); } }
From source file:com.ut.healthelink.dao.impl.transactionInDAOImpl.java
@Override @Transactional/*from w w w. j a v a 2 s. c o m*/ public void flagCWErrors(Integer configId, Integer batchId, configurationDataTranslations cdt, boolean foroutboundProcessing, Integer transactionId) { String sql; Integer id = batchId; if (foroutboundProcessing == false) { if (transactionId == 0) { sql = "insert into transactionInerrors (batchUploadId, configId, " + "transactionInId, fieldNo, errorid, cwId)" + " select " + batchId + ", " + configId + ",transactionInId, " + cdt.getFieldNo() + ", 3, " + cdt.getCrosswalkId() + " from transactionTranslatedIn where " + "configId = :configId " + " and (F" + cdt.getFieldNo() + " is not null and length(F" + cdt.getFieldNo() + ") != 0 and forcw is null)" + "and transactionInId in (select id from transactionIn " + "where batchId = :id" + " and configId = :configId and statusId not in ( :transRELId ));"; } else { sql = "insert into transactionInerrors (batchUploadId, configId, " + "transactionInId, fieldNo, errorid, cwId)" + " select " + batchId + ", " + configId + ",transactionInId, " + cdt.getFieldNo() + ", 3, " + cdt.getCrosswalkId() + " from transactionTranslatedIn where " + "configId = :configId " + " and (F" + cdt.getFieldNo() + " is not null and length(F" + cdt.getFieldNo() + ") != 0 and forcw is null)" + " and transactionInId = :id"; id = transactionId; } } else { if (transactionId == 0) { sql = "insert into transactionOutErrors (batchDownloadId, configId, " + "transactionTargetId, fieldNo, errorid, cwId)" + " select " + batchId + ", " + configId + ", transactionTargetId, " + cdt.getFieldNo() + ", 3, " + cdt.getCrosswalkId() + " from transactionTranslatedOut where " + " configId = :configId " + " and (F" + cdt.getFieldNo() + " is not null and length(F" + cdt.getFieldNo() + ") != 0 and forcw is null)" + " and transactionTargetId in (select id from transactionTarget " + " where batchDLId = :id" + " and configId = :configId and statusId not in ( :transRELId ));"; } else { sql = "insert into transactionOutErrors (batchDownloadId, configId, " + "transactionTargetId, fieldNo, errorid, cwId)" + " select " + batchId + ", " + configId + ", transactionTargetId, " + cdt.getFieldNo() + ", 3, " + cdt.getCrosswalkId() + " from transactionTranslatedOut where " + " configId = :configId " + " and (F" + cdt.getFieldNo() + " is not null and length(F" + cdt.getFieldNo() + ") != 0 and forcw is null)" + " and transactionTargetId = :id"; id = transactionId; } } Query updateData = sessionFactory.getCurrentSession().createSQLQuery(sql).setParameter("id", id) .setParameter("configId", configId); if (transactionId == 0) { updateData.setParameterList("transRELId", transRELId); } try { updateData.executeUpdate(); } catch (Exception ex) { System.err.println("flagCWErrors " + ex.getCause()); ex.printStackTrace(); } }
From source file:com.ut.healthelink.dao.impl.transactionInDAOImpl.java
@Override @Transactional//from ww w. j a v a2s.c o m public void flagMacroErrors(Integer configId, Integer batchId, configurationDataTranslations cdt, boolean foroutboundProcessing, Integer transactionId) { try { String sql; Integer id = batchId; if (foroutboundProcessing == false) { if (transactionId == 0) { sql = "insert into transactionInerrors (batchUploadId, configId, " + "transactionInId, fieldNo, errorid, macroId)" + " select " + batchId + ", " + configId + ", transactionInId, " + cdt.getFieldNo() + ", 4, " + cdt.getMacroId() + " from transactionTranslatedIn where " + "configId = :configId " + " and forcw = 'MACRO_ERROR'" + " and transactionInId in (select id from transactionIn " + " where batchId = :id" + " and configId = :configId and statusId not in ( :transRELId ));"; } else { sql = "insert into transactionInerrors (batchUploadId, configId, " + "transactionInId, fieldNo, errorid, macroId)" + " (select " + batchId + ", " + configId + ", transactionInId, " + cdt.getFieldNo() + ", 4, " + cdt.getMacroId() + " from transactionTranslatedIn where " + "configId = :configId " + " and forcw = 'MACRO_ERROR'" + " and transactionInId = :id);"; id = transactionId; } } else { if (transactionId == 0) { sql = "insert into transactionOutErrors (batchDownloadId, configId, " + "transactionTargetId, fieldNo, errorid, macroId)" + " select " + batchId + ", " + configId + ",transactionTargetId, " + cdt.getFieldNo() + ", 4, " + cdt.getMacroId() + " from transactionTranslatedOut where " + "configId = :configId " + " and forcw = 'MACRO_ERROR'" + " and transactionTargetId in (select id from transactionTarget " + "where batchDLId = :id" + " and configId = :configId and statusId not in ( :transRELId ));"; } else { sql = "insert into transactionOutErrors (batchDownloadId, configId, " + "transactionTargetId, fieldNo, errorid, macroId)" + "( select " + batchId + ", " + configId + ",transactionTargetId, " + cdt.getFieldNo() + ", 4, " + cdt.getMacroId() + " from transactionTranslatedOut where " + "configId = :configId " + " and forcw = 'MACRO_ERROR'" + " and transactionTargetId = :id);"; id = transactionId; } } Query updateData = sessionFactory.getCurrentSession().createSQLQuery(sql).setParameter("id", id) .setParameter("configId", configId); if (transactionId == 0) { updateData.setParameterList("transRELId", transRELId); } updateData.executeUpdate(); } catch (Exception ex) { System.err.println("flagMacroErrors " + ex.getCause()); ex.printStackTrace(); } }
From source file:com.ut.healthelink.dao.impl.transactionInDAOImpl.java
/** * this method will replace transactionTranslatedIn data with data from transactionInRecords * * @param batchId - the batch to reset/*ww w . j av a 2 s . co m*/ * @param resetAll - if true, we reset all records. If false, we skip the REL records * */ @Override @Transactional public void resetTransactionTranslatedIn(Integer batchId, boolean resetAll, Integer transactionInId) { Integer id = batchId; String sql = "UPDATE transactionTranslatedIn INNER JOIN transactionInRecords ON " + " (transactionTranslatedIn.transactionInId = transactionInRecords.transactionInId) " + " and "; if (transactionInId == 0) { sql = sql + "transactionTranslatedIn.transactionInId in (select id from transactionIn where batchId = :id "; } else { sql = sql + " (transactionTranslatedIn.transactionInId = :id "; id = transactionInId; resetAll = true; } if (!resetAll) { sql = sql + " and statusId not in ( :transRELId )"; } sql = sql + ") SET " + "transactionTranslatedIn.F1 = transactionInRecords.F1, " + "transactionTranslatedIn.F2 = transactionInRecords.F2, " + "transactionTranslatedIn.F3 = transactionInRecords.F3, " + "transactionTranslatedIn.F4 = transactionInRecords.F4, " + "transactionTranslatedIn.F5 = transactionInRecords.F5, " + "transactionTranslatedIn.F6 = transactionInRecords.F6, " + "transactionTranslatedIn.F7 = transactionInRecords.F7, " + "transactionTranslatedIn.F8 = transactionInRecords.F8, " + "transactionTranslatedIn.F9 = transactionInRecords.F9, " + "transactionTranslatedIn.F10 = transactionInRecords.F10," + "transactionTranslatedIn.F11 = transactionInRecords.F11," + "transactionTranslatedIn.F12 = transactionInRecords.F12," + "transactionTranslatedIn.F13 = transactionInRecords.F13," + "transactionTranslatedIn.F14 = transactionInRecords.F14," + "transactionTranslatedIn.F15 = transactionInRecords.F15," + "transactionTranslatedIn.F16 = transactionInRecords.F16," + "transactionTranslatedIn.F17 = transactionInRecords.F17," + "transactiontranslatedIn.F18 = transactionInRecords.F18," + "transactiontranslatedIn.F19 = transactionInRecords.F19," + "transactiontranslatedIn.F20 = transactionInRecords.F20," + "transactiontranslatedIn.F21 = transactionInRecords.F21," + "transactiontranslatedIn.F22 = transactionInRecords.F22," + "transactiontranslatedIn.F23 = transactionInRecords.F23," + "transactiontranslatedIn.F24 = transactionInRecords.F24," + "transactiontranslatedIn.F25 = transactionInRecords.F25," + "transactiontranslatedIn.F26 = transactionInRecords.F26," + "transactiontranslatedIn.F27 = transactionInRecords.F27," + "transactiontranslatedIn.F28 = transactionInRecords.F28," + "transactiontranslatedIn.F29 = transactionInRecords.F29," + "transactiontranslatedIn.F30 = transactionInRecords.F30," + "transactiontranslatedIn.F31 = transactionInRecords.F31," + "transactiontranslatedIn.F32 = transactionInRecords.F32," + "transactiontranslatedIn.F33 = transactionInRecords.F33," + "transactiontranslatedIn.F34 = transactionInRecords.F34," + "transactiontranslatedIn.F35 = transactionInRecords.F35," + "transactiontranslatedIn.F36 = transactionInRecords.F36," + "transactiontranslatedIn.F37 = transactionInRecords.F37," + "transactiontranslatedIn.F38 = transactionInRecords.F38," + "transactiontranslatedIn.F39 = transactionInRecords.F39," + "transactiontranslatedIn.F40 = transactionInRecords.F40," + "transactiontranslatedIn.F41 = transactionInRecords.F41," + "transactiontranslatedIn.F42 = transactionInRecords.F42," + "transactiontranslatedIn.F43 = transactionInRecords.F43," + "transactiontranslatedIn.F44 = transactionInRecords.F44," + "transactiontranslatedIn.F45 = transactionInRecords.F45," + "transactiontranslatedIn.F46 = transactionInRecords.F46," + "transactiontranslatedIn.F47 = transactionInRecords.F47," + "transactiontranslatedIn.F48 = transactionInRecords.F48," + "transactiontranslatedIn.F49 = transactionInRecords.F49," + "transactiontranslatedIn.F50 = transactionInRecords.F50," + "transactiontranslatedIn.F51 = transactionInRecords.F51," + "transactiontranslatedIn.F52 = transactionInRecords.F52," + "transactiontranslatedIn.F53 = transactionInRecords.F53," + "transactiontranslatedIn.F54 = transactionInRecords.F54," + "transactiontranslatedIn.F55 = transactionInRecords.F55," + "transactiontranslatedIn.F56 = transactionInRecords.F56," + "transactiontranslatedIn.F57 = transactionInRecords.F57," + "transactiontranslatedIn.F58 = transactionInRecords.F58," + "transactiontranslatedIn.F59 = transactionInRecords.F59," + "transactiontranslatedIn.F60 = transactionInRecords.F60," + "transactiontranslatedIn.F61 = transactionInRecords.F61," + "transactiontranslatedIn.F62 = transactionInRecords.F62," + "transactiontranslatedIn.F63 = transactionInRecords.F63," + "transactiontranslatedIn.F64 = transactionInRecords.F64," + "transactiontranslatedIn.F65 = transactionInRecords.F65," + "transactiontranslatedIn.F66 = transactionInRecords.F66," + "transactiontranslatedIn.F67 = transactionInRecords.F67," + "transactiontranslatedIn.F68 = transactionInRecords.F68," + "transactiontranslatedIn.F69 = transactionInRecords.F69," + "transactiontranslatedIn.F70 = transactionInRecords.F70," + "transactiontranslatedIn.F71 = transactionInRecords.F71," + "transactiontranslatedIn.F72 = transactionInRecords.F72," + "transactiontranslatedIn.F73 = transactionInRecords.F73," + "transactiontranslatedIn.F74 = transactionInRecords.F74," + "transactiontranslatedIn.F75 = transactionInRecords.F75," + "transactiontranslatedIn.F76 = transactionInRecords.F76," + "transactiontranslatedIn.F77 = transactionInRecords.F77," + "transactiontranslatedIn.F78 = transactionInRecords.F78," + "transactiontranslatedIn.F79 = transactionInRecords.F79," + "transactiontranslatedIn.F80 = transactionInRecords.F80," + "transactiontranslatedIn.F81 = transactionInRecords.F81," + "transactiontranslatedIn.F82 = transactionInRecords.F82," + "transactiontranslatedIn.F83 = transactionInRecords.F83," + "transactiontranslatedIn.F84 = transactionInRecords.F84," + "transactiontranslatedIn.F85 = transactionInRecords.F85," + "transactiontranslatedIn.F86 = transactionInRecords.F86," + "transactiontranslatedIn.F87 = transactionInRecords.F87," + "transactiontranslatedIn.F88 = transactionInRecords.F88," + "transactiontranslatedIn.F89 = transactionInRecords.F89," + "transactiontranslatedIn.F90 = transactionInRecords.F90," + "transactiontranslatedIn.F91 = transactionInRecords.F91," + "transactiontranslatedIn.F92 = transactionInRecords.F92," + "transactiontranslatedIn.F93 = transactionInRecords.F93," + "transactiontranslatedIn.F94 = transactionInRecords.F94," + "transactiontranslatedIn.F95 = transactionInRecords.F95," + "transactiontranslatedIn.F96 = transactionInRecords.F96," + "transactiontranslatedIn.F97 = transactionInRecords.F97," + "transactiontranslatedIn.F98 = transactionInRecords.F98," + "transactiontranslatedIn.F99 = transactionInRecords.F99," + "transactiontranslatedIn.F100 = transactionInRecords.F100," + "transactiontranslatedIn.F101 = transactionInRecords.F101," + "transactiontranslatedIn.F102 = transactionInRecords.F102," + "transactiontranslatedIn.F103 = transactionInRecords.F103," + "transactiontranslatedIn.F104 = transactionInRecords.F104," + "transactiontranslatedIn.F105 = transactionInRecords.F105," + "transactiontranslatedIn.F106 = transactionInRecords.F106," + "transactiontranslatedIn.F107 = transactionInRecords.F107," + "transactiontranslatedIn.F108 = transactionInRecords.F108," + "transactiontranslatedIn.F109 = transactionInRecords.F109," + "transactiontranslatedIn.F110 = transactionInRecords.F110," + "transactiontranslatedIn.F111 = transactionInRecords.F111," + "transactiontranslatedIn.F112 = transactionInRecords.F112," + "transactiontranslatedIn.F113 = transactionInRecords.F113," + "transactiontranslatedIn.F114 = transactionInRecords.F114," + "transactiontranslatedIn.F115 = transactionInRecords.F115," + "transactiontranslatedIn.F116 = transactionInRecords.F116," + "transactiontranslatedIn.F117 = transactionInRecords.F117," + "transactiontranslatedIn.F118 = transactionInRecords.F118," + "transactiontranslatedIn.F119 = transactionInRecords.F119," + "transactiontranslatedIn.F120 = transactionInRecords.F120," + "transactiontranslatedIn.F121 = transactionInRecords.F121," + "transactiontranslatedIn.F122 = transactionInRecords.F122," + "transactiontranslatedIn.F123 = transactionInRecords.F123," + "transactiontranslatedIn.F124 = transactionInRecords.F124," + "transactiontranslatedIn.F125 = transactionInRecords.F125," + "transactiontranslatedIn.F126 = transactionInRecords.F126," + "transactiontranslatedIn.F127 = transactionInRecords.F127," + "transactiontranslatedIn.F128 = transactionInRecords.F128," + "transactiontranslatedIn.F129 = transactionInRecords.F129," + "transactiontranslatedIn.F130 = transactionInRecords.F130," + "transactiontranslatedIn.F131 = transactionInRecords.F131," + "transactiontranslatedIn.F132 = transactionInRecords.F132," + "transactiontranslatedIn.F133 = transactionInRecords.F133," + "transactiontranslatedIn.F134 = transactionInRecords.F134," + "transactiontranslatedIn.F135 = transactionInRecords.F135," + "transactiontranslatedIn.F136 = transactionInRecords.F136," + "transactiontranslatedIn.F137 = transactionInRecords.F137," + "transactiontranslatedIn.F138 = transactionInRecords.F138," + "transactiontranslatedIn.F139 = transactionInRecords.F139," + "transactiontranslatedIn.F140 = transactionInRecords.F140," + "transactiontranslatedIn.F141 = transactionInRecords.F141," + "transactiontranslatedIn.F142 = transactionInRecords.F142," + "transactiontranslatedIn.F143 = transactionInRecords.F143," + "transactiontranslatedIn.F144 = transactionInRecords.F144," + "transactiontranslatedIn.F145 = transactionInRecords.F145," + "transactiontranslatedIn.F146 = transactionInRecords.F146," + "transactiontranslatedIn.F147 = transactionInRecords.F147," + "transactiontranslatedIn.F148 = transactionInRecords.F148," + "transactiontranslatedIn.F149 = transactionInRecords.F149," + "transactiontranslatedIn.F150 = transactionInRecords.F150," + "transactiontranslatedIn.F151 = transactionInRecords.F151," + "transactiontranslatedIn.F152 = transactionInRecords.F152," + "transactiontranslatedIn.F153 = transactionInRecords.F153," + "transactiontranslatedIn.F154 = transactionInRecords.F154," + "transactiontranslatedIn.F155 = transactionInRecords.F155," + "transactiontranslatedIn.F156 = transactionInRecords.F156," + "transactiontranslatedIn.F157 = transactionInRecords.F157," + "transactiontranslatedIn.F158 = transactionInRecords.F158," + "transactiontranslatedIn.F159 = transactionInRecords.F159," + "transactiontranslatedIn.F160 = transactionInRecords.F160," + "transactiontranslatedIn.F161 = transactionInRecords.F161," + "transactiontranslatedIn.F162 = transactionInRecords.F162," + "transactiontranslatedIn.F163 = transactionInRecords.F163," + "transactiontranslatedIn.F164 = transactionInRecords.F164," + "transactiontranslatedIn.F165 = transactionInRecords.F165," + "transactiontranslatedIn.F166 = transactionInRecords.F166," + "transactiontranslatedIn.F167 = transactionInRecords.F167," + "transactiontranslatedIn.F168 = transactionInRecords.F168," + "transactiontranslatedIn.F169 = transactionInRecords.F169," + "transactiontranslatedIn.F170 = transactionInRecords.F170," + "transactiontranslatedIn.F171 = transactionInRecords.F171," + "transactiontranslatedIn.F172 = transactionInRecords.F172," + "transactiontranslatedIn.F173 = transactionInRecords.F173," + "transactiontranslatedIn.F174 = transactionInRecords.F174," + "transactiontranslatedIn.F175 = transactionInRecords.F175," + "transactiontranslatedIn.F176 = transactionInRecords.F176," + "transactiontranslatedIn.F177 = transactionInRecords.F177," + "transactiontranslatedIn.F178 = transactionInRecords.F178," + "transactiontranslatedIn.F179 = transactionInRecords.F179," + "transactiontranslatedIn.F180 = transactionInRecords.F180," + "transactiontranslatedIn.F181 = transactionInRecords.F181," + "transactiontranslatedIn.F182 = transactionInRecords.F182," + "transactiontranslatedIn.F183 = transactionInRecords.F183," + "transactiontranslatedIn.F184 = transactionInRecords.F184," + "transactiontranslatedIn.F185 = transactionInRecords.F185," + "transactiontranslatedIn.F186 = transactionInRecords.F186," + "transactiontranslatedIn.F187 = transactionInRecords.F187," + "transactiontranslatedIn.F188 = transactionInRecords.F188," + "transactiontranslatedIn.F189 = transactionInRecords.F189," + "transactiontranslatedIn.F190 = transactionInRecords.F190," + "transactiontranslatedIn.F191 = transactionInRecords.F191," + "transactiontranslatedIn.F192 = transactionInRecords.F192," + "transactiontranslatedIn.F193 = transactionInRecords.F193," + "transactiontranslatedIn.F194 = transactionInRecords.F194," + "transactiontranslatedIn.F195 = transactionInRecords.F195," + "transactiontranslatedIn.F196 = transactionInRecords.F196," + "transactiontranslatedIn.F197 = transactionInRecords.F197," + "transactiontranslatedIn.F198 = transactionInRecords.F198," + "transactiontranslatedIn.F199 = transactionInRecords.F199," + "transactiontranslatedIn.F200 = transactionInRecords.F200," + "transactiontranslatedIn.F201 = transactionInRecords.F201," + "transactiontranslatedIn.F202 = transactionInRecords.F202," + "transactiontranslatedIn.F203 = transactionInRecords.F203," + "transactiontranslatedIn.F204 = transactionInRecords.F204," + "transactiontranslatedIn.F205 = transactionInRecords.F205," + "transactiontranslatedIn.F206 = transactionInRecords.F206," + "transactiontranslatedIn.F207 = transactionInRecords.F207," + "transactiontranslatedIn.F208 = transactionInRecords.F208," + "transactiontranslatedIn.F209 = transactionInRecords.F209," + "transactiontranslatedIn.F210 = transactionInRecords.F210," + "transactiontranslatedIn.F211 = transactionInRecords.F211," + "transactiontranslatedIn.F212 = transactionInRecords.F212," + "transactiontranslatedIn.F213 = transactionInRecords.F213," + "transactiontranslatedIn.F214 = transactionInRecords.F214," + "transactiontranslatedIn.F215 = transactionInRecords.F215," + "transactiontranslatedIn.F216 = transactionInRecords.F216," + "transactiontranslatedIn.F217 = transactionInRecords.F217," + "transactiontranslatedIn.F218 = transactionInRecords.F218," + "transactiontranslatedIn.F219 = transactionInRecords.F219," + "transactiontranslatedIn.F220 = transactionInRecords.F220," + "transactiontranslatedIn.F221 = transactionInRecords.F221," + "transactiontranslatedIn.F222 = transactionInRecords.F222," + "transactiontranslatedIn.F223 = transactionInRecords.F223," + "transactiontranslatedIn.F224 = transactionInRecords.F224," + "transactiontranslatedIn.F225 = transactionInRecords.F225," + "transactiontranslatedIn.F226 = transactionInRecords.F226," + "transactiontranslatedIn.F227 = transactionInRecords.F227," + "transactiontranslatedIn.F228 = transactionInRecords.F228," + "transactiontranslatedIn.F229 = transactionInRecords.F229," + "transactiontranslatedIn.F230 = transactionInRecords.F230," + "transactiontranslatedIn.F231 = transactionInRecords.F231," + "transactiontranslatedIn.F232 = transactionInRecords.F232," + "transactiontranslatedIn.F233 = transactionInRecords.F233," + "transactiontranslatedIn.F234 = transactionInRecords.F234," + "transactiontranslatedIn.F235 = transactionInRecords.F235," + "transactiontranslatedIn.F236 = transactionInRecords.F236," + "transactiontranslatedIn.F237 = transactionInRecords.F237," + "transactiontranslatedIn.F238 = transactionInRecords.F238," + "transactiontranslatedIn.F239 = transactionInRecords.F239," + "transactiontranslatedIn.F240 = transactionInRecords.F240," + "transactiontranslatedIn.F241 = transactionInRecords.F241," + "transactiontranslatedIn.F242 = transactionInRecords.F242," + "transactiontranslatedIn.F243 = transactionInRecords.F243," + "transactiontranslatedIn.F244 = transactionInRecords.F244," + "transactiontranslatedIn.F245 = transactionInRecords.F245," + "transactiontranslatedIn.F246 = transactionInRecords.F246," + "transactiontranslatedIn.F247 = transactionInRecords.F247," + "transactiontranslatedIn.F248 = transactionInRecords.F248," + "transactiontranslatedIn.F249 = transactionInRecords.F249," + "transactiontranslatedIn.F250 = transactionInRecords.F250," + "transactiontranslatedIn.F251 = transactionInRecords.F251," + "transactiontranslatedIn.F252 = transactionInRecords.F252," + "transactiontranslatedIn.F253 = transactionInRecords.F253," + "transactiontranslatedIn.F254 = transactionInRecords.F254," + "transactiontranslatedIn.F255 = transactionInRecords.F255," + "transactiontranslatedIn.F256 = transactionInRecords.F256," + "transactiontranslatedIn.F257 = transactionInRecords.F257," + "transactiontranslatedIn.F258 = transactionInRecords.F258," + "transactiontranslatedIn.F259 = transactionInRecords.F259," + "transactiontranslatedIn.F260 = transactionInRecords.F260," + "transactiontranslatedIn.F261 = transactionInRecords.F261," + "transactiontranslatedIn.F262 = transactionInRecords.F262," + "transactiontranslatedIn.F263 = transactionInRecords.F263," + "transactiontranslatedIn.F264 = transactionInRecords.F264," + "transactiontranslatedIn.F265 = transactionInRecords.F265," + "transactiontranslatedIn.F266 = transactionInRecords.F266," + "transactiontranslatedIn.F267 = transactionInRecords.F267," + "transactiontranslatedIn.F268 = transactionInRecords.F268," + "transactiontranslatedIn.F269 = transactionInRecords.F269," + "transactiontranslatedIn.F270 = transactionInRecords.F270," + "transactiontranslatedIn.F271 = transactionInRecords.F271," + "transactiontranslatedIn.F272 = transactionInRecords.F272," + "transactiontranslatedIn.F273 = transactionInRecords.F273," + "transactiontranslatedIn.F274 = transactionInRecords.F274," + "transactiontranslatedIn.F275 = transactionInRecords.F275," + "transactiontranslatedIn.F276 = transactionInRecords.F276," + "transactiontranslatedIn.F277 = transactionInRecords.F277," + "transactiontranslatedIn.F278 = transactionInRecords.F278," + "transactiontranslatedIn.F279 = transactionInRecords.F279," + "transactiontranslatedIn.F280 = transactionInRecords.F280," + "transactiontranslatedIn.F281 = transactionInRecords.F281," + "transactiontranslatedIn.F282 = transactionInRecords.F282," + "transactiontranslatedIn.F283 = transactionInRecords.F283," + "transactiontranslatedIn.F284 = transactionInRecords.F284," + "transactiontranslatedIn.F285 = transactionInRecords.F285," + "transactiontranslatedIn.F286 = transactionInRecords.F286," + "transactiontranslatedIn.F287 = transactionInRecords.F287," + "transactiontranslatedIn.F288 = transactionInRecords.F288," + "transactiontranslatedIn.F289 = transactionInRecords.F289," + "transactiontranslatedIn.F290 = transactionInRecords.F290," + "transactiontranslatedIn.F291 = transactionInRecords.F291," + "transactiontranslatedIn.F292 = transactionInRecords.F292," + "transactiontranslatedIn.F293 = transactionInRecords.F293," + "transactiontranslatedIn.F294 = transactionInRecords.F294," + "transactiontranslatedIn.F295 = transactionInRecords.F295," + "transactiontranslatedIn.F296 = transactionInRecords.F296," + "transactiontranslatedIn.F297 = transactionInRecords.F297," + "transactiontranslatedIn.F298 = transactionInRecords.F298," + "transactiontranslatedIn.F299 = transactionInRecords.F299," + "transactiontranslatedIn.F300 = transactionInRecords.F300," + "transactiontranslatedIn.F301 = transactionInRecords.F301," + "transactiontranslatedIn.F302 = transactionInRecords.F302," + "transactiontranslatedIn.F303 = transactionInRecords.F303," + "transactiontranslatedIn.F304 = transactionInRecords.F304," + "transactiontranslatedIn.F305 = transactionInRecords.F305," + "transactiontranslatedIn.F306 = transactionInRecords.F306," + "transactiontranslatedIn.F307 = transactionInRecords.F307," + "transactiontranslatedIn.F308 = transactionInRecords.F308," + "transactiontranslatedIn.F309 = transactionInRecords.F309," + "transactiontranslatedIn.F310 = transactionInRecords.F310," + "transactiontranslatedIn.F311 = transactionInRecords.F311," + "transactiontranslatedIn.F312 = transactionInRecords.F312," + "transactiontranslatedIn.F313 = transactionInRecords.F313," + "transactiontranslatedIn.F314 = transactionInRecords.F314," + "transactiontranslatedIn.F315 = transactionInRecords.F315," + "transactiontranslatedIn.F316 = transactionInRecords.F316," + "transactiontranslatedIn.F317 = transactionInRecords.F317," + "transactiontranslatedIn.F318 = transactionInRecords.F318," + "transactiontranslatedIn.F319 = transactionInRecords.F319," + "transactiontranslatedIn.F320 = transactionInRecords.F320," + "transactiontranslatedIn.F321 = transactionInRecords.F321," + "transactiontranslatedIn.F322 = transactionInRecords.F322," + "transactiontranslatedIn.F323 = transactionInRecords.F323," + "transactiontranslatedIn.F324 = transactionInRecords.F324," + "transactiontranslatedIn.F325 = transactionInRecords.F325," + "transactiontranslatedIn.F326 = transactionInRecords.F326," + "transactiontranslatedIn.F327 = transactionInRecords.F327," + "transactiontranslatedIn.F328 = transactionInRecords.F328," + "transactiontranslatedIn.F329 = transactionInRecords.F329," + "transactiontranslatedIn.F330 = transactionInRecords.F330," + "transactiontranslatedIn.F331 = transactionInRecords.F331," + "transactiontranslatedIn.F332 = transactionInRecords.F332," + "transactiontranslatedIn.F333 = transactionInRecords.F333," + "transactiontranslatedIn.F334 = transactionInRecords.F334," + "transactiontranslatedIn.F335 = transactionInRecords.F335," + "transactiontranslatedIn.F336 = transactionInRecords.F336," + "transactiontranslatedIn.F337 = transactionInRecords.F337," + "transactiontranslatedIn.F338 = transactionInRecords.F338," + "transactiontranslatedIn.F339 = transactionInRecords.F339," + "transactiontranslatedIn.F340 = transactionInRecords.F340," + "transactiontranslatedIn.F341 = transactionInRecords.F341," + "transactiontranslatedIn.F342 = transactionInRecords.F342," + "transactiontranslatedIn.F343 = transactionInRecords.F343," + "transactiontranslatedIn.F344 = transactionInRecords.F344," + "transactiontranslatedIn.F345 = transactionInRecords.F345," + "transactiontranslatedIn.F346 = transactionInRecords.F346," + "transactiontranslatedIn.F347 = transactionInRecords.F347," + "transactiontranslatedIn.F348 = transactionInRecords.F348," + "transactiontranslatedIn.F349 = transactionInRecords.F349," + "transactiontranslatedIn.F350 = transactionInRecords.F350," + "transactiontranslatedIn.F351 = transactionInRecords.F351," + "transactiontranslatedIn.F352 = transactionInRecords.F352," + "transactiontranslatedIn.F353 = transactionInRecords.F353," + "transactiontranslatedIn.F354 = transactionInRecords.F354," + "transactiontranslatedIn.F355 = transactionInRecords.F355," + "transactiontranslatedIn.F356 = transactionInRecords.F356," + "transactiontranslatedIn.F357 = transactionInRecords.F357," + "transactiontranslatedIn.F358 = transactionInRecords.F358," + "transactiontranslatedIn.F359 = transactionInRecords.F359," + "transactiontranslatedIn.F360 = transactionInRecords.F360," + "transactiontranslatedIn.F361 = transactionInRecords.F361," + "transactiontranslatedIn.F362 = transactionInRecords.F362," + "transactiontranslatedIn.F363 = transactionInRecords.F363," + "transactiontranslatedIn.F364 = transactionInRecords.F364," + "transactiontranslatedIn.F365 = transactionInRecords.F365," + "transactiontranslatedIn.F366 = transactionInRecords.F366," + "transactiontranslatedIn.F367 = transactionInRecords.F367," + "transactiontranslatedIn.F368 = transactionInRecords.F368," + "transactiontranslatedIn.F369 = transactionInRecords.F369," + "transactiontranslatedIn.F370 = transactionInRecords.F370," + "transactiontranslatedIn.F371 = transactionInRecords.F371," + "transactiontranslatedIn.F372 = transactionInRecords.F372," + "transactiontranslatedIn.F373 = transactionInRecords.F373," + "transactiontranslatedIn.F374 = transactionInRecords.F374," + "transactiontranslatedIn.F375 = transactionInRecords.F375," + "transactiontranslatedIn.F376 = transactionInRecords.F376," + "transactiontranslatedIn.F377 = transactionInRecords.F377," + "transactiontranslatedIn.F378 = transactionInRecords.F378," + "transactiontranslatedIn.F379 = transactionInRecords.F379," + "transactiontranslatedIn.F380 = transactionInRecords.F380," + "transactiontranslatedIn.F381 = transactionInRecords.F381," + "transactiontranslatedIn.F382 = transactionInRecords.F382," + "transactiontranslatedIn.F383 = transactionInRecords.F383," + "transactiontranslatedIn.F384 = transactionInRecords.F384," + "transactiontranslatedIn.F385 = transactionInRecords.F385," + "transactiontranslatedIn.F386 = transactionInRecords.F386," + "transactiontranslatedIn.F387 = transactionInRecords.F387," + "transactiontranslatedIn.F388 = transactionInRecords.F388," + "transactiontranslatedIn.F389 = transactionInRecords.F389," + "transactiontranslatedIn.F390 = transactionInRecords.F390," + "transactiontranslatedIn.F391 = transactionInRecords.F391," + "transactiontranslatedIn.F392 = transactionInRecords.F392," + "transactiontranslatedIn.F393 = transactionInRecords.F393," + "transactiontranslatedIn.F394 = transactionInRecords.F394," + "transactiontranslatedIn.F395 = transactionInRecords.F395," + "transactiontranslatedIn.F396 = transactionInRecords.F396," + "transactiontranslatedIn.F397 = transactionInRecords.F397," + "transactiontranslatedIn.F398 = transactionInRecords.F398," + "transactiontranslatedIn.F399 = transactionInRecords.F399," + "transactiontranslatedIn.F400 = transactionInRecords.F400," + "transactiontranslatedIn.F401 = transactionInRecords.F401," + "transactiontranslatedIn.F402 = transactionInRecords.F402," + "transactiontranslatedIn.F403 = transactionInRecords.F403," + "transactiontranslatedIn.F404 = transactionInRecords.F404," + "transactiontranslatedIn.F405 = transactionInRecords.F405," + "transactiontranslatedIn.F406 = transactionInRecords.F406," + "transactiontranslatedIn.F407 = transactionInRecords.F407," + "transactiontranslatedIn.F408 = transactionInRecords.F408," + "transactiontranslatedIn.F409 = transactionInRecords.F409," + "transactiontranslatedIn.F410 = transactionInRecords.F410," + "transactiontranslatedIn.F411 = transactionInRecords.F411," + "transactiontranslatedIn.F412 = transactionInRecords.F412," + "transactiontranslatedIn.F413 = transactionInRecords.F413," + "transactiontranslatedIn.F414 = transactionInRecords.F414," + "transactiontranslatedIn.F415 = transactionInRecords.F415," + "transactiontranslatedIn.F416 = transactionInRecords.F416," + "transactiontranslatedIn.F417 = transactionInRecords.F417," + "transactiontranslatedIn.F418 = transactionInRecords.F418," + "transactiontranslatedIn.F419 = transactionInRecords.F419," + "transactiontranslatedIn.F420 = transactionInRecords.F420," + "transactiontranslatedIn.F421 = transactionInRecords.F421," + "transactiontranslatedIn.F422 = transactionInRecords.F422," + "transactiontranslatedIn.F423 = transactionInRecords.F423," + "transactiontranslatedIn.F424 = transactionInRecords.F424," + "transactiontranslatedIn.F425 = transactionInRecords.F425," + "transactiontranslatedIn.F426 = transactionInRecords.F426," + "transactiontranslatedIn.F427 = transactionInRecords.F427," + "transactiontranslatedIn.F428 = transactionInRecords.F428," + "transactiontranslatedIn.F429 = transactionInRecords.F429," + "transactiontranslatedIn.F430 = transactionInRecords.F430," + "transactiontranslatedIn.F431 = transactionInRecords.F431," + "transactiontranslatedIn.F432 = transactionInRecords.F432," + "transactiontranslatedIn.F433 = transactionInRecords.F433," + "transactiontranslatedIn.F434 = transactionInRecords.F434," + "transactiontranslatedIn.F435 = transactionInRecords.F435," + "transactiontranslatedIn.F436 = transactionInRecords.F436," + "transactiontranslatedIn.F437 = transactionInRecords.F437," + "transactiontranslatedIn.F438 = transactionInRecords.F438," + "transactiontranslatedIn.F439 = transactionInRecords.F439," + "transactiontranslatedIn.F440 = transactionInRecords.F440," + "transactiontranslatedIn.F441 = transactionInRecords.F441," + "transactiontranslatedIn.F442 = transactionInRecords.F442," + "transactiontranslatedIn.F443 = transactionInRecords.F443," + "transactiontranslatedIn.F444 = transactionInRecords.F444," + "transactiontranslatedIn.F445 = transactionInRecords.F445," + "transactiontranslatedIn.F446 = transactionInRecords.F446," + "transactiontranslatedIn.F447 = transactionInRecords.F447," + "transactiontranslatedIn.F448 = transactionInRecords.F448," + "transactiontranslatedIn.F449 = transactionInRecords.F449," + "transactiontranslatedIn.F450 = transactionInRecords.F450," + "transactiontranslatedIn.F451 = transactionInRecords.F451," + "transactiontranslatedIn.F452 = transactionInRecords.F452," + "transactiontranslatedIn.F453 = transactionInRecords.F453," + "transactiontranslatedIn.F454 = transactionInRecords.F454," + "transactiontranslatedIn.F455 = transactionInRecords.F455," + "transactiontranslatedIn.F456 = transactionInRecords.F456," + "transactiontranslatedIn.F457 = transactionInRecords.F457," + "transactiontranslatedIn.F458 = transactionInRecords.F458," + "transactiontranslatedIn.F459 = transactionInRecords.F459," + "transactiontranslatedIn.F460 = transactionInRecords.F460," + "transactiontranslatedIn.F461 = transactionInRecords.F461," + "transactiontranslatedIn.F462 = transactionInRecords.F462," + "transactiontranslatedIn.F463 = transactionInRecords.F463," + "transactiontranslatedIn.F464 = transactionInRecords.F464," + "transactiontranslatedIn.F465 = transactionInRecords.F465," + "transactiontranslatedIn.F466 = transactionInRecords.F466," + "transactiontranslatedIn.F467 = transactionInRecords.F467," + "transactiontranslatedIn.F468 = transactionInRecords.F468," + "transactiontranslatedIn.F469 = transactionInRecords.F469," + "transactiontranslatedIn.F470 = transactionInRecords.F470," + "transactiontranslatedIn.F471 = transactionInRecords.F471," + "transactiontranslatedIn.F472 = transactionInRecords.F472," + "transactiontranslatedIn.F473 = transactionInRecords.F473," + "transactiontranslatedIn.F474 = transactionInRecords.F474," + "transactiontranslatedIn.F475 = transactionInRecords.F475," + "transactiontranslatedIn.F476 = transactionInRecords.F476," + "transactiontranslatedIn.F477 = transactionInRecords.F477," + "transactiontranslatedIn.F478 = transactionInRecords.F478," + "transactiontranslatedIn.F479 = transactionInRecords.F479," + "transactiontranslatedIn.F480 = transactionInRecords.F480," + "transactiontranslatedIn.F481 = transactionInRecords.F481," + "transactiontranslatedIn.F482 = transactionInRecords.F482," + "transactiontranslatedIn.F483 = transactionInRecords.F483," + "transactiontranslatedIn.F484 = transactionInRecords.F484," + "transactiontranslatedIn.F485 = transactionInRecords.F485," + "transactiontranslatedIn.F486 = transactionInRecords.F486," + "transactiontranslatedIn.F487 = transactionInRecords.F487," + "transactiontranslatedIn.F488 = transactionInRecords.F488," + "transactiontranslatedIn.F489 = transactionInRecords.F489," + "transactiontranslatedIn.F490 = transactionInRecords.F490," + "transactiontranslatedIn.F491 = transactionInRecords.F491," + "transactiontranslatedIn.F492 = transactionInRecords.F492," + "transactiontranslatedIn.F493 = transactionInRecords.F493," + "transactiontranslatedIn.F494 = transactionInRecords.F494," + "transactiontranslatedIn.F495 = transactionInRecords.F495," + "transactiontranslatedIn.F496 = transactionInRecords.F496," + "transactiontranslatedIn.F497 = transactionInRecords.F497," + "transactiontranslatedIn.F498 = transactionInRecords.F498," + "transactiontranslatedIn.F499 = transactionInRecords.F499," + "transactiontranslatedIn.F500 = transactionInRecords.F500"; Query updateData = sessionFactory.getCurrentSession().createSQLQuery(sql); updateData.setParameter("id", id); if (!resetAll) { updateData.setParameterList("transRELId", transRELId); } try { updateData.executeUpdate(); } catch (Exception ex) { System.err.println("resetTransactionTranslatedIn " + ex.getCause()); } }
From source file:com.ut.healthelink.dao.impl.transactionInDAOImpl.java
@Override @Transactional//from w w w. j ava 2s . c o m public void updateRecordCounts(Integer batchId, List<Integer> statusIds, boolean foroutboundProcessing, String colNameToUpdate) { String sql = ""; if (!foroutboundProcessing) { sql = " update batchUploads set " + colNameToUpdate + " = " + "(select count(id) as total from transactionIn where batchId = :batchId "; } else { sql = "update batchUploads set " + colNameToUpdate + " = (select count(id) as total " + " from transactionTarget where" + " batchDLId = :batchId "; } if (statusIds.size() > 0) { sql = sql + "and statusId in (:statusIds)"; } sql = sql + ") where id = :batchId"; try { Query query = sessionFactory.getCurrentSession().createSQLQuery(sql).setParameter("batchId", batchId); if (statusIds.size() > 0) { query.setParameterList("statusIds", statusIds); } query.executeUpdate(); } catch (Exception ex) { System.err.println("updateRecordCounts " + ex.getCause()); } }
From source file:com.ut.healthelink.dao.impl.transactionInDAOImpl.java
@Override @Transactional/*w w w . ja v a2 s .co m*/ public Integer getRecordCounts(Integer batchId, List<Integer> statusIds, boolean foroutboundProcessing, boolean inStatusIds) { String tableName = "transactionIn"; String batchType = "batchId"; if (foroutboundProcessing) { tableName = "transactionTarget"; batchType = "batchDLId"; } String sql = "select count(id) as total from " + tableName + " where " + batchType + " = :batchId "; if (statusIds.size() > 0) { sql = sql + " and statusId "; if (!inStatusIds) { sql = sql + " not "; } sql = sql + "in (:statusIds)"; } try { Query query = sessionFactory.getCurrentSession().createSQLQuery(sql).addScalar("total", StandardBasicTypes.INTEGER); query.setParameter("batchId", batchId); if (statusIds.size() > 0) { query.setParameterList("statusIds", statusIds); } return (Integer) query.list().get(0); } catch (Exception ex) { System.err.println("getRecordCounts " + ex.getCause()); return null; } }
From source file:com.ut.healthelink.dao.impl.transactionInDAOImpl.java
@SuppressWarnings("unchecked") @Override/*from www . j av a 2s . c o m*/ @Transactional public List<TransErrorDetail> getTransErrorDetailsForNoRptFields(Integer batchId, List<Integer> errorCodes) { try { String sql = "select " + "'N/A' as transactionStatusValue, 'N/A' as errorFieldLabel, " + " transactionInErrors.id, errorId as errorCode, displayText as errorDisplayText, stackTrace as errorData " + " from transactionInErrors, lu_errorCodes where transactionInErrors.errorId = lu_errorCodes.id " + " and transactionInErrors.errorId in ( :errorCodes ) and batchuploadid = :batchId order by errorId, id;"; Query query = sessionFactory.getCurrentSession().createSQLQuery(sql) .setResultTransformer(Transformers.aliasToBean(TransErrorDetail.class)); query.setParameter("batchId", batchId); query.setParameterList("errorCodes", errorCodes); return query.list(); } catch (Exception ex) { System.err.println("getTransErrorDetailsForNoRptFields " + ex.getCause()); ex.printStackTrace(); } return null; }