public class CachedPromotionResult extends GeneratedCachedPromotionResult implements JaloOnlyItem
GenericItem.GenericItemImplLocalizableItem.LocalizableItemImplExtensibleItem.ExtensibleItemImplItem.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationExceptionCACHEDACTIONS, CACHEDCONSUMEDENTRIES, DEFAULT_INITIAL_ATTRIBUTESACTIONS, ALLPROMOTIONACTIONS, ALLPROMOTIONACTIONSHANDLER, CERTAINTY, CONSUMEDENTRIES, CUSTOM, ORDER, ORDERHANDLER, PROMOTIONLANGUAGE_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 |
|---|
CachedPromotionResult() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAction(SessionContext ctx,
AbstractPromotionAction action)
Adds an action to the promotion results.
|
void |
addConsumedEntry(SessionContext ctx,
PromotionOrderEntryConsumed poec)
Adds a consumed entry to the current result.
|
void |
addToAllPromotionActions(SessionContext ctx,
AbstractPromotionAction action)
Generated method - Adds
value to allPromotionActions. |
void |
addToCachedActions(SessionContext ctx,
AbstractPromotionAction action) |
void |
addToCachedConsumedEntries(SessionContext ctx,
CachedPromotionOrderEntryConsumed poec) |
protected Item |
createItem(SessionContext ctx,
ComposedType type,
Item.ItemAttributeMap allAttributes)
Has to be implemented for each concrete subtype of item.
|
Object |
doGetAttribute(SessionContext ctx,
String attrQualifier)
Custom attribute access as part of
JaloOnlyItem contract. |
void |
doSetAttribute(SessionContext ctx,
String attrQualifier,
Object value)
Custom attribute access as part of
JaloOnlyItem contract. |
Collection<AbstractPromotionAction> |
getActions(SessionContext ctx)
Gets the collection of
AbstractPromotionAction instances. |
Set<AbstractPromotionAction> |
getAllPromotionActions(SessionContext ctx)
Generated method - Getter of the
PromotionResult.allPromotionActions attribute. |
Collection<AbstractPromotionAction> |
getCachedActions(SessionContext ctx)
Generated method - Getter of the
CachedPromotionResult.cachedActions attribute. |
Collection<CachedPromotionOrderEntryConsumed> |
getCachedConsumedEntries(SessionContext sessionContext)
Generated method - Getter of the
CachedPromotionResult.cachedConsumedEntries attribute. |
Float |
getCertainty(SessionContext ctx)
Generated method - Getter of the
PromotionResult.certainty attribute. |
Collection<PromotionOrderEntryConsumed> |
getConsumedEntries(SessionContext ctx)
Gets the collection of
PromotionOrderEntryConsumed consumed. |
String |
getCustom(SessionContext ctx)
Generated method - Getter of the
PromotionResult.custom attribute. |
AbstractOrder |
getOrder(SessionContext ctx)
Generated method - Getter of the
PromotionResult.order attribute. |
AbstractPromotion |
getPromotion(SessionContext ctx)
Generated method - Getter of the
PromotionResult.promotion attribute. |
ComposedType |
provideComposedType()
Provides composed as part of
JaloOnlyItem contract. |
Date |
provideCreationTime()
Provides creation time as part of
JaloOnlyItem contract. |
Date |
provideModificationTime()
Provides modification time as part of
JaloOnlyItem contract. |
PK |
providePK()
Provides PK part of
JaloOnlyItem contract. |
void |
removeConsumedEntry(SessionContext ctx,
PromotionOrderEntryConsumed poec)
Removes a consumed entry from the current result.
|
void |
removeFromAllPromotionActions(SessionContext ctx,
AbstractPromotionAction action)
Generated method - Removes
value from allPromotionActions. |
void |
removeFromCachedActions(SessionContext ctx,
AbstractPromotionAction action) |
void |
removeFromCachedConsumedEntries(SessionContext ctx,
CachedPromotionOrderEntryConsumed poec) |
void |
removeJaloOnly()
Custom removal logic as part of
JaloOnlyItem contract. |
void |
setActions(SessionContext ctx,
Collection actions)
Sets the collection of
AbstractPromotionAction instance. |
void |
setAllPromotionActions(SessionContext ctx,
Set<AbstractPromotionAction> actions)
Generated method - Setter of the
PromotionResult.allPromotionActions attribute. |
void |
setCachedActions(SessionContext ctx,
Collection<AbstractPromotionAction> abstractPromotionActions)
Generated method - Setter of the
CachedPromotionResult.cachedActions attribute. |
void |
setCachedConsumedEntries(SessionContext ctx,
Collection<CachedPromotionOrderEntryConsumed> cachedConsumedEntries)
Generated method - Setter of the
CachedPromotionResult.cachedConsumedEntries attribute. |
void |
setCertainty(SessionContext ctx,
Float certainty)
Generated method - Setter of the
PromotionResult.certainty attribute. |
void |
setConsumedEntries(SessionContext ctx,
Collection entries)
Sets the collection of
PromotionOrderEntryConsumed consumed. |
void |
setCustom(SessionContext ctx,
String custom)
Generated method - Setter of the
PromotionResult.custom attribute. |
void |
setOrder(SessionContext ctx,
AbstractOrder order)
Generated method - Setter of the
PromotionResult.order attribute. |
void |
setPromotion(SessionContext ctx,
AbstractPromotion promotion)
Generated method - Setter of the
PromotionResult.promotion attribute. |
getCachedActions, getCachedConsumedEntries, getDefaultAttributeModes, setCachedActions, setCachedConsumedEntriesapply, apply, deepCloneAllActions, deepCloneConsumedEntriesAndAttachToOrder, deepCloneConsumedEntryAndAttachToOrder, findOrderEntryWithEntryNumber, getConsumedCount, getConsumedCount, getCouldFire, getCouldFire, getDataUnigueKey, getDescription, getDescription, getDescription, getFired, getFired, getTotalDiscount, getTotalDiscount, isApplied, isApplied, isAppliedToOrder, isValid, remove, transferToOrder, undo, undoaddToAllPromotionActions, getActions, getAllPromotionActions, getCertainty, getCertaintyAsPrimitive, getCertaintyAsPrimitive, getConsumedEntries, getCustom, getOrder, getPromotion, removeFromAllPromotionActions, setActions, setAllPromotionActions, setCertainty, setCertainty, setCertainty, setConsumedEntries, setCustom, setOrder, setPromotiongetInitialProperties, 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, setProperty, 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, removeLinks, 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, setTenantprotected 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 GeneratedPromotionResultctx - 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 Float getCertainty(SessionContext ctx)
GeneratedPromotionResultPromotionResult.certainty attribute.getCertainty in class GeneratedPromotionResultpublic void setCertainty(SessionContext ctx, Float certainty)
GeneratedPromotionResultPromotionResult.certainty attribute.setCertainty in class GeneratedPromotionResultcertainty - the certainty - Certaintypublic String getCustom(SessionContext ctx)
GeneratedPromotionResultPromotionResult.custom attribute.getCustom in class GeneratedPromotionResultpublic void setCustom(SessionContext ctx, String custom)
GeneratedPromotionResultPromotionResult.custom attribute.setCustom in class GeneratedPromotionResultcustom - the custom - Custom data stored on this promotion result by the promotion.public AbstractOrder getOrder(SessionContext ctx)
GeneratedPromotionResultPromotionResult.order attribute.getOrder in class GeneratedPromotionResultpublic void setOrder(SessionContext ctx, AbstractOrder order)
GeneratedPromotionResultPromotionResult.order attribute.setOrder in class GeneratedPromotionResultorder - the orderpublic AbstractPromotion getPromotion(SessionContext ctx)
GeneratedPromotionResultPromotionResult.promotion attribute.getPromotion in class GeneratedPromotionResultpublic void setPromotion(SessionContext ctx, AbstractPromotion promotion)
GeneratedPromotionResultPromotionResult.promotion attribute.setPromotion in class GeneratedPromotionResultpromotion - the promotion - The promotionpublic void addAction(SessionContext ctx, AbstractPromotionAction action)
PromotionResultaddAction in class PromotionResultctx - The hybris contextaction - The action to addpublic Collection<AbstractPromotionAction> getActions(SessionContext ctx)
PromotionResultAbstractPromotionAction instances.getActions in class PromotionResultctx - The hybris session contextAbstractPromotionAction instances attached to this result.public void setActions(SessionContext ctx, Collection actions)
PromotionResultAbstractPromotionAction instance.
The AbstractPromotionAction instances associated with this promotion result are owned (and part of) this
result. They cannot belong to another instance, therefore when setting the collection any
AbstractPromotionAction instances previously associated with this result, that are no longer associated
are deleted from the database.setActions in class PromotionResultctx - The hybris session contextactions - the collection of actionspublic Set<AbstractPromotionAction> getAllPromotionActions(SessionContext ctx)
GeneratedPromotionResultPromotionResult.allPromotionActions attribute.getAllPromotionActions in class GeneratedPromotionResultpublic void setAllPromotionActions(SessionContext ctx, Set<AbstractPromotionAction> actions)
GeneratedPromotionResultPromotionResult.allPromotionActions attribute.setAllPromotionActions in class GeneratedPromotionResultactions - the allPromotionActionspublic void addToAllPromotionActions(SessionContext ctx, AbstractPromotionAction action)
GeneratedPromotionResultvalue to allPromotionActions.addToAllPromotionActions in class GeneratedPromotionResultaction - the item to add to allPromotionActionspublic void removeFromAllPromotionActions(SessionContext ctx, AbstractPromotionAction action)
GeneratedPromotionResultvalue from allPromotionActions.removeFromAllPromotionActions in class GeneratedPromotionResultaction - the item to remove from allPromotionActionspublic Collection<AbstractPromotionAction> getCachedActions(SessionContext ctx)
GeneratedCachedPromotionResultCachedPromotionResult.cachedActions attribute.getCachedActions in class GeneratedCachedPromotionResultpublic void setCachedActions(SessionContext ctx, Collection<AbstractPromotionAction> abstractPromotionActions)
GeneratedCachedPromotionResultCachedPromotionResult.cachedActions attribute.setCachedActions in class GeneratedCachedPromotionResultabstractPromotionActions - the cachedActions - Cached list of actionspublic void addToCachedActions(SessionContext ctx, AbstractPromotionAction action)
public void removeFromCachedActions(SessionContext ctx, AbstractPromotionAction action)
public Collection<CachedPromotionOrderEntryConsumed> getCachedConsumedEntries(SessionContext sessionContext)
GeneratedCachedPromotionResultCachedPromotionResult.cachedConsumedEntries attribute.getCachedConsumedEntries in class GeneratedCachedPromotionResultpublic void setCachedConsumedEntries(SessionContext ctx, Collection<CachedPromotionOrderEntryConsumed> cachedConsumedEntries)
GeneratedCachedPromotionResultCachedPromotionResult.cachedConsumedEntries attribute.setCachedConsumedEntries in class GeneratedCachedPromotionResultcachedConsumedEntries - the cachedConsumedEntries - Cached list of consumed entriespublic void addToCachedConsumedEntries(SessionContext ctx, CachedPromotionOrderEntryConsumed poec)
public void removeFromCachedConsumedEntries(SessionContext ctx, CachedPromotionOrderEntryConsumed poec)
public void addConsumedEntry(SessionContext ctx, PromotionOrderEntryConsumed poec)
PromotionResultaddConsumedEntry in class PromotionResultctx - the hybris contextpoec - the entry to addpublic void removeConsumedEntry(SessionContext ctx, PromotionOrderEntryConsumed poec)
PromotionResultremoveConsumedEntry in class PromotionResultctx - the hybris contextpoec - the entry to removepublic Collection<PromotionOrderEntryConsumed> getConsumedEntries(SessionContext ctx)
PromotionResultPromotionOrderEntryConsumed consumed.getConsumedEntries in class PromotionResultctx - The hybris session contextPromotionOrderEntryConsumed consumed by this result.public void setConsumedEntries(SessionContext ctx, Collection entries)
PromotionResultPromotionOrderEntryConsumed consumed.
The PromotionOrderEntryConsumed instances associated with this promotion result are owned (and part of)
this result. They cannot belong to another instance, therefore when setting the collection any
PromotionOrderEntryConsumed instances previously associated with this result, that are no longer
associated are deleted from the database.setConsumedEntries in class PromotionResultctx - The hybris session contextentries - the collection of consumed entriespublic final ComposedType provideComposedType()
JaloOnlyItem contract. Never call directlyprovideComposedType in interface JaloOnlyItempublic final Date provideCreationTime()
JaloOnlyItem contract. Never call directlyprovideCreationTime in interface JaloOnlyItempublic final Date provideModificationTime()
JaloOnlyItem contract. Never call directlyprovideModificationTime in interface JaloOnlyItempublic final PK providePK()
JaloOnlyItem contract. Never call directlyprovidePK in interface JaloOnlyItempublic void removeJaloOnly()
throws ConsistencyCheckException
JaloOnlyItem contract. Never call directlyremoveJaloOnly in interface JaloOnlyItemConsistencyCheckException - to signal that this item removal failedpublic Object doGetAttribute(SessionContext ctx, String attrQualifier) throws JaloInvalidParameterException, JaloSecurityException
JaloOnlyItem contract. Never call directlydoGetAttribute in interface JaloOnlyItemctx - the session contextattrQualifier - the qualifier of the requested attributeJaloInvalidParameterException - in case no value could be read for this attributeJaloSecurityExceptionpublic void doSetAttribute(SessionContext ctx, String attrQualifier, Object value) throws JaloInvalidParameterException, JaloSecurityException, JaloBusinessException
JaloOnlyItem contract. Never call directlydoSetAttribute in interface JaloOnlyItemctx - the session contextattrQualifier - the qualifier of the requested attributevalue - the new attribute valueJaloInvalidParameterException - in case the value could not be written for this attributeJaloSecurityException - in case the session user is not allowed to write this attributeJaloBusinessException - in case any other error occuredCopyright © 2017 SAP SE. All Rights Reserved.