public class SkuCustomPersistenceHandler extends CustomPersistenceHandlerAdapter
| Modifier and Type | Field and Description |
|---|---|
protected CatalogService |
catalogService |
static String |
PRODUCT_OPTION_FIELD_PREFIX |
| Constructor and Description |
|---|
SkuCustomPersistenceHandler() |
| Modifier and Type | Method and Description |
|---|---|
Entity |
add(PersistencePackage persistencePackage,
DynamicEntityDao dynamicEntityDao,
RecordHelper helper) |
protected void |
associateProductOptionValuesToSku(Entity entity,
Sku adminInstance,
DynamicEntityDao dynamicEntityDao)
This initially removes all of the product option values that are currently related to the Sku and then re-associates
the
PrdouctOptionValues |
Boolean |
canHandleAdd(PersistencePackage persistencePackage) |
Boolean |
canHandleFetch(PersistencePackage persistencePackage) |
Boolean |
canHandleInspect(PersistencePackage persistencePackage) |
Boolean |
canHandleUpdate(PersistencePackage persistencePackage) |
DynamicResultSet |
fetch(PersistencePackage persistencePackage,
com.anasoft.os.daofusion.cto.client.CriteriaTransferObject cto,
DynamicEntityDao dynamicEntityDao,
RecordHelper helper) |
protected List<Property> |
getProductOptionProperties(Entity entity) |
DynamicResultSet |
inspect(PersistencePackage persistencePackage,
DynamicEntityDao dynamicEntityDao,
InspectHelper helper)
Build out the extra fields for the product options
|
Entity |
update(PersistencePackage persistencePackage,
DynamicEntityDao dynamicEntityDao,
RecordHelper helper) |
protected Entity |
validateUniqueProductOptionValueCombination(Product product,
List<Property> productOptionProperties,
Sku currentSku)
Ensures that the given list of
ProductOptionValue IDs is unique for the given Product |
canHandleRemove, remove, willHandleSecuritypublic static String PRODUCT_OPTION_FIELD_PREFIX
protected CatalogService catalogService
public Boolean canHandleInspect(PersistencePackage persistencePackage)
canHandleInspect in interface CustomPersistenceHandlercanHandleInspect in class CustomPersistenceHandlerAdapterpublic Boolean canHandleFetch(PersistencePackage persistencePackage)
canHandleFetch in interface CustomPersistenceHandlercanHandleFetch in class CustomPersistenceHandlerAdapterpublic Boolean canHandleAdd(PersistencePackage persistencePackage)
canHandleAdd in interface CustomPersistenceHandlercanHandleAdd in class CustomPersistenceHandlerAdapterpublic Boolean canHandleUpdate(PersistencePackage persistencePackage)
canHandleUpdate in interface CustomPersistenceHandlercanHandleUpdate in class CustomPersistenceHandlerAdapterpublic DynamicResultSet inspect(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, InspectHelper helper) throws ServiceException
inspect in interface CustomPersistenceHandlerinspect in class CustomPersistenceHandlerAdapterServiceExceptionpublic DynamicResultSet fetch(PersistencePackage persistencePackage, com.anasoft.os.daofusion.cto.client.CriteriaTransferObject cto, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException
fetch in interface CustomPersistenceHandlerfetch in class CustomPersistenceHandlerAdapterServiceExceptionpublic Entity add(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException
add in interface CustomPersistenceHandleradd in class CustomPersistenceHandlerAdapterServiceExceptionpublic Entity update(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException
update in interface CustomPersistenceHandlerupdate in class CustomPersistenceHandlerAdapterServiceExceptionprotected void associateProductOptionValuesToSku(Entity entity, Sku adminInstance, DynamicEntityDao dynamicEntityDao)
PrdouctOptionValuesentity - adminInstance - protected Entity validateUniqueProductOptionValueCombination(Product product, List<Property> productOptionProperties, Sku currentSku)
ProductOptionValue IDs is unique for the given Productproduct - productOptionValueIds - currentSku - - for update operations, this is the current Sku that is being updated; should be excluded from
attempting validationCopyright © 2013. All rights reserved.