public class PriceRow extends GeneratedPriceRow
return_price =
price / unitFactor . P + C > P + UG > PG + C > PG + UG > PG > UG .
The best value have rules where both product and user match, the least the rule which does not match directly but
with all-fields. GenericItem.GenericItemImplLocalizableItem.LocalizableItemImplExtensibleItem.ExtensibleItemImplItem.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException| Modifier and Type | Field and Description |
|---|---|
static String |
MIN_QUANTITY
Deprecated.
|
static String |
PRICEROW |
static String |
UNIT_FACTOR
Deprecated.
|
CATALOGVERSION, CHANNEL, CURRENCY, DEFAULT_INITIAL_ATTRIBUTES, GIVEAWAYPRICE, MATCHVALUE, MINQTD, NET, PRICE, PRODUCTHANDLER, UNIT, UNITFACTORALL_PRODUCT_GROUPS, ALL_PRODUCTS, ALL_USER_GROUPS, ALL_USERS, DATE_RANGE, DATERANGE, END_TIME, START_TIMEENDTIME, PG, PRODUCT, PRODUCTID, PRODUCTMATCHQUALIFIER, STARTTIME, UG, USER, USERMATCHQUALIFIERLANGUAGE_FALLBACK_ENABLED_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPEimpl, tenant| Constructor and Description |
|---|
PriceRow() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
calculateMatchValue(Product product,
EnumerationValue productGroup,
User user,
EnumerationValue userGroup)
Deprecated.
|
protected int |
calculateMatchValue(Product product,
String productCode,
EnumerationValue productGroup,
User user,
EnumerationValue userGroup) |
protected Item |
createItem(SessionContext ctx,
ComposedType type,
Item.ItemAttributeMap allAttributes)
Has to be implemented for each concrete subtype of item.
|
long |
getMinQuantity()
The minimal quantity of products for which this rule applies the first time.
|
long |
getMinQuantity(SessionContext ctx)
See
getMinQuantity(). |
EnumerationValue |
getProductGroup(SessionContext ctx)
|
EnumerationValue |
getUserGroup(SessionContext ctx)
|
void |
setCurrency(SessionContext ctx,
Currency value)
Generated method - Setter of the
PriceRow.currency attribute. |
void |
setMinqtd(SessionContext ctx,
Long value)
Generated method - Setter of the
PriceRow.minqtd attribute. |
void |
setMinQuantity(long minQtd)
Sets the minimal quantity of products for which this rule applies for the first time.If more than one rule
matches and have the same value, the one with the greatest quantity is chosen.
|
void |
setMinQuantity(SessionContext ctx,
long minQtd)
Same as
setMinQuantity(long) but with specific SessionContext. |
protected void |
setPg(SessionContext ctx,
EnumerationValue value)
Whenever a non-null PG is set the product attribute is cleared.
|
void |
setPrice(SessionContext ctx,
Double value)
Generated method - Setter of the
PriceRow.price attribute. |
protected void |
setProduct(SessionContext ctx,
Product value)
Whenever a non-null product is set the PG attribute is cleared.
|
void |
setProductId(SessionContext ctx,
String value)
Generated method - Setter of the
PDTRow.productId attribute. |
void |
setUg(SessionContext ctx,
EnumerationValue value)
Whenever a non-null UG is set the user attribute is cleared.
|
void |
setUnit(SessionContext ctx,
Unit value)
Generated method - Setter of the
PriceRow.unit attribute. |
void |
setUnitFactor(SessionContext ctx,
Integer value)
Generated method - Setter of the
PriceRow.unitFactor attribute. |
void |
setUser(SessionContext ctx,
User value)
Whenever a non-null user is set the UG attribute is cleared.
|
protected void |
updateMatchValue() |
getCatalogVersion, getCatalogVersion, getChannel, getChannel, getCurrency, getCurrency, getDefaultAttributeModes, getMatchValue, getMatchValue, getMatchValueAsPrimitive, getMatchValueAsPrimitive, getMinqtd, getMinqtd, getMinqtdAsPrimitive, getMinqtdAsPrimitive, getPrice, getPrice, getPriceAsPrimitive, getPriceAsPrimitive, getUnit, getUnit, getUnitFactor, getUnitFactor, getUnitFactorAsPrimitive, getUnitFactorAsPrimitive, isGiveAwayPrice, isGiveAwayPrice, isGiveAwayPriceAsPrimitive, isGiveAwayPriceAsPrimitive, isNet, isNet, isNetAsPrimitive, isNetAsPrimitive, setCatalogVersion, setCatalogVersion, setChannel, setChannel, setCurrency, setGiveAwayPrice, setGiveAwayPrice, setGiveAwayPrice, setGiveAwayPrice, setMatchValue, setMatchValue, setMatchValue, setMatchValue, setMinqtd, setMinqtd, setMinqtd, setNet, setNet, setNet, setNet, setPrice, setPrice, setPrice, setUnit, setUnitFactor, setUnitFactor, setUnitFactorgetCustomer, getCustomer, getCustomerGroup, getCustomerGroup, getCustomerPriceGroup, getCustomerPriceGroup, getDateRange, getDateRange, getInitialProductMatchField, getInitialUserMatchField, getProductGroup, getProductPriceGroup, getProductPriceGroup, getUserGroup, markProductModified, remove, removeLinks, setDateRange, setDateRange, setProductMatchQualifier, setProperty, setUserMatchQualifier, updateProductMatchField, updateUserMatchFieldgetEndTime, getEndTime, getPg, getPg, getProduct, getProduct, getProductId, getProductId, getProductMatchQualifier, getProductMatchQualifier, getProductMatchQualifierAsPrimitive, getProductMatchQualifierAsPrimitive, getStartTime, getStartTime, getUg, getUg, getUser, getUser, getUserMatchQualifier, getUserMatchQualifier, getUserMatchQualifierAsPrimitive, getUserMatchQualifierAsPrimitive, setEndTime, setEndTime, setPg, setProduct, setProductId, setProductMatchQualifier, setProductMatchQualifier, setProductMatchQualifier, setStartTime, setStartTime, setUg, setUser, setUserMatchQualifier, setUserMatchQualifier, setUserMatchQualifiergetInitialProperties, getNonInitialAttributesgetAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertycreateNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setPropertyaddLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, checkRemovable, clearPermission, compareTo, ctx, doAfterRemove, doBeforeRemove, equals, getAccessorFor, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributesInternal, getAllLinkedItems, getAndCheckCacheBoundItem, getAttribute, getAttribute, getCacheBoundItem, getComposedType, getComposedTypePK, getCreationTime, getCurrentlyRemovingCount, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItemsCount, getLinkedItemsCount, getLinkedItemsCount, getModificationTime, getNegativePermissions, getOwner, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, readResolve, refreshRemote, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, removeItemCollection, removeItemCollection, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinkedItems, removePartOfItems, removePartOfItems, setAllAttributes, setAllAttributes, setAllAttributesInternal, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAttribute, setAttribute, setAttributeFromString, setAttributeFromString, setCacheBound, setComposedType, setCreationTime, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setModificationTime, setNonInitialAttributes, setOwner, setPermissionsByMap, setTransientObject, setUseTA, toString, useTA, writeReplacegetImplementation, setTenant@Deprecated public static final String MIN_QUANTITY
@Deprecated public static final String UNIT_FACTOR
public static final String PRICEROW
@Deprecated protected int calculateMatchValue(Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup)
calculateMatchValue(Product, String, EnumerationValue, User, EnumerationValue)
insteadprotected int calculateMatchValue(Product product, String productCode, EnumerationValue productGroup, User user, EnumerationValue userGroup)
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
ItemComposedType.newInstance(Map).
In case this method uses any of the attribute values during creation it is required to override
Item.getNonInitialAttributes(SessionContext, ItemAttributeMap) too.
Sn example:
public static final String MY_ATTRIBUTE = "someAttribute"; ... protected Item createItem(SessionContext
ctx, ComposedType type, Map allAttributes ) throws JaloBusinessException { MyManager man = ... return
man.createMyItem( (String)allAttributes.get(MY_ATTRIBUTE) );
// here MY_ATTRIBUTE is used for creation, so it must not be set again } protected Map getNonInitialAttributes(
SessionContext ctx, Map allAttributes ) { // let superclass remove its own initial attributes Map ret =
super.getNonInitialAttributes( ctx, allAttributes );
// remove MY_ATTRIBUTE from all attributes since if has already been set ret.remove(MY_ATTRIBUTE); return ret; }
createItem in class GeneratedPriceRowctx - the current session context which this item is created withintype - the actual item type ( since subtypes may not provide a own jalo class this may be different from the
type which this method was implemented for )JaloBusinessException - indicates an error during creation - any changes will be rollbackedpublic EnumerationValue getProductGroup(SessionContext ctx)
PDTRowgetProductGroup in class PDTRowpublic EnumerationValue getUserGroup(SessionContext ctx)
PDTRowgetUserGroup in class PDTRowprotected void updateMatchValue()
protected void setPg(SessionContext ctx, EnumerationValue value)
PDTRowpublic void setUg(SessionContext ctx, EnumerationValue value)
PDTRowprotected void setProduct(SessionContext ctx, Product value)
PDTRowsetProduct in class PDTRowvalue - the productpublic void setUser(SessionContext ctx, User value)
PDTRowpublic void setProductId(SessionContext ctx, String value)
GeneratedPDTRowPDTRow.productId attribute.setProductId in class PDTRowvalue - the productIdpublic void setCurrency(SessionContext ctx, Currency value)
GeneratedPriceRowPriceRow.currency attribute.setCurrency in class GeneratedPriceRowvalue - the currencypublic long getMinQuantity()
public long getMinQuantity(SessionContext ctx)
getMinQuantity().ctx - public void setMinQuantity(long minQtd)
throws JaloPriceFactoryException
minQtd - JaloPriceFactoryExceptionpublic void setMinQuantity(SessionContext ctx, long minQtd) throws JaloPriceFactoryException
setMinQuantity(long) but with specific SessionContext.ctx - minQtd - JaloPriceFactoryExceptionpublic void setMinqtd(SessionContext ctx, Long value)
GeneratedPriceRowPriceRow.minqtd attribute.setMinqtd in class GeneratedPriceRowvalue - the minqtdpublic void setPrice(SessionContext ctx, Double value)
GeneratedPriceRowPriceRow.price attribute.setPrice in class GeneratedPriceRowvalue - the pricepublic void setUnitFactor(SessionContext ctx, Integer value)
GeneratedPriceRowPriceRow.unitFactor attribute.setUnitFactor in class GeneratedPriceRowvalue - the unitFactorpublic void setUnit(SessionContext ctx, Unit value)
GeneratedPriceRowPriceRow.unit attribute.setUnit in class GeneratedPriceRowvalue - the unitCopyright © 2017 SAP SE. All Rights Reserved.