@Component(value="blAdminInventoryPersister") public class AdminInventoryPersister extends Object
InventoryCustomPersistenceHandler#update() method.| Modifier and Type | Field and Description |
|---|---|
protected AdvancedInventoryDao |
inventoryDao |
protected AdvancedInventoryService |
inventoryService |
| Constructor and Description |
|---|
AdminInventoryPersister() |
| Modifier and Type | Method and Description |
|---|---|
protected Inventory |
populateInventory(Inventory adminInstance,
org.broadleafcommerce.openadmin.dto.Entity entity,
Map<String,org.broadleafcommerce.openadmin.dto.FieldMetadata> inventoryProperties,
org.broadleafcommerce.openadmin.server.service.persistence.module.RecordHelper helper)
Attempts to populate the given Inventory instance with the merged properties from the admin.
|
Inventory |
saveAdminInventory(Long inventoryId,
org.broadleafcommerce.openadmin.dto.Entity entity,
Map<String,org.broadleafcommerce.openadmin.dto.FieldMetadata> adminProperties,
org.broadleafcommerce.openadmin.server.service.persistence.module.RecordHelper helper)
Creates a new transaction and attempts a read, populate, update within the transaction.
|
protected AdvancedInventoryDao inventoryDao
protected AdvancedInventoryService inventoryService
@Transactional(propagation=REQUIRES_NEW,
value="blTransactionManager",
rollbackFor={org.broadleafcommerce.core.inventory.service.InventoryUnavailableException.class,ConcurrentInventoryModificationException.class})
public Inventory saveAdminInventory(Long inventoryId,
org.broadleafcommerce.openadmin.dto.Entity entity,
Map<String,org.broadleafcommerce.openadmin.dto.FieldMetadata> adminProperties,
org.broadleafcommerce.openadmin.server.service.persistence.module.RecordHelper helper)
throws ConcurrentInventoryModificationException,
NumberFormatException,
IllegalAccessException,
InvocationTargetException,
NoSuchMethodException,
ParseException,
InstantiationException,
ClassNotFoundException,
org.broadleafcommerce.openadmin.server.service.ValidationException
ConcurrentModificationException. All other exceptions are thrown as a result of attempting to
populate the Inventory object from the adminProperties passed in.inventory - entity - adminProperties - helper - ConcurrentInventoryModificationExceptionClassNotFoundExceptionInstantiationExceptionParseExceptionNoSuchMethodExceptionInvocationTargetExceptionIllegalAccessExceptionNumberFormatExceptionorg.broadleafcommerce.openadmin.server.service.ValidationExceptionprotected Inventory populateInventory(Inventory adminInstance, org.broadleafcommerce.openadmin.dto.Entity entity, Map<String,org.broadleafcommerce.openadmin.dto.FieldMetadata> inventoryProperties, org.broadleafcommerce.openadmin.server.service.persistence.module.RecordHelper helper) throws NumberFormatException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, ParseException, InstantiationException, ClassNotFoundException, org.broadleafcommerce.openadmin.server.service.ValidationException
adminInstance - entity - inventoryProperties - helper - NumberFormatExceptionIllegalAccessExceptionInvocationTargetExceptionNoSuchMethodExceptionParseExceptionInstantiationExceptionClassNotFoundExceptionorg.broadleafcommerce.openadmin.server.service.ValidationExceptionCopyright © 2020. All rights reserved.