Class DefaultPlatformObjectFacadeStrategy
- java.lang.Object
-
- com.hybris.backoffice.cockpitng.dataaccess.facades.object.DefaultPlatformObjectFacadeStrategy
-
- All Implemented Interfaces:
com.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler,com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeStrategy
- Direct Known Subclasses:
SAPRFCDestinationObjectFacadeStrategy
public class DefaultPlatformObjectFacadeStrategy extends java.lang.Object implements com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeStrategy
-
-
Constructor Summary
Constructors Constructor Description DefaultPlatformObjectFacadeStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanHandle(java.lang.Object object)protected booleancanPersistSingleElement(java.lang.Object value)<T> Tclone(T objectToClone, com.hybris.cockpitng.dataaccess.context.Context ctx)protected EnumerationValueModelconvert(HybrisEnumValue value)<T> Tcreate(java.lang.String typeId, com.hybris.cockpitng.dataaccess.context.Context ctx)<T> com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<T>delete(java.util.Collection<T> objects, com.hybris.cockpitng.dataaccess.context.Context ctx)<T> voiddelete(T object, com.hybris.cockpitng.dataaccess.context.Context ctx)protected <T> voidexecuteWithWorkflowTemplateActivation(java.util.function.Consumer<java.util.Collection<T>> consumer, java.util.Collection<T> toConsume, com.hybris.cockpitng.dataaccess.context.Context invocationCtx, java.util.function.Function<ItemModel,WorkflowTemplateActivationAction> actionMapper)com.hybris.cockpitng.dataaccess.facades.clone.CloneStrategyRegistrygetCloneStrategyRegistry()protected com.hybris.cockpitng.labels.LabelServicegetLabelService()java.lang.StringgetObjectId(java.lang.Object object)com.hybris.cockpitng.validation.ValidationHandlergetValidationHandler()<T> booleanisModified(T object)<T> booleanisNew(T object)<T> Tload(java.lang.String objectId, com.hybris.cockpitng.dataaccess.context.Context ctx)protected voidlogItemDeletion(java.util.Collection<?> deletedObjects)<T> Treload(T object, com.hybris.cockpitng.dataaccess.context.Context ctx)<T> com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<T>save(java.util.Collection<T> objects, com.hybris.cockpitng.dataaccess.context.Context ctx)Persist objects by given collection data.<T> Tsave(T objectToSave, com.hybris.cockpitng.dataaccess.context.Context ctx)voidsetCloneStrategyRegistry(com.hybris.cockpitng.dataaccess.facades.clone.CloneStrategyRegistry cloneStrategyRegistry)voidsetItemModificationHistoryService(ItemModificationHistoryService itemModificationHistoryService)voidsetLabelService(com.hybris.cockpitng.labels.LabelService labelService)voidsetModelService(ModelService modelService)voidsetPlatformFacadeStrategyHandleCache(PlatformFacadeStrategyHandleCache platformFacadeStrategyHandleCache)voidsetTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade)voidsetTypeService(TypeService typeService)voidsetValidationHandler(com.hybris.cockpitng.validation.ValidationHandler validationHandler)voidsetWorkflowTemplateActivationService(WorkflowTemplateActivationService workflowTemplateActivationService)
-
-
-
Method Detail
-
load
public <T> T load(java.lang.String objectId, com.hybris.cockpitng.dataaccess.context.Context ctx) throws com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectNotFoundException- Specified by:
loadin interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler- Throws:
com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectNotFoundException
-
delete
public <T> void delete(T object, com.hybris.cockpitng.dataaccess.context.Context ctx) throws com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectDeletionException- Specified by:
deletein interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler- Throws:
com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectDeletionException
-
delete
public <T> com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<T> delete(java.util.Collection<T> objects, com.hybris.cockpitng.dataaccess.context.Context ctx)- Specified by:
deletein interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
-
logItemDeletion
protected void logItemDeletion(java.util.Collection<?> deletedObjects)
-
create
public <T> T create(java.lang.String typeId, com.hybris.cockpitng.dataaccess.context.Context ctx) throws com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectCreationException- Specified by:
createin interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler- Throws:
com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectCreationException
-
save
public <T> T save(T objectToSave, com.hybris.cockpitng.dataaccess.context.Context ctx) throws com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectSavingException- Specified by:
savein interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler- Throws:
com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectSavingException
-
save
public <T> com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<T> save(java.util.Collection<T> objects, com.hybris.cockpitng.dataaccess.context.Context ctx)Persist objects by given collection data. Since 1808 this method is transactional.- Specified by:
savein interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler- Parameters:
objects- the data for updating objects in system. Each object is saved separately in a dedicated transaction.ctx- context specifying the loaded attributes of the returned object as well as application settings- Returns:
- ObjectFacadeOperationResult object
-
clone
public <T> T clone(T objectToClone, com.hybris.cockpitng.dataaccess.context.Context ctx) throws com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectCloningException- Specified by:
clonein interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler- Throws:
com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectCloningException
-
executeWithWorkflowTemplateActivation
protected <T> void executeWithWorkflowTemplateActivation(java.util.function.Consumer<java.util.Collection<T>> consumer, java.util.Collection<T> toConsume, com.hybris.cockpitng.dataaccess.context.Context invocationCtx, java.util.function.Function<ItemModel,WorkflowTemplateActivationAction> actionMapper)
-
canPersistSingleElement
protected boolean canPersistSingleElement(java.lang.Object value)
-
isNew
public <T> boolean isNew(T object)
- Specified by:
isNewin interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
-
isModified
public <T> boolean isModified(T object)
- Specified by:
isModifiedin interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
-
reload
public <T> T reload(T object, com.hybris.cockpitng.dataaccess.context.Context ctx) throws com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectNotFoundException- Specified by:
reloadin interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler- Throws:
com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectNotFoundException
-
convert
protected EnumerationValueModel convert(HybrisEnumValue value)
-
canHandle
public boolean canHandle(java.lang.Object object)
- Specified by:
canHandlein interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeStrategy
-
getObjectId
public java.lang.String getObjectId(java.lang.Object object)
- Specified by:
getObjectIdin interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
-
getLabelService
protected com.hybris.cockpitng.labels.LabelService getLabelService()
-
setLabelService
public void setLabelService(com.hybris.cockpitng.labels.LabelService labelService)
-
setModelService
public void setModelService(ModelService modelService)
-
setTypeService
public void setTypeService(TypeService typeService)
-
setPlatformFacadeStrategyHandleCache
public void setPlatformFacadeStrategyHandleCache(PlatformFacadeStrategyHandleCache platformFacadeStrategyHandleCache)
-
setItemModificationHistoryService
public void setItemModificationHistoryService(ItemModificationHistoryService itemModificationHistoryService)
-
setTypeFacade
public void setTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade)
-
setWorkflowTemplateActivationService
public void setWorkflowTemplateActivationService(WorkflowTemplateActivationService workflowTemplateActivationService)
-
getValidationHandler
public com.hybris.cockpitng.validation.ValidationHandler getValidationHandler()
-
setValidationHandler
public void setValidationHandler(com.hybris.cockpitng.validation.ValidationHandler validationHandler)
-
getCloneStrategyRegistry
public com.hybris.cockpitng.dataaccess.facades.clone.CloneStrategyRegistry getCloneStrategyRegistry()
-
setCloneStrategyRegistry
public void setCloneStrategyRegistry(com.hybris.cockpitng.dataaccess.facades.clone.CloneStrategyRegistry cloneStrategyRegistry)
-
-