Class ServiceLayerSynchronizationPersistenceAdapter
java.lang.Object
de.hybris.platform.catalog.jalo.synchronization.LegacySynchronizationPersistenceAdapter
de.hybris.platform.catalog.synchronization.ServiceLayerSynchronizationPersistenceAdapter
- All Implemented Interfaces:
SynchronizationPersistenceAdapter<Item,ComposedType>
public class ServiceLayerSynchronizationPersistenceAdapter
extends LegacySynchronizationPersistenceAdapter
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanIgnoreItemRemovedException(Item itemToRemove, Throwable exception) voidcreate(ComposedType targetType, Map<String, Object> attributes) Creates an entity of given type, with set of initial attributesvoidReads attributes of a given entityReads localized attributes of a given entityvoidRemoves a given entityvoidvoidsetCommonI18NService(CommonI18NService commonI18NService) voidsetModelService(ModelService modelService) voidsetUserService(UserService userService) protected booleanshouldRetry(Throwable exception) Determines which exception should we consider as recoverable so upper layer (worker) can react accordingly.voidUpdates a given entity with attribute value pair as its part of or other attributevoidUpdates a given entity with map of attribute at onceMethods inherited from class de.hybris.platform.catalog.jalo.synchronization.LegacySynchronizationPersistenceAdapter
getCopyContext, handleRemovalException
-
Constructor Details
-
ServiceLayerSynchronizationPersistenceAdapter
-
-
Method Details
-
create
public Item create(ComposedType targetType, Map<String, Object> attributes) throws SynchronizationPersistenceExceptionDescription copied from interface:SynchronizationPersistenceAdapterCreates an entity of given type, with set of initial attributes- Specified by:
createin interfaceSynchronizationPersistenceAdapter<Item,ComposedType> - Overrides:
createin classLegacySynchronizationPersistenceAdapter- Returns:
- an entity of given type.
- Throws:
SynchronizationPersistenceException
-
remove
Description copied from interface:SynchronizationPersistenceAdapterRemoves a given entity- Specified by:
removein interfaceSynchronizationPersistenceAdapter<Item,ComposedType> - Overrides:
removein classLegacySynchronizationPersistenceAdapter- Throws:
SynchronizationPersistenceException
-
read
public Map<String,Object> read(Item item, Set<String> attributes) throws SynchronizationPersistenceException Description copied from interface:SynchronizationPersistenceAdapterReads attributes of a given entity- Specified by:
readin interfaceSynchronizationPersistenceAdapter<Item,ComposedType> - Overrides:
readin classLegacySynchronizationPersistenceAdapterattributes- of a given entity- Returns:
- attributes of a given entity and theirs values
- Throws:
SynchronizationPersistenceException
-
readLocalized
public Map<String,Object> readLocalized(Item item, Set<String> attributes, Set<Language> languages) throws SynchronizationPersistenceException Description copied from interface:SynchronizationPersistenceAdapterReads localized attributes of a given entity- Specified by:
readLocalizedin interfaceSynchronizationPersistenceAdapter<Item,ComposedType> - Overrides:
readLocalizedin classLegacySynchronizationPersistenceAdapterattributes- of a given entitylanguages- for which values should be read- Returns:
- attributes of a given entity and theirs values
- Throws:
SynchronizationPersistenceException
-
shouldRetry
Description copied from class:LegacySynchronizationPersistenceAdapterDetermines which exception should we consider as recoverable so upper layer (worker) can react accordingly.- Overrides:
shouldRetryin classLegacySynchronizationPersistenceAdapter- Returns:
- true if exception is recoverable, otherwise returns false.
-
canIgnoreItemRemovedException
- Overrides:
canIgnoreItemRemovedExceptionin classLegacySynchronizationPersistenceAdapter
-
update
public void update(Item toUpdate, Map<String, Object> attributes) throws SynchronizationPersistenceExceptionDescription copied from interface:SynchronizationPersistenceAdapterUpdates a given entity with map of attribute at once- Specified by:
updatein interfaceSynchronizationPersistenceAdapter<Item,ComposedType> - Overrides:
updatein classLegacySynchronizationPersistenceAdapter- Throws:
SynchronizationPersistenceException
-
resetUnitOfWork
public void resetUnitOfWork()- Specified by:
resetUnitOfWorkin interfaceSynchronizationPersistenceAdapter<Item,ComposedType> - Overrides:
resetUnitOfWorkin classLegacySynchronizationPersistenceAdapter
-
disableTransactions
public void disableTransactions()- Specified by:
disableTransactionsin interfaceSynchronizationPersistenceAdapter<Item,ComposedType> - Overrides:
disableTransactionsin classLegacySynchronizationPersistenceAdapter
-
clearTransactionsSettings
public void clearTransactionsSettings()- Specified by:
clearTransactionsSettingsin interfaceSynchronizationPersistenceAdapter<Item,ComposedType> - Overrides:
clearTransactionsSettingsin classLegacySynchronizationPersistenceAdapter
-
update
public void update(Item toUpdate, Map.Entry<String, Object> attributes) throws SynchronizationPersistenceExceptionDescription copied from interface:SynchronizationPersistenceAdapterUpdates a given entity with attribute value pair as its part of or other attribute- Specified by:
updatein interfaceSynchronizationPersistenceAdapter<Item,ComposedType> - Overrides:
updatein classLegacySynchronizationPersistenceAdapter- Throws:
SynchronizationPersistenceException
-
setModelService
-
setUserService
-
setCommonI18NService
-