public class PriceRulePersistenceManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
PriceRulePersistenceManager() |
Modifier and Type | Method and Description |
---|---|
static void |
deleteAllElementAttrByElementId(java.lang.String elementId)
Delete all element attributes by element id.
|
static void |
deleteElementChildrenByPriceRuleAndParentElement(java.lang.String aPriceRuleId,
java.lang.String aParentElementIdentifier)
This method deletes the children of specific element.
|
static com.ibm.commerce.price.rule.runtime.objects.PriceRuleElementObject[] |
findChildrenElementByPriceRuleAndParent(java.lang.String priceRuleId,
java.lang.String parentElementName)
Find the children elements by price rule id and parent element name.
|
static java.util.List |
findElementAttrListByElementId(java.lang.String elementId)
Find element attribute list by element id.
|
static java.util.Map |
findElementAttrMapByElementId(java.lang.String elementId)
Find the element attribute map by element id.
|
static com.ibm.commerce.price.rule.runtime.objects.PriceRuleElementObject |
findElementById(java.lang.String elementId)
Find element by the id.
|
static com.ibm.commerce.price.facade.server.entity.datatypes.Preletemplate |
findElementFormatById(java.lang.String elementTypeId)
Get price rule element template physical SDO by element id.
|
static java.lang.Long |
findElementFormatByNameAndType(java.lang.String elementFormatName,
java.lang.String formatGroup)
Get price rule element template physical SDO by element template name and
template group name.
|
static java.lang.String |
findElementIdByNameAndPriceRule(java.lang.String elementName,
java.lang.String priceRuleId)
This method gets the unique id of a price rule element based on the name
of the element and the price rule unique id.
|
static com.ibm.commerce.price.rule.runtime.objects.PriceRuleObject |
findPriceRuleById(java.lang.String priceRuleId)
Find the price rule by the price rule id.
|
static com.ibm.commerce.price.rule.runtime.objects.PriceRuleObject |
findPriceRuleByNameAndStore(java.lang.String priceRuleName)
Find price rule by name and store.
|
static com.ibm.commerce.price.rule.runtime.objects.PriceRuleObject |
findPriceRuleByNameAndStorePath(java.lang.String priceRuleName)
Find price rule by name and store path.
|
static com.ibm.commerce.price.rule.runtime.objects.PriceRuleElementObject |
findRootElementByPriceRule(java.lang.String priceRuleId)
Find the root element by price rule id.
|
static com.ibm.commerce.price.facade.server.entity.datatypes.Prelement |
getElement(PhysicalDataContainer pdc,
java.lang.String elementId)
Get price rule element physical SDO by
pdc and element id. |
static PhysicalDataContainer |
getElementContainer(java.lang.String elementId)
Get element container by element id.
|
static com.ibm.commerce.price.facade.server.entity.datatypes.Pricerule |
getPriceRule(PhysicalDataContainer pdc,
java.lang.String priceRuleId)
Get the price rule physical SDO by
pdc and price rule id. |
static PhysicalDataContainer |
getPriceRuleContainer(java.lang.String priceRuleId)
Get the price rule container.
|
static PhysicalDataContainer |
getPriceRuleContainerByName(java.lang.String priceRuleName)
Get price rule container by price rule name.
|
static com.ibm.commerce.price.rule.runtime.objects.PriceRuleElementObject |
populateElementFromSDO(com.ibm.commerce.price.facade.server.entity.datatypes.Prelement prelement)
Populate element object by physical SDO.
|
static void |
updatePriceRuleLastUpdate(java.lang.String priceRuleId)
This method is called by the mediators to update the LastUpdateTime
of a price rule.
|
public static final java.lang.String COPYRIGHT
public static com.ibm.commerce.price.rule.runtime.objects.PriceRuleObject findPriceRuleById(java.lang.String priceRuleId) throws DataMediatorException
priceRuleId
- The id of price rule. It can't be null or empty.DataMediatorException
public static PhysicalDataContainer getPriceRuleContainer(java.lang.String priceRuleId) throws DataMediatorException
priceRuleId
- The id of price rule. It can't be null or empty.DataMediatorException
public static PhysicalDataContainer getPriceRuleContainerByName(java.lang.String priceRuleName) throws DataMediatorException
priceRuleName
- The name of price rule. It can't be null or empty.DataMediatorException
public static com.ibm.commerce.price.facade.server.entity.datatypes.Pricerule getPriceRule(PhysicalDataContainer pdc, java.lang.String priceRuleId) throws DataMediatorException
pdc
and price rule id.pdc
- The physical data container. It can't be null.priceRuleId
- The id of price rule. It can't be null or empty.DataMediatorException
public static com.ibm.commerce.price.rule.runtime.objects.PriceRuleElementObject findElementById(java.lang.String elementId) throws DataMediatorException
elementId
- The id of element. It can't be null or empty.DataMediatorException
public static PhysicalDataContainer getElementContainer(java.lang.String elementId) throws DataMediatorException
elementId
- The id of element. It can't be null or empty.DataMediatorException
public static com.ibm.commerce.price.facade.server.entity.datatypes.Prelement getElement(PhysicalDataContainer pdc, java.lang.String elementId) throws DataMediatorException
pdc
and element id.pdc
- elementId
- The id of element. It can't be null or empty.DataMediatorException
public static java.lang.String findElementIdByNameAndPriceRule(java.lang.String elementName, java.lang.String priceRuleId)
elementName
- The name of a price rule element. It can't be null or empty.priceRuleId
- The id of the price rule associated with the element. It can't
be null or empty.public static com.ibm.commerce.price.facade.server.entity.datatypes.Preletemplate findElementFormatById(java.lang.String elementTypeId) throws DataMediatorException
elementTypeId
- The element template id. It can't be null or empty.DataMediatorException
public static java.lang.Long findElementFormatByNameAndType(java.lang.String elementFormatName, java.lang.String formatGroup) throws DataMediatorException
elementFormatName
- The name of element template. It can't be null or empty.formatGroup
- The template group of element. It can't be null or empty.DataMediatorException
public static java.util.Map findElementAttrMapByElementId(java.lang.String elementId) throws DataMediatorException
elementId
- The id of element. It can't be null or empty.DataMediatorException
public static java.util.List findElementAttrListByElementId(java.lang.String elementId) throws DataMediatorException
elementId
- The id of price rule. It can't be null or empty.DataMediatorException
public static void deleteAllElementAttrByElementId(java.lang.String elementId) throws DataMediatorException
elementId
- The id of price rule. It can't be null or empty.DataMediatorException
public static com.ibm.commerce.price.rule.runtime.objects.PriceRuleObject findPriceRuleByNameAndStore(java.lang.String priceRuleName) throws DataMediatorException
priceRuleName
- The name of price rule. It can't be null or empty.DataMediatorException
public static com.ibm.commerce.price.rule.runtime.objects.PriceRuleObject findPriceRuleByNameAndStorePath(java.lang.String priceRuleName) throws DataMediatorException
priceRuleName
- The name of price rule. It can't be null or empty.DataMediatorException
public static com.ibm.commerce.price.rule.runtime.objects.PriceRuleElementObject findRootElementByPriceRule(java.lang.String priceRuleId) throws DataMediatorException
priceRuleId
- The id of price rule. It can't be null or empty.DataMediatorException
public static com.ibm.commerce.price.rule.runtime.objects.PriceRuleElementObject[] findChildrenElementByPriceRuleAndParent(java.lang.String priceRuleId, java.lang.String parentElementName) throws DataMediatorException
priceRuleId
- The id of price rule. It can't be null or empty.parentElementName
- The name of parent element. It can't be null or empty.DataMediatorException
public static com.ibm.commerce.price.rule.runtime.objects.PriceRuleElementObject populateElementFromSDO(com.ibm.commerce.price.facade.server.entity.datatypes.Prelement prelement) throws DataMediatorException
prelement
- The element physical SDO. It can't be null.DataMediatorException
public static void deleteElementChildrenByPriceRuleAndParentElement(java.lang.String aPriceRuleId, java.lang.String aParentElementIdentifier)
aPriceRuleId
- The price rule id. It can't be null.aParentElementIdentifier
- The element identifier. It can't be null.public static void updatePriceRuleLastUpdate(java.lang.String priceRuleId) throws DataMediatorException
priceRuleId
- The ID of the price rule. It can't be null or empty.DataMediatorException