strInsertQuery="INSERT INTO SYNPACKAGEFREEUSAGEMAPPING (PACKAGEID,SERVICEID,PRIORITY,MAPPINGID,ATTRIBUTEVALUE,FREEUSAGE,UOM,PARAMSTR1,UNITCREDITPOLICYDETAILID) VALUES (?,?,?,?,?,?,?,?,?)";
newPstmt=newCon.prepareStatement(strInsertQuery);
newPstmt.setString(1,strProductId);
newPstmt.setString(2,strUPGServiceId);
newPstmt.setInt(3,0);
if(FieldMappingrs.next())
{
newPstmt.setLong(4,FieldMappingrs.getLong(1));
}
newPstmt.setString(5,ucpDetailData.getCreditattributevalue());
for(Iterator itrColUnitCreditDetail=ucpData.iterator();itrColUnitCreditDetail.hasNext();)
{
unitCreditData = (UnitCreditDetailData)itrColUnitCreditDetail.next();
if(ucpDetailData.getUnitcreditpolicydetailid().equals(unitCreditData.getUnitcreditpolicydetailid()))
{
debugLog(PackageConstant.PACKAGE_MODULE_NAME,"ServicePackageSessionBean:createFreeUsageServiceDetails() unitCreditData "+ unitCreditData);
newPstmt.setDouble(6,unitCreditData.getEndvalue());
}
debugLog(PackageConstant.PACKAGE_MODULE_NAME,"Insert record successfull"+ ucpDetailData);
}
newPstmt.setString(7,ucpDetailData.getUom());
newPstmt.setString(8,ucpDetailData.getCreditattribute());
newPstmt.setString(9,ucpDetailData.getUnitcreditpolicydetailid());
newPstmt.executeUpdate();