public void update(int discountCardTypeID, List<DiscountDetails> list) throws ClipsServerException {
checkCommandAccessibility(COMMAND_WRITE);
DiscountCardType type = findEntity(DiscountCardType.class, discountCardTypeID);
for(int i=0; i<list.size(); i++) {
DiscountDetails d = list.get(i);
DiscountLevel level = findEntity(DiscountLevel.class, d.level);
ServiceClass cls = findEntity(ServiceClass.class, d.cls);
Field field[] = {
new Field("cardType", type),
new Field("serviceClass", cls),