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
PrdouctOptionValue s |
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, willHandleSecurity
public static String PRODUCT_OPTION_FIELD_PREFIX
protected CatalogService catalogService
public Boolean canHandleInspect(PersistencePackage persistencePackage)
canHandleInspect
in interface CustomPersistenceHandler
canHandleInspect
in class CustomPersistenceHandlerAdapter
public Boolean canHandleFetch(PersistencePackage persistencePackage)
canHandleFetch
in interface CustomPersistenceHandler
canHandleFetch
in class CustomPersistenceHandlerAdapter
public Boolean canHandleAdd(PersistencePackage persistencePackage)
canHandleAdd
in interface CustomPersistenceHandler
canHandleAdd
in class CustomPersistenceHandlerAdapter
public Boolean canHandleUpdate(PersistencePackage persistencePackage)
canHandleUpdate
in interface CustomPersistenceHandler
canHandleUpdate
in class CustomPersistenceHandlerAdapter
public DynamicResultSet inspect(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, InspectHelper helper) throws ServiceException
inspect
in interface CustomPersistenceHandler
inspect
in class CustomPersistenceHandlerAdapter
ServiceException
public DynamicResultSet fetch(PersistencePackage persistencePackage, com.anasoft.os.daofusion.cto.client.CriteriaTransferObject cto, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException
fetch
in interface CustomPersistenceHandler
fetch
in class CustomPersistenceHandlerAdapter
ServiceException
public Entity add(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException
add
in interface CustomPersistenceHandler
add
in class CustomPersistenceHandlerAdapter
ServiceException
public Entity update(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException
update
in interface CustomPersistenceHandler
update
in class CustomPersistenceHandlerAdapter
ServiceException
protected void associateProductOptionValuesToSku(Entity entity, Sku adminInstance, DynamicEntityDao dynamicEntityDao)
PrdouctOptionValue
sentity
- adminInstance
- protected Entity validateUniqueProductOptionValueCombination(Product product, List<Property> productOptionProperties, Sku currentSku)
ProductOptionValue
IDs is unique for the given Product
product
- productOptionValueIds
- currentSku
- - for update operations, this is the current Sku that is being updated; should be excluded from
attempting validationCopyright © 2013. All rights reserved.