while(paramKeys.hasMoreElements()) {
String paramName = paramKeys.nextElement().toString();
if(paramName.startsWith("costtypeid")) {
String suffix=paramName.substring(10, paramName.length());
DcontractItem entryItem= new DcontractItem();
entryItem.setCostTypeId(pp.getInt("costtypeid" + suffix));
entryItem.setCostFunction(pp.getInt("costfunction" + suffix));
BigDecimal itmCostAmount= pp.getBigDecimal("costamount" + suffix);
entryItem.setCostAmount(itmCostAmount);
entry.addDcontractItem(entryItem);
}
}