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
public class DefaultPlatformObjectFacadeStrategy
extends Object
implements com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeStrategy
-
Field Summary
FieldsFields inherited from interface com.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
OBJECT_CREATED_EVENT, OBJECTS_DELETED_EVENT, OBJECTS_UPDATED_EVENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected booleancanPersistSingleElement(Object value) <T> Tclone(T objectToClone, com.hybris.cockpitng.dataaccess.context.Context ctx) protected EnumerationValueModelconvert(HybrisEnumValue value) <T> T<T> com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<T>delete(Collection<T> objects, com.hybris.cockpitng.dataaccess.context.Context ctx) <T> voiddelete(T object, com.hybris.cockpitng.dataaccess.context.Context ctx) protected <T> voidexecuteWithWorkflowTemplateActivation(Consumer<Collection<T>> consumer, Collection<T> toConsume, com.hybris.cockpitng.dataaccess.context.Context invocationCtx, Function<ItemModel, WorkflowTemplateActivationAction> actionMapper) com.hybris.cockpitng.dataaccess.facades.clone.CloneStrategyRegistryprotected com.hybris.cockpitng.labels.LabelServiceprotected ModelServicegetObjectId(Object object) protected TypeServicecom.hybris.cockpitng.validation.ValidationHandler<T> booleanisDeleted(T object) <T> booleanisModified(T object) <T> booleanisNew(T object) <T> Tprotected voidlogItemDeletion(Collection<?> deletedObjects) <T> Treload(T object, com.hybris.cockpitng.dataaccess.context.Context ctx) <T> com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<T>save(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) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
reload
-
Field Details
-
CTX_PARAM_RESOLVE_ENUMERATIONS
- See Also:
-
-
Constructor Details
-
DefaultPlatformObjectFacadeStrategy
public DefaultPlatformObjectFacadeStrategy()
-
-
Method Details
-
load
public <T> T load(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(Collection<T> objects, com.hybris.cockpitng.dataaccess.context.Context ctx) - Specified by:
deletein interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
-
logItemDeletion
-
create
public <T> T create(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(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(Consumer<Collection<T>> consumer, Collection<T> toConsume, com.hybris.cockpitng.dataaccess.context.Context invocationCtx, Function<ItemModel, WorkflowTemplateActivationAction> actionMapper) -
canPersistSingleElement
-
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
-
isDeleted
public <T> boolean isDeleted(T object) - Specified by:
isDeletedin 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
-
canHandle
- Specified by:
canHandlein interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeStrategy
-
getObjectId
- Specified by:
getObjectIdin interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
-
getLabelService
protected com.hybris.cockpitng.labels.LabelService getLabelService() -
getTypeService
-
getModelService
-
setLabelService
public void setLabelService(com.hybris.cockpitng.labels.LabelService labelService) -
setModelService
-
setTypeService
-
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)
-