Class InMemoryCart
java.lang.Object
de.hybris.platform.util.BridgeAbstraction
de.hybris.platform.jalo.Item
de.hybris.platform.jalo.ExtensibleItem
de.hybris.platform.jalo.c2l.LocalizableItem
de.hybris.platform.jalo.GenericItem
de.hybris.platform.jalo.order.GeneratedAbstractOrder
de.hybris.platform.jalo.order.AbstractOrder
de.hybris.platform.jalo.order.GeneratedCart
de.hybris.platform.jalo.order.Cart
de.hybris.platform.servicelayer.internal.jalo.order.GeneratedInMemoryCart
de.hybris.platform.servicelayer.internal.jalo.order.InMemoryCart
- All Implemented Interfaces:
JaloOnlyItem,Serializable,Comparable
- Direct Known Subclasses:
GeneratedMultiAddressInMemoryCart
A in-memory implementation of
Cart. This item is not backed by the database and will therefore not survive
the end of JaloSession. Apart from that it can be used as normal cart including order creation and saved
carts.
There are several options to make JaloSession use this kind of cart:
Set as default cart type
Change your local.properties like this:
# Default session cart type # Specifies which type of cart is being created on demand by # each JaloSession. Use 'InMemoryCart' if you don't need a # database backed session cart. default.session.cart.type = InMemoryCart
Specify per session
For each session which has no cart yet you may specify the cart type via session context:
JaloSession js = ...
js.getSessionContext().setAttribute("InMemoryCart");
// or
js.getSessionContext().setAttribute(CoreConstants.TC.INMEMORYCART);
// or even
js.getSessionContext().setAttribute(
TypeManager.getInstance().getComposedType( InMemoryCart.class )
);
InMemoryCart newCart = (InMemoryCart)js.getCart();
Please note: Due to its non-persistent nature this cart usually does not survive the end of its owning
JaloSession! Special care should be taken when using session replication across a cluster: although this cart
is serializable and should therefore be transfered to all other nodes we suggest to verify if updates onto the cart
and its entries are really synchronized. This may depend upon the chose session replication technology.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.jalo.order.AbstractOrder
AbstractOrder.DELIVERY_STATUS, AbstractOrder.EXPORT_STATUS, AbstractOrder.ORDER_STATUS, AbstractOrder.PAYMENT_STATUSNested classes/interfaces inherited from class de.hybris.platform.jalo.GenericItem
GenericItem.GenericItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LocalizableItem.LocalizableItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.ExtensibleItem
ExtensibleItem.ExtensibleItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.Item
Item.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException -
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.internal.jalo.order.GeneratedInMemoryCart
DEFAULT_INITIAL_ATTRIBUTES, ENTRIESHANDLERFields inherited from class de.hybris.platform.jalo.order.Cart
END_DATE, START_DATEFields inherited from class de.hybris.platform.jalo.order.GeneratedCart
SESSIONID, USERHANDLERFields inherited from class de.hybris.platform.jalo.order.AbstractOrder
APPEND_AS_LAST, CFG_TAX_FREE_ENTRIES_SUPPORT, DELIVERY_ADDRESS, DELIVERY_COST, DELIVERY_MODE, DELIVERY_STATUS, DELIVERY_STATUS_TYPE, EXPORT_STATUS, EXPORT_STATUS_TYPE, GLOBAL_DISCOUNT_VALUES, ORDER_DISCOUNT_RELATION_NAME, ORDER_STATUS_TYPE, PAYMENT_ADDRESS, PAYMENT_COST, PAYMENT_INFO, PAYMENT_MODE, PAYMENT_STATUS, PAYMENT_STATUS_TYPE, STATUS_INFO, TOTAL, TOTAL_DISCOUNTS, TOTAL_TAX, TOTAL_TAX_VALUESFields inherited from class de.hybris.platform.jalo.order.GeneratedAbstractOrder
CALCULATED, CODE, CURRENCY, DATE, DELIVERYADDRESS, DELIVERYCOST, DELIVERYMODE, DELIVERYSTATUS, DESCRIPTION, DISCOUNTS, DISCOUNTSINCLUDEDELIVERYCOST, DISCOUNTSINCLUDEPAYMENTCOST, ENTRIES, ENTRYGROUPS, EXPIRATIONTIME, EXPORTSTATUS, GLOBALDISCOUNTVALUESINTERNAL, NAME, NET, ORDERDISCOUNTRELATION_MARKMODIFIED, ORDERDISCOUNTRELATION_SRC_ORDERED, ORDERDISCOUNTRELATION_TGT_ORDERED, PAYMENTADDRESS, PAYMENTCOST, PAYMENTINFO, PAYMENTMODE, PAYMENTSTATUS, STATUS, STATUSINFO, SUBTOTAL, TOTALDISCOUNTS, TOTALPRICE, TOTALTAX, TOTALTAXVALUESINTERNAL, USERFields inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LANGUAGE_FALLBACK_ENABLEDFields inherited from class de.hybris.platform.jalo.Item
_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, HJMPTS, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPEFields inherited from class de.hybris.platform.util.BridgeAbstraction
impl, tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddNewEntry(Product prod, long qtd, Unit unit, int position, boolean addToPresent) Overwritten to provide in-memory list of entries.protected ItemcreateItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) Returns a new wizard instance.createNewEntry(SessionContext ctx, ComposedType entryType, Product p, long amount, Unit u, int pos) doGetAttribute(SessionContext ctx, String attrQualifier) Custom attribute access as part ofJaloOnlyItemcontract.voiddoSetAttribute(SessionContext ctx, String attrQualifier, Object value) Custom attribute access as part ofJaloOnlyItemcontract.protected StringDeprecated.since agesgetCode(SessionContext ctx) Overwritten to provide in-memory implementation.Overwritten to provide in-memory implementation.Overwritten to provide in-memory implementation.doubleOverwritten to provide in-memory implementation.Overwritten to provide in-memory implementation.Overwritten to provide in-memory implementation.getEntries(int startIdx, int endIdx) Overwritten to provide in-memory list of entries.getEntries(SessionContext ctx) Generated method - Getter of theInMemoryCart.entriesattribute.getEntriesByProduct(Product product) Overwritten to provide in-memory list of entries.getEntry(int index) Overwritten to provide in-memory list of entries.Generated method - Getter of theAbstractOrder.globalDiscountValuesInternalattribute.protected Item.ItemAttributeMapgetNonInitialAttributes(SessionContext ctx, Item.ItemAttributeMap allAttributes) The default implementation ofGenericItem.getNonInitialAttributes(SessionContext, Item.ItemAttributeMap)assures that the 'registered initial' propertiesGenericItem.getInitialProperties(JaloSession, Item.ItemAttributeMap)will be removed from the 'non initial map'.Overwritten to provide in-memory implementation.doubleOverwritten to provide in-memory implementation.Overwritten to provide in-memory implementation.Overwritten to provide in-memory implementation.Overwritten to provide in-memory implementation.getStatus(SessionContext ctx) Overwritten to provide in-memory implementation.Overwritten to provide in-memory implementation.Overwritten to provide in-memory implementation.doublegetTotal(SessionContext ctx) Overwritten to provide in-memory implementation.Overwritten to provide in-memory implementation.Overwritten to provide in-memory implementation.Generated method - Getter of theAbstractOrder.totalTaxValuesInternalattribute.getUser(SessionContext ctx) Overwritten to provide in-memory implementation.Overwritten to provide in-memory implementation.Overwritten to provide in-memory implementation.Overwritten to provide in-memory implementation.isNet(SessionContext ctx) Overwritten to provide in-memory implementation.final ComposedTypeProvides composed as part ofJaloOnlyItemcontract.final DateProvides creation time as part ofJaloOnlyItemcontract.final DateProvides modification time as part ofJaloOnlyItemcontract.final PKProvides PK part ofJaloOnlyItemcontract.voidOverwritten to provide in-memory list of entries.protected voidremoveEntries(SessionContext ctx, Set<AbstractOrderEntry> entries) voidremoveEntry(AbstractOrderEntry entry) Overwritten to provide in-memory list of entries.voidCustom removal logic as part ofJaloOnlyItemcontract.protected voidsetAllEntries(SessionContext ctx, List entries) Deprecated.since agesvoidsetCalculated(SessionContext ctx, boolean calculated) Overwritten to provide in-memory implementation.voidsetCode(SessionContext ctx, String code) Overwritten to provide in-memory implementation.protected voidsetCreationTime(Date creationTime) voidsetCurrency(SessionContext ctx, Currency curr) Overwritten to provide in-memory implementation.voidsetDate(SessionContext ctx, Date date) Overwritten to provide in-memory implementation.voidsetDeliveryAddress(SessionContext ctx, Address address) Overwritten to provide in-memory implementation.voidsetDeliveryCosts(SessionContext ctx, double deliveryCost) Overwritten to provide in-memory implementation.voidsetDeliveryMode(SessionContext ctx, DeliveryMode mode) Overwritten to provide in-memory implementation.voidOverwritten to provide in-memory implementation.voidsetDiscountsIncludeDeliveryCost(SessionContext ctx, Boolean value) Overwritten to provide in-memory implementation.voidsetDiscountsIncludePaymentCost(SessionContext ctx, Boolean value) Overwritten to provide in-memory implementation.voidsetEntries(SessionContext ctx, List<AbstractOrderEntry> value) Generated method - Setter of theInMemoryCart.entriesattribute.voidsetGlobalDiscountValuesInternal(SessionContext ctx, String value) Generated method - Setter of theAbstractOrder.globalDiscountValuesInternalattribute.voidOverwritten to provide in-memory implementation.voidsetNet(SessionContext ctx, boolean net) Overwritten to provide in-memory implementation.voidsetPaymentAddress(SessionContext ctx, Address adr) Overwritten to provide in-memory implementation.voidsetPaymentCosts(SessionContext ctx, double paymentCost) Overwritten to provide in-memory implementation.voidsetPaymentInfo(SessionContext ctx, PaymentInfo info) Overwritten to provide in-memory implementation.voidsetPaymentMode(SessionContext ctx, PaymentMode mode) Overwritten to provide in-memory implementation.voidOverwritten to provide in-memory implementation.voidsetStatus(SessionContext ctx, EnumerationValue s) Overwritten to provide in-memory implementation.voidsetStatusInfo(SessionContext ctx, String s) Overwritten to provide in-memory implementation.voidsetSubtotal(SessionContext ctx, double price) Overwritten to provide in-memory implementation.voidsetTotal(SessionContext ctx, double price) Overwritten to provide in-memory implementation.voidsetTotalDiscounts(SessionContext ctx, double totalDiscounts) Overwritten to provide in-memory implementation.voidsetTotalTax(SessionContext ctx, double taxes) Overwritten to provide in-memory implementation.voidsetTotalTaxValuesInternal(SessionContext ctx, String value) Generated method - Setter of theAbstractOrder.totalTaxValuesInternalattribute.voidsetUser(SessionContext ctx, User user) Overwritten to provide in-memory implementation.Methods inherited from class de.hybris.platform.servicelayer.internal.jalo.order.GeneratedInMemoryCart
addToEntries, addToEntries, getDefaultAttributeModes, getEntries, removeFromEntries, removeFromEntries, setEntriesMethods inherited from class de.hybris.platform.jalo.order.GeneratedCart
addToEntries, addToEntries, getSessionId, getSessionId, removeFromEntries, removeFromEntries, setSessionId, setSessionIdMethods inherited from class de.hybris.platform.jalo.order.AbstractOrder
addAbsoluteEntryTaxValue, addAllGlobalDiscountValues, addAllGlobalDiscountValues, addAllTotalTaxValues, addAllTotalTaxValues, addDiscount, addGlobalDiscountValue, addGlobalDiscountValue, addNewEntry, addNewEntry, addNewEntry, addRelativeEntryTaxValue, addTotalTaxValue, addTotalTaxValue, calculate, calculate, calculateAbsoluteTotalTaxValue, calculateDiscountValues, calculateEntries, calculateSubtotal, calculateTotals, calculateTotals, calculateTotalTaxValues, convertDiscountValues, createEntryInformation, createNewDeliveryAddress, createNewDeliveryAddress, createNewEntryNumber, createNewPaymentAddress, createNewPaymentAddress, discountsIncludeDeliveryCosts, discountsIncludePaymentCosts, doSetDeliveryAddress, doSetPaymentAddress, findDeliveryCosts, findGlobalDiscounts, findPaymentCosts, getAttributeValue, getCustomEntryType, getDate, getDeliveryCosts, getGlobalDiscountValues, getGlobalDiscountValues, getNewEntryNumberForAppending, getNextEntryNumber, getPaymentCosts, getTotal, getTotalDiscounts, getTotalTax, getTotalTaxValues, getTotalTaxValues, isCalculated, isNet, notifyDiscountsAboutCalculation, notifyDiscountsAboutRemoval, recalculate, recalculate, recalculateEntries, remove, removeAllGlobalDiscountValues, removeAllGlobalDiscountValues, removeAllTotalTaxValues, removeAllTotalTaxValues, removeDiscount, removeGlobalDiscountValue, removeGlobalDiscountValue, removeTotalTaxValue, removeTotalTaxValue, resetAdditionalCosts, resetAllValues, setChanged, setCode, setComposedType, setCurrency, setDate, setDeliveryAddress, setDeliveryCost, setDeliveryCosts, setDeliveryMode, setDeliveryStatus, setDiscountsIncludeDeliveryCosts, setDiscountsIncludePaymentCosts, setGlobalDiscountValues, setGlobalDiscountValues, setNet, setPaymentAddress, setPaymentCost, setPaymentCosts, setPaymentMode, setPaymentStatus, setStatus, setTotal, setTotalTaxValues, setTotalTaxValues, setUser, shuffleEntriesOnInsertNew, tryToFindFallbackLanguageMethods inherited from class de.hybris.platform.jalo.order.GeneratedAbstractOrder
addToDiscounts, addToDiscounts, addToEntries, addToEntries, getCode, getCurrency, getDate, getDeliveryAddress, getDeliveryCost, getDeliveryCost, getDeliveryCostAsPrimitive, getDeliveryCostAsPrimitive, getDeliveryMode, getDeliveryStatus, getDescription, getDescription, getDiscounts, getDiscounts, getDiscountsCount, getDiscountsCount, getEntryGroups, getEntryGroups, getExpirationTime, getExpirationTime, getExportStatus, getExportStatus, getGlobalDiscountValuesInternal, getName, getName, getPaymentAddress, getPaymentCost, getPaymentCost, getPaymentCostAsPrimitive, getPaymentCostAsPrimitive, getPaymentInfo, getPaymentMode, getPaymentStatus, getStatus, getStatusInfo, getSubtotal, getSubtotalAsPrimitive, getSubtotalAsPrimitive, getTotalDiscountsAsPrimitive, getTotalDiscountsAsPrimitive, getTotalPrice, getTotalPrice, getTotalPriceAsPrimitive, getTotalPriceAsPrimitive, getTotalTaxAsPrimitive, getTotalTaxAsPrimitive, getTotalTaxValuesInternal, getUser, isCalculatedAsPrimitive, isCalculatedAsPrimitive, isDiscountsIncludeDeliveryCost, isDiscountsIncludeDeliveryCostAsPrimitive, isDiscountsIncludeDeliveryCostAsPrimitive, isDiscountsIncludePaymentCost, isDiscountsIncludePaymentCostAsPrimitive, isDiscountsIncludePaymentCostAsPrimitive, isMarkModifiedDisabled, isNetAsPrimitive, isNetAsPrimitive, removeFromDiscounts, removeFromDiscounts, removeFromEntries, removeFromEntries, setCalculated, setCalculated, setCalculated, setDeliveryCost, setDeliveryCost, setDeliveryCost, setDescription, setDescription, setDiscounts, setDiscounts, setDiscountsIncludeDeliveryCost, setDiscountsIncludeDeliveryCost, setDiscountsIncludeDeliveryCost, setDiscountsIncludePaymentCost, setDiscountsIncludePaymentCost, setDiscountsIncludePaymentCost, setEntryGroups, setEntryGroups, setExpirationTime, setExpirationTime, setExportStatus, setExportStatus, setGlobalDiscountValuesInternal, setName, setName, setNet, setNet, setPaymentCost, setPaymentCost, setPaymentCost, setPaymentInfo, setStatusInfo, setSubtotal, setSubtotal, setSubtotal, setTotalDiscounts, setTotalDiscounts, setTotalDiscounts, setTotalPrice, setTotalPrice, setTotalPrice, setTotalPrice, setTotalTax, setTotalTax, setTotalTax, setTotalTaxValuesInternalMethods inherited from class de.hybris.platform.jalo.GenericItem
getImplementation, getInitialProperties, getRelatedItems, getRelatedItems, setRelatedItemsMethods inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertyMethods inherited from class de.hybris.platform.jalo.ExtensibleItem
createNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setPropertyMethods inherited from class de.hybris.platform.jalo.Item
addLinkedItems, 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, getPartOfRemovedSessionMarker, 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, notifyManagerAboutItemRemoval, readResolve, 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, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setNonInitialAttributes, setOwner, setPermissionsByMap, setTransientObject, setUseTA, suppressRelation, toString, useTA, writeReplaceMethods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
Constructor Details
-
InMemoryCart
public InMemoryCart()
-
-
Method Details
-
createItem
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException Returns a new wizard instance.- Overrides:
createItemin classCart- Parameters:
ctx- 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 )- Returns:
- the new item instance
- Throws:
JaloBusinessException- indicates an error during creation - any changes will be rollbacked
-
getNonInitialAttributes
protected Item.ItemAttributeMap getNonInitialAttributes(SessionContext ctx, Item.ItemAttributeMap allAttributes) Description copied from class:GenericItemThe default implementation ofGenericItem.getNonInitialAttributes(SessionContext, Item.ItemAttributeMap)assures that the 'registered initial' propertiesGenericItem.getInitialProperties(JaloSession, Item.ItemAttributeMap)will be removed from the 'non initial map'.- Overrides:
getNonInitialAttributesin classGenericItem- Parameters:
ctx- session context with language = NULLallAttributes- aItemAttributeMapcontaning attribute values.- Returns:
- a
ItemAttributeMapcontaining all attribute values, which belong to non-initial attributes.
-
provideComposedType
Provides composed as part ofJaloOnlyItemcontract. Never call directly- Specified by:
provideComposedTypein interfaceJaloOnlyItem- Returns:
- ComposedType of this item
-
provideCreationTime
Provides creation time as part ofJaloOnlyItemcontract. Never call directly- Specified by:
provideCreationTimein interfaceJaloOnlyItem- Returns:
- creation time date of this item
-
provideModificationTime
Provides modification time as part ofJaloOnlyItemcontract. Never call directly- Specified by:
provideModificationTimein interfaceJaloOnlyItem- Returns:
- modification time date of this item
-
providePK
Provides PK part ofJaloOnlyItemcontract. Never call directly- Specified by:
providePKin interfaceJaloOnlyItem- Returns:
- PK of this item
-
removeJaloOnly
Custom removal logic as part ofJaloOnlyItemcontract. Never call directly- Specified by:
removeJaloOnlyin interfaceJaloOnlyItem- Throws:
ConsistencyCheckException- to signal that this item removal failed
-
doGetAttribute
public Object doGetAttribute(SessionContext ctx, String attrQualifier) throws JaloInvalidParameterException, JaloSecurityException Custom attribute access as part ofJaloOnlyItemcontract. Never call directly- Specified by:
doGetAttributein interfaceJaloOnlyItem- Parameters:
ctx- the session contextattrQualifier- the qualifier of the requested attribute- Returns:
- the attribute value
- Throws:
JaloInvalidParameterException- in case no value could be read for this attributeJaloSecurityException
-
doSetAttribute
public void doSetAttribute(SessionContext ctx, String attrQualifier, Object value) throws JaloInvalidParameterException, JaloSecurityException, JaloBusinessException Custom attribute access as part ofJaloOnlyItemcontract. Never call directly- Specified by:
doSetAttributein interfaceJaloOnlyItem- Parameters:
ctx- the session contextattrQualifier- the qualifier of the requested attributevalue- the new attribute value- Throws:
JaloInvalidParameterException- 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 occured
-
getEntries
Overwritten to provide in-memory list of entries. SeeAbstractOrder.getEntries(int, int)for details.- Overrides:
getEntriesin classAbstractOrder
-
getEntry
Overwritten to provide in-memory list of entries. SeeAbstractOrder.getEntry(int)for details.- Overrides:
getEntryin classAbstractOrder- Throws:
JaloItemNotFoundException
-
getEntriesByProduct
Overwritten to provide in-memory list of entries. SeeAbstractOrder.getEntriesByProduct(Product)for details.- Overrides:
getEntriesByProductin classAbstractOrder
-
removeAllEntries
public void removeAllEntries()Overwritten to provide in-memory list of entries. SeeAbstractOrder.removeAllEntries()for details.- Overrides:
removeAllEntriesin classAbstractOrder
-
removeEntries
- Overrides:
removeEntriesin classAbstractOrder
-
removeEntry
Overwritten to provide in-memory list of entries. SeeAbstractOrder.removeEntry(AbstractOrderEntry)for details.- Overrides:
removeEntryin classAbstractOrder
-
getAllEntries
Deprecated.since agesOverwritten to provide in-memory list of entries. SeeAbstractOrder.getAllEntries()for details.- Overrides:
getAllEntriesin classAbstractOrder
-
setAllEntries
@Deprecated(since="ages", forRemoval=false) protected void setAllEntries(SessionContext ctx, List entries) Deprecated.since ages- Overrides:
setAllEntriesin classAbstractOrder
-
getEntries
Description copied from class:GeneratedInMemoryCartGenerated method - Getter of theInMemoryCart.entriesattribute.- Overrides:
getEntriesin classGeneratedInMemoryCart- Returns:
- the entries
-
setEntries
Description copied from class:GeneratedInMemoryCartGenerated method - Setter of theInMemoryCart.entriesattribute.- Overrides:
setEntriesin classGeneratedInMemoryCartvalue- the entries
-
addNewEntry
public AbstractOrderEntry addNewEntry(Product prod, long qtd, Unit unit, int position, boolean addToPresent) Overwritten to provide in-memory list of entries. SeeAbstractOrder.addNewEntry(Product, long, Unit, int, boolean)for details.- Overrides:
addNewEntryin classAbstractOrder- Parameters:
prod- - must not be nullunit- - must not be nulladdToPresent- if true an existing entry with matching product and unit will get its quantity increased; otherwise a new entry is created
-
getCode
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.getCode(SessionContext)for details.- Overrides:
getCodein classGeneratedAbstractOrder- Returns:
- the code
-
setCode
Overwritten to provide in-memory implementation. SeeAbstractOrder.setCode(SessionContext, String)for details.- Overrides:
setCodein classAbstractOrder- Parameters:
ctx- can be used for cached access of 'code' value may be outdated!code- the code
-
setDate
Overwritten to provide in-memory implementation. SeeAbstractOrder.setDate(SessionContext, Date)for details.- Overrides:
setDatein classAbstractOrder- Parameters:
ctx- can be used for cached access of 'date' value may be outdated!date- the date
-
setCreationTime
- Overrides:
setCreationTimein classItem
-
getUser
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.getUser(SessionContext)for details.- Overrides:
getUserin classGeneratedAbstractOrder- Returns:
- the user
-
setUser
Overwritten to provide in-memory implementation. SeeAbstractOrder.setUser(SessionContext, User)for details.- Overrides:
setUserin classAbstractOrder- Parameters:
ctx- can be used for cached access of the user object object may be outdated!user- the user
-
getCurrency
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.getCurrency(SessionContext)for details.- Overrides:
getCurrencyin classGeneratedAbstractOrder- Returns:
- the currency
-
setCurrency
Overwritten to provide in-memory implementation. SeeAbstractOrder.setCurrency(SessionContext, Currency)for details.- Overrides:
setCurrencyin classAbstractOrder- Parameters:
ctx- can be used for cached access of the currency object object may be outdated!curr- the currency
-
getPaymentStatus
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.getPaymentStatus(SessionContext)for details.- Overrides:
getPaymentStatusin classGeneratedAbstractOrder- Returns:
- the paymentStatus
-
setPaymentStatus
Overwritten to provide in-memory implementation. SeeAbstractOrder.setPaymentStatus(SessionContext, EnumerationValue)for details.- Overrides:
setPaymentStatusin classAbstractOrderps- the paymentStatus
-
getDeliveryStatus
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.getDeliveryStatus(SessionContext)for details.- Overrides:
getDeliveryStatusin classGeneratedAbstractOrder- Returns:
- the deliveryStatus
-
setDeliveryStatus
Overwritten to provide in-memory implementation. SeeAbstractOrder.setDeliveryStatus(SessionContext, EnumerationValue)for details.- Overrides:
setDeliveryStatusin classAbstractOrderds- the deliveryStatus
-
isNet
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.isNet(SessionContext)for details.- Overrides:
isNetin classGeneratedAbstractOrder- Returns:
- the net
-
setNet
Overwritten to provide in-memory implementation. SeeAbstractOrder.setNet(SessionContext, boolean)for details.- Overrides:
setNetin classAbstractOrder- Parameters:
ctx- can be used for cached access of net status value may be outdated!net- the net
-
getDeliveryMode
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.getDeliveryMode(SessionContext)for details.- Overrides:
getDeliveryModein classGeneratedAbstractOrder- Returns:
- the deliveryMode
-
setDeliveryMode
Overwritten to provide in-memory implementation. SeeAbstractOrder.setDeliveryMode(SessionContext, DeliveryMode)for details.- Overrides:
setDeliveryModein classAbstractOrder- Parameters:
ctx- can be used for cached access of delivery mode object object may be outdated!mode- the deliveryMode
-
getDeliveryAddress
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.getDeliveryAddress(SessionContext)for details.- Overrides:
getDeliveryAddressin classGeneratedAbstractOrder- Returns:
- the deliveryAddress
-
setDeliveryAddress
Overwritten to provide in-memory implementation. SeeAbstractOrder.setDeliveryAddress(SessionContext, Address)for details.- Overrides:
setDeliveryAddressin classAbstractOrder- Parameters:
ctx- can be used for cached access of address object object may be outdated!address- the deliveryAddress
-
getPaymentMode
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.getPaymentMode(SessionContext)for details.- Overrides:
getPaymentModein classGeneratedAbstractOrder- Returns:
- the paymentMode
-
setPaymentMode
Overwritten to provide in-memory implementation. SeeAbstractOrder.setPaymentMode(SessionContext, PaymentMode)for details.- Overrides:
setPaymentModein classAbstractOrder- Parameters:
ctx- can be used for cached access object may be outdated!mode- the paymentMode
-
getPaymentAddress
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.getPaymentAddress(SessionContext)for details.- Overrides:
getPaymentAddressin classGeneratedAbstractOrder- Returns:
- the paymentAddress
-
setPaymentAddress
Overwritten to provide in-memory implementation. SeeAbstractOrder.setPaymentAddress(SessionContext, Address)for details.- Overrides:
setPaymentAddressin classAbstractOrder- Parameters:
ctx- can be used for cached access object may be outdated!adr- the paymentAddress
-
getPaymentInfo
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.getPaymentInfo(SessionContext)for details.- Overrides:
getPaymentInfoin classGeneratedAbstractOrder- Returns:
- the paymentInfo
-
setPaymentInfo
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.setPaymentInfo(SessionContext, PaymentInfo)for details.- Overrides:
setPaymentInfoin classGeneratedAbstractOrderinfo- the paymentInfo
-
setPaymentCosts
Overwritten to provide in-memory implementation. SeeAbstractOrder.setPaymentCosts(SessionContext, double)for details.- Overrides:
setPaymentCostsin classAbstractOrder
-
getPaymentCosts
Overwritten to provide in-memory implementation. SeeAbstractOrder.getPaymentCosts(SessionContext)for details.- Overrides:
getPaymentCostsin classAbstractOrder
-
setStatusInfo
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.setStatusInfo(SessionContext, String)for details.- Overrides:
setStatusInfoin classGeneratedAbstractOrders- the statusInfo
-
getStatusInfo
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.getStatusInfo(SessionContext)for details.- Overrides:
getStatusInfoin classGeneratedAbstractOrder- Returns:
- the statusInfo
-
setStatus
Overwritten to provide in-memory implementation. SeeAbstractOrder.setStatus(SessionContext, EnumerationValue)for details.- Overrides:
setStatusin classAbstractOrder- Parameters:
ctx- can be used for cached access of status value may be outdated!s- the status of this order
-
getStatus
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.getStatusInfo(SessionContext)for details.- Overrides:
getStatusin classGeneratedAbstractOrder- Returns:
- the status
-
isCalculated
Overwritten to provide in-memory implementation. SeeAbstractOrder.isCalculated(SessionContext)for details.- Overrides:
isCalculatedin classAbstractOrder- Returns:
- the calculated
- See Also:
-
setCalculated
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.setCalculated(SessionContext, boolean)for details.- Overrides:
setCalculatedin classGeneratedAbstractOrdercalculated- the calculated
-
getTotalTaxValuesInternal
Description copied from class:GeneratedAbstractOrderGenerated method - Getter of theAbstractOrder.totalTaxValuesInternalattribute.- Overrides:
getTotalTaxValuesInternalin classGeneratedAbstractOrder- Returns:
- the totalTaxValuesInternal
-
setTotalTaxValuesInternal
Description copied from class:GeneratedAbstractOrderGenerated method - Setter of theAbstractOrder.totalTaxValuesInternalattribute.- Overrides:
setTotalTaxValuesInternalin classGeneratedAbstractOrdervalue- the totalTaxValuesInternal
-
getGlobalDiscountValuesInternal
Description copied from class:GeneratedAbstractOrderGenerated method - Getter of theAbstractOrder.globalDiscountValuesInternalattribute.- Overrides:
getGlobalDiscountValuesInternalin classGeneratedAbstractOrder- Returns:
- the globalDiscountValuesInternal
-
setGlobalDiscountValuesInternal
Description copied from class:GeneratedAbstractOrderGenerated method - Setter of theAbstractOrder.globalDiscountValuesInternalattribute.- Overrides:
setGlobalDiscountValuesInternalin classGeneratedAbstractOrdervalue- the globalDiscountValuesInternal
-
setDeliveryCosts
Overwritten to provide in-memory implementation. SeeAbstractOrder.setDeliveryCosts(SessionContext, double)for details.- Overrides:
setDeliveryCostsin classAbstractOrder
-
getDeliveryCosts
Overwritten to provide in-memory implementation. SeeAbstractOrder.getDeliveryCosts(SessionContext)for details.- Overrides:
getDeliveryCostsin classAbstractOrder
-
setTotal
Overwritten to provide in-memory implementation. SeeAbstractOrder.setTotal(SessionContext, double)for details.- Overrides:
setTotalin classAbstractOrder
-
getTotal
Overwritten to provide in-memory implementation. SeeAbstractOrder.getTotal(SessionContext)for details.- Overrides:
getTotalin classAbstractOrder
-
setSubtotal
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.setSubtotal(SessionContext, double)for details.- Overrides:
setSubtotalin classGeneratedAbstractOrderprice- the subtotal
-
getSubtotal
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.getSubtotal(SessionContext)for details.- Overrides:
getSubtotalin classGeneratedAbstractOrder- Returns:
- the subtotal
-
setTotalDiscounts
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.setTotalDiscounts(SessionContext, double)for details.- Overrides:
setTotalDiscountsin classGeneratedAbstractOrdertotalDiscounts- the totalDiscounts
-
getTotalDiscounts
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.getTotalDiscounts(SessionContext)for details.- Overrides:
getTotalDiscountsin classGeneratedAbstractOrder- Returns:
- the totalDiscounts
-
setTotalTax
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.setTotalTax(SessionContext, double)for details.- Overrides:
setTotalTaxin classGeneratedAbstractOrdertaxes- the totalTax
-
getTotalTax
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.getTotalTax(SessionContext)for details.- Overrides:
getTotalTaxin classGeneratedAbstractOrder- Returns:
- the totalTax
-
setDiscountsIncludeDeliveryCost
Overwritten to provide in-memory implementation. SeeAbstractOrder.setDiscountsIncludeDeliveryCost(SessionContext, Boolean)for details.- Overrides:
setDiscountsIncludeDeliveryCostin classAbstractOrdervalue- the discountsIncludeDeliveryCost - Tells whether delivery costs should be included in discount calculation or not. If this field is true delivery costs are changed the same way as product costs if discount values are set at this order.
-
isDiscountsIncludeDeliveryCost
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.isDiscountsIncludeDeliveryCost(SessionContext)for details.- Overrides:
isDiscountsIncludeDeliveryCostin classGeneratedAbstractOrder- Returns:
- the discountsIncludeDeliveryCost - Tells whether delivery costs should be included in discount calculation or not. If this field is true delivery costs are changed the same way as product costs if discount values are set at this order.
-
setDiscountsIncludePaymentCost
Overwritten to provide in-memory implementation. SeeAbstractOrder.setDiscountsIncludePaymentCost(SessionContext, Boolean)for details.- Overrides:
setDiscountsIncludePaymentCostin classAbstractOrdervalue- the discountsIncludePaymentCost - Tells whether payment costs should be included in discount calculation or not. If this field is true payment costs are changed the same way as product costs if discount values are set at this order.
-
isDiscountsIncludePaymentCost
Overwritten to provide in-memory implementation. SeeGeneratedAbstractOrder.isDiscountsIncludePaymentCost(SessionContext)for details.- Overrides:
isDiscountsIncludePaymentCostin classGeneratedAbstractOrder- Returns:
- the discountsIncludePaymentCost - Tells whether payment costs should be included in discount calculation or not. If this field is true payment costs are changed the same way as product costs if discount values are set at this order.
-
setModificationTime
Overwritten to provide in-memory implementation. SeeItem.setModificationTime(Date)for details.- Overrides:
setModificationTimein classItem
-
createNewEntry
public InMemoryCartEntry createNewEntry(SessionContext ctx, ComposedType entryType, Product p, long amount, Unit u, int pos) - Overrides:
createNewEntryin classCart
-
getAbstractOrderEntryTypeCode
- Overrides:
getAbstractOrderEntryTypeCodein classCart
-