public class DefaultSAPCustomerAddressConsistencyInterceptor extends java.lang.Object implements PrepareInterceptor
| Constructor and Description |
|---|
DefaultSAPCustomerAddressConsistencyInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
compareAddress(AddressModel source,
AddressModel target)
Compares two addresses to determine is they are different based on selected fields
|
protected java.util.List<AddressModel> |
getRelatedAddresses(java.lang.String sapCustomerId)
Retrieves addresses which are related to sapCustomerId
|
void |
onPrepare(java.lang.Object model,
InterceptorContext context)
Called in the
modelService.saveAll() method. |
void |
setFlexibleSearchService(FlexibleSearchService flexibleSearchService) |
protected void |
updateAddress(InterceptorContext context,
AddressModel source,
AddressModel target)
Updates an address to match a source
|
public DefaultSAPCustomerAddressConsistencyInterceptor()
public void onPrepare(java.lang.Object model,
InterceptorContext context)
throws InterceptorException
PrepareInterceptormodelService.saveAll() method. Prepares the values of the given model.onPrepare in interface PrepareInterceptormodel - the model which values has to be preparedcontext - the InterceptorContextInterceptorException - if an error occured during the preparationprotected java.util.List<AddressModel> getRelatedAddresses(java.lang.String sapCustomerId)
sapCustomerId - protected void updateAddress(InterceptorContext context, AddressModel source, AddressModel target)
context - source - Source addresstarget - target (related) addressprotected boolean compareAddress(AddressModel source, AddressModel target)
source - target - public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
Copyright © 2018 SAP SE. All Rights Reserved.