public class InMemoryCartEntry extends GeneratedInMemoryCartEntry implements JaloOnlyItem
CartEntry implementation required by InMemoryCart. This item is not backed by
database and exists only inside its owning cart. Apart from that it can be used as normal cart entry.InMemoryCart,
Serialized FormGenericItem.GenericItemImplLocalizableItem.LocalizableItemImplExtensibleItem.ExtensibleItemImplItem.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationExceptionDEFAULT_INITIAL_ATTRIBUTES, ORDERHANDLERDISCOUNTVALUES, ENTRY_NUMBER, TAXVALUESBASEPRICE, CALCULATED, DISCOUNTVALUESINTERNAL, ENTRYNUMBER, GIVEAWAY, INFO, ORDER, PRODUCT, QUANTITY, REJECTED, TAXVALUESINTERNAL, TOTALPRICE, UNITLANGUAGE_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 |
|---|
InMemoryCartEntry() |
| Modifier and Type | Method and Description |
|---|---|
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. |
Double |
getBasePrice(SessionContext ctx)
Overwritten to provide in-memory implementation.
|
String |
getDiscountValuesInternal(SessionContext ctx)
Generated method - Getter of the
AbstractOrderEntry.discountValuesInternal attribute. |
Integer |
getEntryNumber()
Overwritten to provide in-memory implementation.
|
String |
getInfo(SessionContext ctx)
Overwritten to provide in-memory implementation.
|
protected Item.ItemAttributeMap |
getNonInitialAttributes(SessionContext ctx,
Item.ItemAttributeMap allAttributes)
The default implementation of
GenericItem.getNonInitialAttributes(SessionContext, Item.ItemAttributeMap ) assures
that the 'registered initial' properties GenericItem.getInitialProperties(JaloSession, Item.ItemAttributeMap ) will
be removed from the 'non initial map'. |
AbstractOrder |
getOrder(SessionContext ctx)
Overwritten to provide in-memory implementation.
|
Product |
getProduct(SessionContext ctx)
Overwritten to provide in-memory implementation.
|
Long |
getQuantity(SessionContext ctx)
Overwritten to provide in-memory implementation.
|
String |
getTaxValuesInternal(SessionContext ctx)
Generated method - Getter of the
AbstractOrderEntry.taxValuesInternal attribute. |
Double |
getTotalPrice(SessionContext ctx)
Overwritten to provide in-memory implementation.
|
Unit |
getUnit(SessionContext ctx)
Overwritten to provide in-memory implementation.
|
Boolean |
isCalculated(SessionContext ctx)
Overwritten to provide in-memory implementation.
|
Boolean |
isGiveAway(SessionContext ctx)
Overwritten to provide in-memory implementation.
|
Boolean |
isRejected(SessionContext ctx)
Overwritten to provide in-memory implementation.
|
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 |
removeJaloOnly()
Custom removal logic as part of
JaloOnlyItem contract. |
void |
setBasePrice(SessionContext ctx,
double price)
Overwritten to provide in-memory implementation.
|
void |
setCalculated(SessionContext ctx,
boolean calculated)
Overwritten to provide in-memory implementation.
|
void |
setDiscountValuesInternal(SessionContext ctx,
String value)
Generated method - Setter of the
AbstractOrderEntry.discountValuesInternal attribute. |
protected void |
setEntryNumberDirect(int nr)
Changes entry number directly.
|
void |
setGiveAway(SessionContext ctx,
boolean giveaway)
Overwritten to provide in-memory implementation.
|
void |
setInfo(SessionContext ctx,
String info)
Overwritten to provide in-memory implementation.
|
void |
setModificationTime(Date d)
Overwritten to provide in-memory implementation.
|
void |
setOrder(SessionContext ctx,
AbstractOrder order)
Generated method - Setter of the
AbstractOrderEntry.order attribute. |
void |
setProduct(SessionContext ctx,
Product p)
Overwritten to provide in-memory implementation.
|
void |
setQuantity(SessionContext ctx,
long qtd)
Overwritten to provide in-memory implementation.
|
void |
setRejected(SessionContext ctx,
boolean rejected)
Overwritten to provide in-memory implementation.
|
void |
setTaxValuesInternal(SessionContext ctx,
String value)
Generated method - Setter of the
AbstractOrderEntry.taxValuesInternal attribute. |
void |
setTotalPrice(SessionContext ctx,
double price)
Overwritten to provide in-memory implementation.
|
void |
setUnit(SessionContext ctx,
Unit unit)
Overwritten to provide in-memory implementation.
|
getDefaultAttributeModesaddAllDiscountValues, addAllDiscountValues, addAllDisocuntValues, addAllTaxValues, addAllTaxValues, addDiscountValue, addDiscountValue, addTaxValue, addTaxValue, applyDiscounts, calculate, calculateTotals, compareTo, findDiscounts, findPrice, findTaxes, getDiscountValues, getDiscountValues, getTaxValues, getTaxValues, recalculate, remove, removeAllDiscountValues, removeAllDiscountValues, removeAllTaxValues, removeAllTaxValues, removeDiscountValue, removeDiscountValue, removeTaxValue, removeTaxValue, removeWithoutOrderNotification, resetAllValues, setBasePrice, setChanged, setDiscountValues, setDiscountValues, setEntryNumber, setGiveAway, setQuantity, setRejected, setTaxValues, setTaxValues, toStringgetBasePrice, getBasePriceAsPrimitive, getBasePriceAsPrimitive, getDiscountValuesInternal, getEntryNumber, getEntryNumberAsPrimitive, getEntryNumberAsPrimitive, getInfo, getOrder, getProduct, getQuantity, getQuantityAsPrimitive, getQuantityAsPrimitive, getTaxValuesInternal, getTotalPrice, getTotalPriceAsPrimitive, getTotalPriceAsPrimitive, getUnit, isCalculated, isCalculatedAsPrimitive, isCalculatedAsPrimitive, isGiveAway, isGiveAwayAsPrimitive, isGiveAwayAsPrimitive, isRejected, isRejectedAsPrimitive, isRejectedAsPrimitive, setBasePrice, setBasePrice, setCalculated, setCalculated, setCalculated, setDiscountValuesInternal, setEntryNumber, setEntryNumber, setEntryNumber, setGiveAway, setGiveAway, setInfo, setOrder, setProduct, setQuantity, setQuantity, setRejected, setRejected, setTaxValuesInternal, setTotalPrice, setTotalPrice, setTotalPrice, setUnitgetInitialPropertiesgetAllLocalizedProperties, 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, 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, setNonInitialAttributes, setOwner, setPermissionsByMap, setTransientObject, setUseTA, 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 GeneratedInMemoryCartEntryctx - 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 rollbackedprotected Item.ItemAttributeMap getNonInitialAttributes(SessionContext ctx, Item.ItemAttributeMap allAttributes)
GenericItemGenericItem.getNonInitialAttributes(SessionContext, Item.ItemAttributeMap ) assures
that the 'registered initial' properties GenericItem.getInitialProperties(JaloSession, Item.ItemAttributeMap ) will
be removed from the 'non initial map'.getNonInitialAttributes in class GenericItemctx - session context with language = NULLallAttributes - a ItemAttributeMap contaning attribute values.ItemAttributeMap containing all attribute values, which belong to non-initial attributes.public 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 occuredpublic AbstractOrder getOrder(SessionContext ctx)
AbstractOrderEntry.getOrder(SessionContext) for
details.getOrder in class AbstractOrderEntryctx - can be used for cached access object may be outdated! AbstractOrder this abstract order entry is associated topublic void setOrder(SessionContext ctx, AbstractOrder order)
GeneratedAbstractOrderEntryAbstractOrderEntry.order attribute.setOrder in class AbstractOrderEntryorder - the orderpublic Product getProduct(SessionContext ctx)
GeneratedAbstractOrderEntry.getProduct(SessionContext) for
details.getProduct in class GeneratedAbstractOrderEntrypublic void setProduct(SessionContext ctx, Product p)
AbstractOrderEntry.setProduct(SessionContext, Product) for details.setProduct in class AbstractOrderEntryctx - can be used for cached access object may be outdated! p - the productpublic Long getQuantity(SessionContext ctx)
GeneratedAbstractOrderEntry.getQuantity(SessionContext) for
details.getQuantity in class GeneratedAbstractOrderEntrypublic void setQuantity(SessionContext ctx, long qtd)
GeneratedAbstractOrderEntry.setQuantity(SessionContext, long)
for details.setQuantity in class GeneratedAbstractOrderEntryqtd - the quantitypublic Unit getUnit(SessionContext ctx)
GeneratedAbstractOrderEntry.getUnit(SessionContext) for
details.getUnit in class GeneratedAbstractOrderEntrypublic void setUnit(SessionContext ctx, Unit unit)
AbstractOrderEntry.setUnit(SessionContext, Unit) for
details.setUnit in class AbstractOrderEntryctx - can be used for cached access object may be outdated! unit - the unitpublic String getInfo(SessionContext ctx)
GeneratedAbstractOrderEntry.getInfo(SessionContext) for
details.getInfo in class GeneratedAbstractOrderEntrypublic void setInfo(SessionContext ctx, String info)
GeneratedAbstractOrderEntry.setInfo(SessionContext, String)
for details.setInfo in class GeneratedAbstractOrderEntryinfo - the infopublic Double getBasePrice(SessionContext ctx)
GeneratedAbstractOrderEntry.getBasePrice(SessionContext) for
details.getBasePrice in class GeneratedAbstractOrderEntrypublic void setBasePrice(SessionContext ctx, double price)
GeneratedAbstractOrderEntry.setBasePrice(SessionContext, double) for details.setBasePrice in class GeneratedAbstractOrderEntryprice - the basePricepublic Double getTotalPrice(SessionContext ctx)
GeneratedAbstractOrderEntry.getTotalPrice(SessionContext) for
details.getTotalPrice in class GeneratedAbstractOrderEntrypublic void setTotalPrice(SessionContext ctx, double price)
GeneratedAbstractOrderEntry.setTotalPrice(SessionContext, double) for details.setTotalPrice in class GeneratedAbstractOrderEntryprice - the totalPricepublic String getTaxValuesInternal(SessionContext ctx)
GeneratedAbstractOrderEntryAbstractOrderEntry.taxValuesInternal attribute.getTaxValuesInternal in class GeneratedAbstractOrderEntrypublic void setTaxValuesInternal(SessionContext ctx, String value)
GeneratedAbstractOrderEntryAbstractOrderEntry.taxValuesInternal attribute.setTaxValuesInternal in class GeneratedAbstractOrderEntryvalue - the taxValuesInternalpublic String getDiscountValuesInternal(SessionContext ctx)
GeneratedAbstractOrderEntryAbstractOrderEntry.discountValuesInternal attribute.getDiscountValuesInternal in class GeneratedAbstractOrderEntrypublic void setDiscountValuesInternal(SessionContext ctx, String value)
GeneratedAbstractOrderEntryAbstractOrderEntry.discountValuesInternal attribute.setDiscountValuesInternal in class GeneratedAbstractOrderEntryvalue - the discountValuesInternalpublic Boolean isCalculated(SessionContext ctx)
AbstractOrderEntry.isCalculated(SessionContext) for
details.isCalculated in class AbstractOrderEntryctx - can be used for cached access value may be outdated! true if this entry is calculatedpublic void setCalculated(SessionContext ctx, boolean calculated)
GeneratedAbstractOrderEntry.setCalculated(SessionContext, boolean) for details.setCalculated in class GeneratedAbstractOrderEntrycalculated - the calculatedpublic Boolean isGiveAway(SessionContext ctx)
AbstractOrderEntry.isGiveAway(SessionContext) for
details.isGiveAway in class AbstractOrderEntryctx - can be used for cached access value may be outdated! true if this entry is calculatedpublic void setGiveAway(SessionContext ctx, boolean giveaway)
GeneratedAbstractOrderEntry.setGiveAway(SessionContext, boolean) for details.setGiveAway in class GeneratedAbstractOrderEntrygiveaway - the giveAwaypublic Boolean isRejected(SessionContext ctx)
AbstractOrderEntry.isRejected(SessionContext) for
details.isRejected in class AbstractOrderEntryctx - can be used for cached access value may be outdated! true the rejected flagpublic void setRejected(SessionContext ctx, boolean rejected)
GeneratedAbstractOrderEntry.setRejected(SessionContext, boolean) for details.setRejected in class GeneratedAbstractOrderEntryrejected - the rejectedpublic Integer getEntryNumber()
GeneratedAbstractOrderEntry.getEntryNumber() for details.getEntryNumber in class GeneratedAbstractOrderEntryprotected void setEntryNumberDirect(int nr)
AbstractOrderEntrysetEntryNumberDirect in class AbstractOrderEntrynr - the new entry numberpublic void setModificationTime(Date d)
Item.setModificationTime(Date) for details.setModificationTime in class ItemCopyright © 2017 SAP SE. All Rights Reserved.