Seitenhistorie
...
Codeblock |
---|
package org.nuclet.company;
import java.util.List;
import org.nuclos.api.rule.UpdateRule;
import org.nuclos.api.context.UpdateContext;
import org.nuclos.api.annotation.Rule;
import org.nuclos.api.exception.BusinessException;
/** @name
* @description
* @usage
* @change
*/
@Rule(name="UpdateBestellung", description="UpdateBestellung")
public class UpdateBestellung implements UpdateRule {
public void update(UpdateContext context) throws BusinessException {
// This is the BusinessObject after storing the updated data in the database
Anfrage curBestellung = context.getBusinessObject(Anfrage.class);
// Changes are not recognized, because data has already been saved
// The following description will not be stored in the database
curBestellung.setKurzbeschreibung("Bestellung wurde im Schnellverfahren abgeschlossen.");
// so we use the BusinessObjectProvider to do so.
BusinessObjectProvider.update(curBestellung);
}
} |
Überblick
Inhalte