Class LegacySynchronizationPersistenceAdapter
java.lang.Object
de.hybris.platform.catalog.jalo.synchronization.LegacySynchronizationPersistenceAdapter
- All Implemented Interfaces:
SynchronizationPersistenceAdapter<Item,ComposedType>
- Direct Known Subclasses:
ServiceLayerSynchronizationPersistenceAdapter
public class LegacySynchronizationPersistenceAdapter
extends Object
implements SynchronizationPersistenceAdapter<Item,ComposedType>
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanIgnoreItemRemovedException(Item itemToRemove, Throwable exception) voidcreate(ComposedType expectedType, Map<String, Object> attributes) Creates an entity of given type, with set of initial attributesvoidprotected GenericCatalogCopyContextprotected voidhandleRemovalException(Item itemToRemove, Throwable exception) Override this method in order to rethrow aSynchronizationPersistenceExceptionorRecoverableSynchronizationPersistenceExceptionin certain situation so upper layer can abort or recover during removal.Reads attributes of a given entityReads localized attributes of a given entityvoidRemoves a given entityvoidprotected 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 once
-
Constructor Details
-
LegacySynchronizationPersistenceAdapter
-
-
Method Details
-
create
public Item create(ComposedType expectedType, 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> - Returns:
- an entity of given type.
- 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> attributes- 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> attributes- of a given entitylanguages- for which values should be read- Returns:
- attributes of a given entity and theirs values
- Throws:
SynchronizationPersistenceException
-
remove
public void remove(Item entity) throws SynchronizationPersistenceException, org.springframework.dao.RecoverableDataAccessException Description copied from interface:SynchronizationPersistenceAdapterRemoves a given entity- Specified by:
removein interfaceSynchronizationPersistenceAdapter<Item,ComposedType> - Throws:
SynchronizationPersistenceExceptionorg.springframework.dao.RecoverableDataAccessException
-
handleRemovalException
protected void handleRemovalException(Item itemToRemove, Throwable exception) throws SynchronizationPersistenceException, org.springframework.dao.RecoverableDataAccessException Override this method in order to rethrow aSynchronizationPersistenceExceptionorRecoverableSynchronizationPersistenceExceptionin certain situation so upper layer can abort or recover during removal.- Parameters:
itemToRemove-exception-- Throws:
SynchronizationPersistenceExceptionorg.springframework.dao.RecoverableDataAccessException
-
shouldRetry
Determines which exception should we consider as recoverable so upper layer (worker) can react accordingly.- Parameters:
exception-- Returns:
- true if exception is recoverable, otherwise returns false.
-
canIgnoreItemRemovedException
-
update
public void update(Item entity, Map.Entry<String, Object> attribute) 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> - Throws:
SynchronizationPersistenceException
-
update
public void update(Item entity, 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> - Throws:
SynchronizationPersistenceException
-
resetUnitOfWork
public void resetUnitOfWork()- Specified by:
resetUnitOfWorkin interfaceSynchronizationPersistenceAdapter<Item,ComposedType>
-
disableTransactions
public void disableTransactions()- Specified by:
disableTransactionsin interfaceSynchronizationPersistenceAdapter<Item,ComposedType>
-
clearTransactionsSettings
public void clearTransactionsSettings()- Specified by:
clearTransactionsSettingsin interfaceSynchronizationPersistenceAdapter<Item,ComposedType>
-
getCopyContext
-