public class PriceRowPrepareInterceptor extends PDTRowPrepareInterceptor
PrepareInterceptor for the PriceRowModel. Sets the fallback UnitModel if no unit is provided
for the pricerow. The fallback is the unit from ProductModel.UNIT. If the PriceRowModel AND
ProductModel.UNIT contains no unit a InterceptorException is thrown.
Besides - takes care of updating the matchValue depending on Product/Pg and User/Ug values. The PDtRow common logic
is executed as well - see (PDTRowPrepareInterceptor| Constructor and Description |
|---|
PriceRowPrepareInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
calculateMatchValue(PriceRowModel price)
Value 9 : P + C 10 10 : 10 8 : PG + C 01 10 : 6 !!! 7 : P + CG 10 01 : 9 6 : PG + CG 01 01 : 5 !!! 5 : P + 10 00 :
8 4 : PG + 01 00 : 4 3 : + C 00 10 : 2 2 : + CG 00 01 : 1 1 : + 00 00 : 0
r1 > r2 -> value(r1) > value(r2)
|
void |
onPrepare(java.lang.Object model,
InterceptorContext ctx)
Called in the
modelService.saveAll() method. |
protected void |
updateCatalogVersion(PDTRowModel pdtModel) |
getCatalogTypeService, handleProductAndProductGroup, handleUserAndUserGroup, setCatalogTypeService, setPdtProductModificationMarker, setTypeService, updateProductMatchQualifier, updateUserMatchQualifierpublic void onPrepare(java.lang.Object model,
InterceptorContext ctx)
throws InterceptorException
PrepareInterceptormodelService.saveAll() method. Prepares the values of the given model.onPrepare in interface PrepareInterceptoronPrepare in class PDTRowPrepareInterceptormodel - the model which values has to be preparedctx - the InterceptorContextInterceptorException - if an error occured during the preparationprotected int calculateMatchValue(PriceRowModel price)
protected void updateCatalogVersion(PDTRowModel pdtModel)
updateCatalogVersion in class PDTRowPrepareInterceptorCopyright © 2018 SAP SE. All Rights Reserved.