public class DefaultAbstractOrderPrepareInterceptor extends AbstractAttributesModificationAwareInterceptor implements PrepareInterceptor
AbstractOrderModel the interceptor adjusts the AbstractOrderModel.CODE according to the
configured KeyGenerator. It also sets a default value of AbstractOrderModel.CALCULATED flag.| Constructor and Description |
|---|
DefaultAbstractOrderPrepareInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Collection<java.lang.String> |
getAttributesForOrderEntriesRecalculation()
returns qualifiers of order attributes, which, when modified, the order and orderEntries need to be recalculated.
|
protected java.util.Collection<java.lang.String> |
getAttributesForOrderRecalculation()
returns qualifiers of order attributes, which, when modified, the order needs to be recalculated.
|
Logger |
getLogger() |
protected boolean |
isCalculatedFlagUnchangedOrFalse(AbstractOrderModel order,
InterceptorContext ctx)
As all of the order calculation is moved to the SL we can do the calculation and set the calculated flag in a
single database update.
|
void |
onPrepare(java.lang.Object model,
InterceptorContext ctx)
Called in the
modelService.saveAll() method. |
void |
setAttributesForOrderEntriesRecalculation(java.util.Collection<java.lang.String> attributesForOrderEntriesRecalculation) |
void |
setAttributesForOrderRecalculation(java.util.Collection<java.lang.String> attributesForOrderRecalculation) |
void |
setKeyGenerator(KeyGenerator keyGenerator) |
isAttributeModified, isOneOfAttributesModifiedpublic DefaultAbstractOrderPrepareInterceptor()
public void onPrepare(java.lang.Object model,
InterceptorContext ctx)
throws InterceptorException
PrepareInterceptormodelService.saveAll() method. Prepares the values of the given model.onPrepare in interface PrepareInterceptormodel - the model which values has to be preparedctx - the InterceptorContextInterceptorException - if an error occured during the preparationprotected java.util.Collection<java.lang.String> getAttributesForOrderEntriesRecalculation()
protected java.util.Collection<java.lang.String> getAttributesForOrderRecalculation()
protected boolean isCalculatedFlagUnchangedOrFalse(AbstractOrderModel order, InterceptorContext ctx)
public void setKeyGenerator(KeyGenerator keyGenerator)
public void setAttributesForOrderRecalculation(java.util.Collection<java.lang.String> attributesForOrderRecalculation)
public void setAttributesForOrderEntriesRecalculation(java.util.Collection<java.lang.String> attributesForOrderEntriesRecalculation)
public Logger getLogger()
getLogger in class AbstractAttributesModificationAwareInterceptorCopyright © 2018 SAP SE. All Rights Reserved.