Package de.hybris.platform.jalo.order
Class OrderManager
- java.lang.Object
-
- de.hybris.platform.jalo.Manager
-
- de.hybris.platform.jalo.order.OrderManager
-
- All Implemented Interfaces:
ItemLifecycleListener,java.io.Serializable
public class OrderManager extends Manager
The general manager class for the order package. Orders, taxes, discounts and PaymentInfos are managed here. Payment- and delivery modes have special manager which are accessible here.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classOrderManager.OrderManagerSerializableDTO-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.Manager
Manager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreator
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBEAN_NAME
-
Constructor Summary
Constructors Constructor Description OrderManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected java.lang.StringadjustOrderCode(java.lang.String presetCode)Deprecated.since ages - Since 4.3 the following is done automatically by order'sDefaultAbstractOrderPrepareInterceptorvoidappendToCart(Cart sourceCart, Cart targetCart)Deprecated.since ages - Use CartService.appendToCart(CartModel, CartModel) instead.protected voidcheckBeforeItemRemoval(SessionContext ctx, Item item)TODO improve API doc Override this method to implement pre-removal consistency checks.CartcreateCart(PK pk, java.lang.String code, User user, Currency currency, java.util.Date date, boolean net)Deprecated.since ages - use modelService and standard model settersCartcreateCart(AbstractOrder original, java.lang.String newCode)Deprecated.since ages - use de.hybris.platform.order.CartService.createCart(ComposedTypeModel, ComposedTypeModel , AbstractOrderModel, String );CartcreateCart(ComposedType type, PK pkBase, java.lang.String code, User user, Currency currency, java.util.Date date, boolean net)Deprecated.since ages - use modelService and standard model settersCartcreateCart(ComposedType type, ComposedType entryType, AbstractOrder original, java.lang.String newCode)Deprecated.since ages - use de.hybris.platform.order.CartService.createCart(ComposedTypeModel, ComposedTypeModel , AbstractOrderModel, String );CartcreateCart(ComposedType type, java.lang.String code, User user, Currency currency, java.util.Date date, boolean net)Deprecated.since ages - use modelService and standard model settersCartcreateCart(User user, Currency currency, java.util.Date date, boolean net)Deprecated.since ages - use modelService and standard model settersCartcreateCart(java.lang.String code, User user, Currency currency, java.util.Date date, boolean net)Deprecated.since ages - use modelService and standard model settersDeliveryModecreateDeliveryMode(ComposedType type, java.lang.String code)Deprecated.since ages - Use ModelService to create DeliveryMode and standard setters to provide attribute values.DiscountcreateDiscount(java.lang.String code)Deprecated.since ages - Use ModelService to create Discounts and standard setters to provide attribute values.DiscountValuecreateDiscountValue(java.lang.String code, java.lang.String description, double value, int priority, boolean absolute, Discount discount)Deprecated.since ages - just instantiateDiscountValueOrdercreateOrder(PK pk, java.lang.String code, User user, Currency currency, java.util.Date date, boolean net)Deprecated.since ages - use modelService and standard model settersOrdercreateOrder(AbstractOrder original)Deprecated.since ages - use de.hybris.platform.order.OrderService.createOrder(ComposedTypeModel, ComposedTypeModel , AbstractOrderModel, String );OrdercreateOrder(ComposedType type, PK pkBase, java.lang.String code, User user, Currency currency, java.util.Date date, boolean net)Deprecated.since ages - use modelService and standard model settersOrdercreateOrder(ComposedType type, ComposedType entryType, AbstractOrder original)Deprecated.since ages - use de.hybris.platform.order.OrderService.createOrder(ComposedTypeModel, ComposedTypeModel , AbstractOrderModel, String );OrdercreateOrder(ComposedType type, java.lang.String code, User user, Currency currency, java.util.Date date, boolean net)Deprecated.since ages - use modelService and standard model settersOrdercreateOrder(User user, Currency currency, java.util.Date date, boolean net)Deprecated.since ages - use modelService and standard model settersOrdercreateOrder(java.lang.String code, User user, Currency currency, java.util.Date date, boolean net)Deprecated.since ages - use modelService and standard model settersPaymentModecreatePaymentMode(ComposedType type, java.lang.String code, ComposedType paymentInfoType)Deprecated.since ages - Use ModelService to create PaymentMode and standard setters to provide attribute values.TaxcreateTax(java.lang.String code)Deprecated.since ages - Use ModelService to create Taxes and standard setters to set attribute values.TaxValuecreateTaxValue(java.lang.String code, double value, boolean absolute, Tax tax)Deprecated.since ages - just instantiateTaxValuedirectlyjava.util.CollectiongetAllDeliveryModes()Deprecated.since ages - Use DeliveryModeService.getAllDeliveryModes() instead.java.util.CollectiongetAllDiscounts()Deprecated.since ages - Obsolete get all method.java.util.CollectiongetAllDiscounts(boolean global)Deprecated.since ages - Obsolete get all method.java.util.CollectiongetAllOrders()Returns allOrders.java.util.CollectiongetAllPaymentInfos()Deprecated.since ages - Obsolete get all method.java.util.CollectiongetAllPaymentModes()Deprecated.since ages - Use PaymentModeService#getAllPaymentModes() instead.java.util.CollectiongetAllTaxes()Deprecated.since ages - Obsolete get all method.java.lang.StringgetCartEntryTypeCode()Deprecated.since ages - Use CartEntryModel._TYPECODE instead.protected java.lang.StringgetCartTypeCode()Deprecated.since ages - Use CartModel._TYPECODE instead.CloneCartStrategy<Cart>getCloneCartStrategy()Deprecated.since ages - Use spring injected de.hybris.platform.order.strategies.ordercloning.CartCloningStrategy instead.protected CloneOrderStrategy<Order>getCloneOrderStrategy()Deprecated.since ages - Use spring injected de.hybris.platform.order.strategies.ordercloning.CloneOrderStrategy instead.AbstractPriceFactorygetDefaultPriceFactory()Returns the defaultPriceFactory.DeliveryCostsStrategygetDeliveryCostsStrategy()DeliveryModegetDeliveryModeByCode(java.lang.String code)Deprecated.since ages - Use DeliveryModeService.getDeliveryModeForCode(String) instead.protected java.lang.StringgetDeliveryModeTypeCode()Deprecated.since ages - Use DeliveryModeModel._TYPECODE instead.EnumerationTypegetDeliveryStatusType()Deprecated.since ages - Use DeliveryStatus.getType()DiscountgetDiscountByCode(java.lang.String code)Deprecated.since ages - Use DiscountService.getDiscountForCode(String).java.util.CollectiongetDiscountsByCode(java.lang.String searchString)Deprecated.since ages - UseDiscountService.getDiscountsForCode(String).protected java.lang.StringgetDiscountTypeCode()Deprecated.since ages - Use DiscountModel._TYPECODE instead.EnumerationTypegetExportStatusType()Deprecated.since ages - Use ExportStatus.getType() instead.static OrderManagergetInstance()java.lang.StringgetOrderEntryTypeCode()Deprecated.since ages - Use OrderEntryModel._TYPECODE instead.java.util.CollectiongetOrders(User user)Deprecated.since ages - please useGeneratedUser.getOrders()EnumerationTypegetOrderStatusType()Deprecated.since ages - Use OrderStatus.getType() instead.protected java.lang.StringgetOrderTypeCode()Deprecated.since ages - Use OrderModel._TYPECODE instead.PaymentInfogetPaymentInfoByCode(java.lang.String code)Deprecated.since payment info object are not intended to have unique codes this method makes no sense at all; further payment infos should only be accessed via their users; usegetPaymentInfosByCode(String)insteadjava.util.CollectiongetPaymentInfos(int type)Deprecated.since ages - Obsolete method.java.util.CollectiongetPaymentInfosByCode(java.lang.String code)Deprecated.since ages - Obsolete method.java.util.CollectiongetPaymentInfosByUser(User user)Deprecated.since ages - Use UserModel.getPaymentInfos() instead.protected java.lang.StringgetPaymentInfoTypeCode()Deprecated.since ages - Use PaymentInfoModel._TYPECODE instead.PaymentModegetPaymentModeByCode(java.lang.String code)Deprecated.since ages - Use PaymentModeService.getPaymentModeByCode(String) instead.protected java.lang.StringgetPaymentModeTypeCode()Deprecated.since ages - Use PaymentModeModel._TYPECODE instead.EnumerationTypegetPaymentStatusType()Deprecated.since ages - Use PaymentStatus.getType()PriceFactorygetPriceFactory()Returns the configuredPriceFactory.java.util.CollectiongetSupportedDeliveryModes(PaymentMode pm)Deprecated.since ages - Use PaymentModeModel.getSupportedDeliveryModes() instead.TaxgetTaxByCode(java.lang.String code)Deprecated.since ages - Use TaxService.getTaxForCode(String) instead.java.util.CollectiongetTaxesByCode(java.lang.String searchString)Deprecated.since ages - Use TaxService.getTaxesForCode(String) instead.protected java.lang.StringgetTaxTypeCode()Deprecated.since ages - Use TaxModel._TYPECODE instead.protected voidnotifyItemRemoval(SessionContext ctx, Item item)Avoids call to ejb layer except forPaymentModeandCurrencyinstances.protected java.util.CollectionsearchAbstractOrders(java.lang.String orderTypeCode, SearchContext context)Deprecated.since ages - Obsolete way of dynamic searching within orders.java.util.CollectionsearchCarts(SearchContext context)Deprecated.since ages - Obsolete way of dynamic searching within carts.java.util.CollectionsearchDiscounts(SearchContext context)Deprecated.since ages - Obsolete way of dynamic searching within discounts.java.util.CollectionsearchOrders(SearchContext context)Deprecated.since ages - Obsolete way of dynamic searching within orders.protected java.util.CollectionsearchPaymentInfos(User user, java.lang.String code, java.lang.Integer type)java.util.CollectionsearchTaxes(SearchContext context)Deprecated.since ages - Obsolete way of dynamic searching within taxes.voidsetCloneCartStrategy(CloneCartStrategy<Cart> cloneCartStrategy)Deprecated.since ages - Use spring injection to set de.hybris.platform.order.strategies.ordercloning.CartCloningStrategy instead.voidsetCloneOrderStrategy(CloneOrderStrategy<Order> cloneOrderStrategy)Deprecated.since ages - Use spring injection to set de.hybris.platform.order.strategies.ordercloning.CloneOrderStrategy instead.voidsetDeliveryCostsStrategy(DeliveryCostsStrategy deliveryCostsStrategys)voidsetOrderCodeGenerator(KeyGenerator orderCodeGenerator)java.lang.ObjectwriteReplace()-
Methods inherited from class de.hybris.platform.jalo.Manager
afterItemCreation, beforeItemCreation, destroy, extractNonRequiredRemoteFromItem, extractRequiredRemoteFromItem, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemote, getRemoteManagerClass, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, init, setAttribute, setTenant, setTransientObject, wrap
-
-
-
-
Field Detail
-
BEAN_NAME
public static final java.lang.String BEAN_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
setOrderCodeGenerator
public void setOrderCodeGenerator(KeyGenerator orderCodeGenerator)
-
getCloneOrderStrategy
@Deprecated protected CloneOrderStrategy<Order> getCloneOrderStrategy()
Deprecated.since ages - Use spring injected de.hybris.platform.order.strategies.ordercloning.CloneOrderStrategy instead.
-
setCloneOrderStrategy
@Deprecated public void setCloneOrderStrategy(CloneOrderStrategy<Order> cloneOrderStrategy)
Deprecated.since ages - Use spring injection to set de.hybris.platform.order.strategies.ordercloning.CloneOrderStrategy instead.
-
getCloneCartStrategy
@Deprecated public CloneCartStrategy<Cart> getCloneCartStrategy()
Deprecated.since ages - Use spring injected de.hybris.platform.order.strategies.ordercloning.CartCloningStrategy instead.
-
setCloneCartStrategy
@Deprecated public void setCloneCartStrategy(CloneCartStrategy<Cart> cloneCartStrategy)
Deprecated.since ages - Use spring injection to set de.hybris.platform.order.strategies.ordercloning.CartCloningStrategy instead.
-
getDeliveryCostsStrategy
public DeliveryCostsStrategy getDeliveryCostsStrategy()
-
setDeliveryCostsStrategy
public void setDeliveryCostsStrategy(DeliveryCostsStrategy deliveryCostsStrategys)
-
getInstance
public static OrderManager getInstance()
- Returns:
- instance of this manager
-
checkBeforeItemRemoval
protected void checkBeforeItemRemoval(SessionContext ctx, Item item) throws ConsistencyCheckException
Description copied from class:ManagerTODO improve API doc Override this method to implement pre-removal consistency checks. This method is called upon eachManagerand allows aborting removal by throwing aConsistencyCheckException. If no manager did so each one is notified by callingManager.notifyItemRemoval(SessionContext, Item).This method does nothing and may be overridden.
- Overrides:
checkBeforeItemRemovalin classManager- Parameters:
ctx- the current session contextitem- the item which should be removed- Throws:
ConsistencyCheckException- thrown to abort removal due to consistency errors
-
notifyItemRemoval
protected void notifyItemRemoval(SessionContext ctx, Item item)
Avoids call to ejb layer except forPaymentModeandCurrencyinstances.- Overrides:
notifyItemRemovalin classManager- Parameters:
ctx- the currency session contextitem- the item which is going to be removed- Since:
- 2.10
-
getDefaultPriceFactory
public AbstractPriceFactory getDefaultPriceFactory()
Returns the defaultPriceFactory.- Returns:
- the installed
PriceFactoryFirst the setting inside the project.properties (see entry 'default.pricefactory') will be consulted.. If this fails, an instance ofde.hybris.platform.jalo.order.price.DummyPriceFactorywill be returned. - Since:
- 3.00
-
getPriceFactory
public PriceFactory getPriceFactory()
Returns the configuredPriceFactory.At first the session property 'pricefactory' will be evaluated. If its value is
, the result of getDefaultPriceFactory() will be returned. - Returns:
- the current
PriceFactory - Since:
- 3.00
-
getPaymentInfoTypeCode
@Deprecated protected java.lang.String getPaymentInfoTypeCode()
Deprecated.since ages - Use PaymentInfoModel._TYPECODE instead.
-
getOrderEntryTypeCode
@Deprecated public java.lang.String getOrderEntryTypeCode()
Deprecated.since ages - Use OrderEntryModel._TYPECODE instead.
-
getOrderTypeCode
@Deprecated protected java.lang.String getOrderTypeCode()
Deprecated.since ages - Use OrderModel._TYPECODE instead.
-
getTaxTypeCode
@Deprecated protected java.lang.String getTaxTypeCode()
Deprecated.since ages - Use TaxModel._TYPECODE instead.
-
getDiscountTypeCode
@Deprecated protected java.lang.String getDiscountTypeCode()
Deprecated.since ages - Use DiscountModel._TYPECODE instead.
-
getDeliveryModeTypeCode
@Deprecated protected java.lang.String getDeliveryModeTypeCode()
Deprecated.since ages - Use DeliveryModeModel._TYPECODE instead.
-
getPaymentModeTypeCode
@Deprecated protected java.lang.String getPaymentModeTypeCode()
Deprecated.since ages - Use PaymentModeModel._TYPECODE instead.
-
getCartEntryTypeCode
@Deprecated public java.lang.String getCartEntryTypeCode()
Deprecated.since ages - Use CartEntryModel._TYPECODE instead.
-
getCartTypeCode
@Deprecated protected java.lang.String getCartTypeCode()
Deprecated.since ages - Use CartModel._TYPECODE instead.
-
getAllPaymentInfos
@Deprecated public java.util.Collection getAllPaymentInfos()
Deprecated.since ages - Obsolete get all method. Use flexible search to fetch desired payment infos.Returns allPaymentInfoobjects.- Returns:
- a
Collectioncontaining allPaymentInfos.
-
getPaymentInfos
@Deprecated public java.util.Collection getPaymentInfos(int type)
Deprecated.since ages - Obsolete method. Use flexible search to fetch desired PaymentInfos.AllPaymentInfos of the specified type. The types are defined inPaymentInfo.- Parameters:
type- the type of the searchedPaymentInfos- Returns:
- a
Collectionof allPaymentInfos of the specified type.
-
getPaymentInfosByUser
@Deprecated public java.util.Collection getPaymentInfosByUser(User user)
Deprecated.since ages - Use UserModel.getPaymentInfos() instead.Returns allPaymentInfos of the specifiedUser.- Parameters:
user- theUserwhoesPaymentInfos should be returned.- Returns:
- a
Collectionof allPaymentInfos of the specifiedUser
-
getPaymentInfoByCode
@Deprecated public PaymentInfo getPaymentInfoByCode(java.lang.String code) throws JaloItemNotFoundException
Deprecated.since payment info object are not intended to have unique codes this method makes no sense at all; further payment infos should only be accessed via their users; usegetPaymentInfosByCode(String)insteadFinds a payment info object by its code.- Parameters:
code-- Returns:
- the
PaymentInfowith the given code - Throws:
JaloItemNotFoundException
-
getPaymentInfosByCode
@Deprecated public java.util.Collection getPaymentInfosByCode(java.lang.String code)
Deprecated.since ages - Obsolete method. Since payment info object are not intended to have unique codes this method makes no sense at all; further PaymentInfos should only be accessed via their users.Returns allPaymentInfos object which match the given code ('%' as wildcard can be used).- Parameters:
code- the code- Returns:
- a
CollectionofPaymentInfos
-
searchPaymentInfos
protected java.util.Collection searchPaymentInfos(User user, java.lang.String code, java.lang.Integer type)
-
getSupportedDeliveryModes
@Deprecated public java.util.Collection getSupportedDeliveryModes(PaymentMode pm)
Deprecated.since ages - Use PaymentModeModel.getSupportedDeliveryModes() instead.Gets supported delivery modes for a given PaymentMode- Parameters:
pm-- Returns:
- collection with supported DeliveryModes
-
getAllOrders
public java.util.Collection getAllOrders()
Returns allOrders.- Returns:
- a
Collectioncontaining allOrders
-
getOrders
@Deprecated public java.util.Collection getOrders(User user)
Deprecated.since ages - please useGeneratedUser.getOrders()Returns all orders of the specifiedUser.- Parameters:
user-- Returns:
- a
Collectioncontaining allOrders of the specifiedUser
-
createOrder
@Deprecated public Order createOrder(User user, Currency currency, java.util.Date date, boolean net) throws JaloInvalidParameterException
Deprecated.since ages - use modelService and standard model settersCreates new order object for one user. The order code is generated automatically.- Parameters:
user-currency-date-net-- Returns:
- the new
Order - Throws:
JaloInvalidParameterException
-
createOrder
@Deprecated public Order createOrder(java.lang.String code, User user, Currency currency, java.util.Date date, boolean net) throws JaloInvalidParameterException
Deprecated.since ages - use modelService and standard model settersCreates new order object for one user.- Parameters:
code-user-currency-date-net-- Returns:
- the new
Order - Throws:
JaloInvalidParameterException
-
createOrder
@Deprecated public Order createOrder(ComposedType type, java.lang.String code, User user, Currency currency, java.util.Date date, boolean net) throws JaloInvalidParameterException
Deprecated.since ages - use modelService and standard model settersCreates new order object for one user.- Parameters:
code-user-currency-date-net-- Returns:
- the new
Order - Throws:
JaloInvalidParameterException
-
createOrder
@Deprecated public Order createOrder(PK pk, java.lang.String code, User user, Currency currency, java.util.Date date, boolean net) throws JaloInvalidParameterException
Deprecated.since ages - use modelService and standard model settersCreates new order object for one user.- Parameters:
pk- the pk for the new item; it will be equipped with type code additionally (- ) code-user-currency-date-net-- Returns:
- the new
Order - Throws:
JaloInvalidParameterException
-
createOrder
@Deprecated public Order createOrder(ComposedType type, PK pkBase, java.lang.String code, User user, Currency currency, java.util.Date date, boolean net)
Deprecated.since ages - use modelService and standard model settersCreates new order object for one user.- Parameters:
pkBase- the pk for the new item; it will be equipped with type code additionally (- ) code-user-currency-date-net-- Returns:
- the new
Order - Throws:
JaloInvalidParameterException
-
createCart
@Deprecated public Cart createCart(User user, Currency currency, java.util.Date date, boolean net) throws ConsistencyCheckException, JaloInvalidParameterException
Deprecated.since ages - use modelService and standard model settersCreates new cart object for one user. The cart code is generated automatically.- Parameters:
user-currency-date-net-- Returns:
- the new
Cart - Throws:
JaloInvalidParameterExceptionConsistencyCheckException
-
createCart
@Deprecated public Cart createCart(java.lang.String code, User user, Currency currency, java.util.Date date, boolean net) throws ConsistencyCheckException, JaloInvalidParameterException
Deprecated.since ages - use modelService and standard model settersCreates new cart object for one user.- Parameters:
code-user-currency-date-net-- Returns:
- the new
Cart - Throws:
JaloInvalidParameterExceptionConsistencyCheckException
-
createCart
@Deprecated public Cart createCart(ComposedType type, java.lang.String code, User user, Currency currency, java.util.Date date, boolean net) throws ConsistencyCheckException, JaloInvalidParameterException
Deprecated.since ages - use modelService and standard model settersCreates new cart object for one user.- Parameters:
code-user-currency-date-net-- Returns:
- the new
Cart - Throws:
JaloInvalidParameterExceptionConsistencyCheckException
-
createCart
@Deprecated public Cart createCart(PK pk, java.lang.String code, User user, Currency currency, java.util.Date date, boolean net) throws ConsistencyCheckException, JaloInvalidParameterException
Deprecated.since ages - use modelService and standard model settersCreates new cart object for one user.- Parameters:
pk- the pk for the new item; it will be equipped with type code additionally (- ) code-user-currency-date-net-- Returns:
- the new
Cart - Throws:
JaloInvalidParameterExceptionConsistencyCheckException
-
createCart
@Deprecated public Cart createCart(ComposedType type, PK pkBase, java.lang.String code, User user, Currency currency, java.util.Date date, boolean net) throws ConsistencyCheckException, JaloInvalidParameterException
Deprecated.since ages - use modelService and standard model settersCreates new cart object for one user.- Parameters:
pkBase- the pk for the new item; it will be equipped with type code additionally (- ) code-user-currency-date-net-- Returns:
- the new
Cart - Throws:
JaloInvalidParameterExceptionConsistencyCheckException
-
createOrder
@Deprecated public Order createOrder(AbstractOrder original)
Deprecated.since ages - use de.hybris.platform.order.OrderService.createOrder(ComposedTypeModel, ComposedTypeModel , AbstractOrderModel, String );Creates a newOrder, which takes all informations and entries from an existingAbstractOrder. This includes user, currency and gross / net status. Please note that the order is not calculated , even if the cart has been.- Parameters:
original- the original order which will be copied- Returns:
- the new
Order
-
createOrder
@Deprecated public Order createOrder(ComposedType type, ComposedType entryType, AbstractOrder original)
Deprecated.since ages - use de.hybris.platform.order.OrderService.createOrder(ComposedTypeModel, ComposedTypeModel , AbstractOrderModel, String );Creates a newOrder, which takes all informations and entries from an existingAbstractOrder. This includes user, currency and gross / net status. Please note that the order is not calculated , even if the cart has been.- Parameters:
type- the item type of the new orderentryType- the item type of the new order entriesoriginal- the original order which will be copied- Returns:
- the new
Order
-
createCart
@Deprecated public Cart createCart(AbstractOrder original, java.lang.String newCode) throws ConsistencyCheckException
Deprecated.since ages - use de.hybris.platform.order.CartService.createCart(ComposedTypeModel, ComposedTypeModel , AbstractOrderModel, String );Creates a newCart, which takes all informations and entries from an existingAbstractOrder. This includes user, currency, date and gross / net status. Please note that the order is not calculated , even if the cart has been.- Parameters:
original- the original order which will be copiednewCode- the code of the newCart- Returns:
- the new
Order - Throws:
ConsistencyCheckException
-
createCart
@Deprecated public Cart createCart(ComposedType type, ComposedType entryType, AbstractOrder original, java.lang.String newCode) throws ConsistencyCheckException
Deprecated.since ages - use de.hybris.platform.order.CartService.createCart(ComposedTypeModel, ComposedTypeModel , AbstractOrderModel, String );Creates a newCart, which takes all informations and entries from an existingAbstractOrder. This includes user, currency, date and gross / net status. Please note that the order is not calculated , even if the cart has been.- Parameters:
original- the original order which will be copiednewCode- the code of the newCart- Returns:
- the new
Order - Throws:
ConsistencyCheckException
-
searchOrders
@Deprecated public java.util.Collection searchOrders(SearchContext context)
Deprecated.since ages - Obsolete way of dynamic searching within orders. Use FlexibleSearchService to query for orders.Searches allOrderswith the specifiedSearchContext. The following propertie fields are availaible:-
GeneratedAbstractOrder.CODE:String| null -
GeneratedAbstractOrder.USER:User| null -
Order.START_DATE:Date| null -
Order.END_DATE:Date| null -
GeneratedAbstractOrder.CURRENCY:Currency| null -
GeneratedAbstractOrder.NET: java.lang.Boolean | null -
GeneratedAbstractOrder.STATUS:EnumerationValue| null -
AbstractOrder.PAYMENT_MODE:PaymentMode| null -
AbstractOrder.DELIVERY_MODE:DeliveryMode| null -
AbstractOrder.PAYMENT_STATUS:EnumerationValue| null -
AbstractOrder.DELIVERY_STATUS:EnumerationValue| null
- Parameters:
context-- Returns:
- a
Collectioncontaining allOrders which matched the specifiedSearchContext
-
-
searchAbstractOrders
@Deprecated protected java.util.Collection searchAbstractOrders(java.lang.String orderTypeCode, SearchContext context)Deprecated.since ages - Obsolete way of dynamic searching within orders. Use FlexibleSearchService to query for orders.Implementation method forsearchOrders(SearchContext)andsearchCarts(SearchContext).- Parameters:
orderTypeCode- the actual type code of orders to searchcontext- the search context holding the parameters- Returns:
- the found orders
- Since:
- 2.10
-
searchCarts
@Deprecated public java.util.Collection searchCarts(SearchContext context)
Deprecated.since ages - Obsolete way of dynamic searching within carts. Use FlexibleSearchService to query for carts.Searches allCartswith the specifiedSearchContext. The following propertie fields are availaible:-
GeneratedAbstractOrder.CODE:String| null -
GeneratedAbstractOrder.USER:User| null -
Cart.START_DATE:Date| null -
Cart.END_DATE:Date| null -
GeneratedAbstractOrder.CURRENCY:Currency| null -
GeneratedAbstractOrder.NET: java.lang.Boolean | null -
AbstractOrder.ORDER_STATUS_TYPE:EnumerationValue| null -
AbstractOrder.PAYMENT_MODE:PaymentMode| null -
AbstractOrder.DELIVERY_MODE:DeliveryMode| null
- Parameters:
context-- Returns:
- a
Collectioncontaining allCartss which matched the specifiedSearchContext
-
-
searchTaxes
@Deprecated public java.util.Collection searchTaxes(SearchContext context)
Deprecated.since ages - Obsolete way of dynamic searching within taxes. Use FlexibleSearchService to query for taxes.Searches allTaxwith the specifiedSearchContext. See tax for definition of search properties.Null values are equivalent to omitting the field. This has the meaning that all objects will be found, if not constricted by other fields.
- Parameters:
context- the search context containing all search parameters- Returns:
- the collection of found tax object
-
searchDiscounts
@Deprecated public java.util.Collection searchDiscounts(SearchContext context)
Deprecated.since ages - Obsolete way of dynamic searching within discounts. Use FlexibleSearchService to query for discounts.Searches allDiscountwith the specifiedSearchContext. See discount for definition of search properties.Null values are equivalent to omitting the field. This has the meaning that all objects will be found, if not constricted by other fields.
- Parameters:
context- the search context containing all search parameters- Returns:
- the collection of found tax object
-
getAllTaxes
@Deprecated public java.util.Collection getAllTaxes()
Deprecated.since ages - Obsolete get all method. Use FlexibleSearchService to query for taxes.Returns all>Taxobjects.- Returns:
- a
Collectionof allTax/code>es
-
getTaxesByCode
@Deprecated public java.util.Collection getTaxesByCode(java.lang.String searchString)
Deprecated.since ages - Use TaxService.getTaxesForCode(String) instead.Returns allTaxobjects which matched the specified code.- Parameters:
searchString- an SQL-Like statement as String- Returns:
- a
Collectionof allTax/code>es which matched the specified code
-
getTaxByCode
@Deprecated public Tax getTaxByCode(java.lang.String code)
Deprecated.since ages - Use TaxService.getTaxForCode(String) instead.Returns theTaxwith the specified code.- Parameters:
code- the code- Returns:
- a
Taxwith the specified code
-
createTax
@Deprecated public Tax createTax(java.lang.String code) throws ConsistencyCheckException
Deprecated.since ages - Use ModelService to create Taxes and standard setters to set attribute values.Creates a newTaxobject.- Parameters:
code- the code of the newTax- Returns:
- the new
Taxobject - Throws:
ConsistencyCheckException- if the specified code is already in use.
-
createTaxValue
@Deprecated public TaxValue createTaxValue(java.lang.String code, double value, boolean absolute, Tax tax)
Deprecated.since ages - just instantiateTaxValuedirectlyCreates a new tax value object.- Parameters:
code-value-absolute-tax-- Returns:
- the new
TaxValue
-
createDiscountValue
@Deprecated public DiscountValue createDiscountValue(java.lang.String code, java.lang.String description, double value, int priority, boolean absolute, Discount discount)
Deprecated.since ages - just instantiateDiscountValueCreates a new discount value object.- Parameters:
code-description-value-priority-absolute-discount-- Returns:
- the new
DiscountValueobject.
-
getAllDiscounts
@Deprecated public java.util.Collection getAllDiscounts()
Deprecated.since ages - Obsolete get all method. Use FlexibleSearchService to query for Discounts.Returns all discount objects.- Returns:
- a
Collectionof allDiscounts
-
getAllDiscounts
@Deprecated public java.util.Collection getAllDiscounts(boolean global)
Deprecated.since ages - Obsolete get all method. Use FlexibleSearchService to query for Discounts.Returns all discount objects which global flag is set to the specified value.- Parameters:
global-- Returns:
- all global discounts if global is true; all non-global discounts otherwise
-
getDiscountByCode
@Deprecated public Discount getDiscountByCode(java.lang.String code)
Deprecated.since ages - Use DiscountService.getDiscountForCode(String).Finds a discount object by its code.- Parameters:
code-- Returns:
- the
Discountwith the specified code
-
getDiscountsByCode
@Deprecated public java.util.Collection getDiscountsByCode(java.lang.String searchString)
Deprecated.since ages - UseDiscountService.getDiscountsForCode(String).Finds multiple discount objects by their code.- Parameters:
searchString- SQL-LIKE statement as String ( %ab% , a_b% , ... )- Returns:
- a
CollectionofDiscountmatching the specified code
-
createDiscount
@Deprecated public Discount createDiscount(java.lang.String code) throws ConsistencyCheckException
Deprecated.since ages - Use ModelService to create Discounts and standard setters to provide attribute values.Creates a new discout object.- Parameters:
code-- Returns:
- the new
Discount - Throws:
ConsistencyCheckException- if the code is already in use
-
createDeliveryMode
@Deprecated public DeliveryMode createDeliveryMode(ComposedType type, java.lang.String code) throws ConsistencyCheckException
Deprecated.since ages - Use ModelService to create DeliveryMode and standard setters to provide attribute values.- Throws:
ConsistencyCheckException
-
getAllDeliveryModes
@Deprecated public java.util.Collection getAllDeliveryModes()
Deprecated.since ages - Use DeliveryModeService.getAllDeliveryModes() instead.Returns allDeliveryobjects- Returns:
- a
Collectionof allDeliveryobjects
-
getDeliveryModeByCode
@Deprecated public DeliveryMode getDeliveryModeByCode(java.lang.String code) throws JaloItemNotFoundException
Deprecated.since ages - Use DeliveryModeService.getDeliveryModeForCode(String) instead.Returns theDeliveryModewith the specified code.- Parameters:
code-- Returns:
- the
DeliveryModewith the specified code - Throws:
JaloItemNotFoundException- if noDeliveryModewith the specified code exists
-
createPaymentMode
@Deprecated public PaymentMode createPaymentMode(ComposedType type, java.lang.String code, ComposedType paymentInfoType) throws ConsistencyCheckException
Deprecated.since ages - Use ModelService to create PaymentMode and standard setters to provide attribute values.- Throws:
ConsistencyCheckException
-
getPaymentModeByCode
@Deprecated public PaymentMode getPaymentModeByCode(java.lang.String code) throws JaloItemNotFoundException
Deprecated.since ages - Use PaymentModeService.getPaymentModeByCode(String) instead.Returns thePaymentModewith the specified code.- Parameters:
code-- Returns:
- the
PaymentModewith the specified code - Throws:
JaloItemNotFoundException- if noPaymentModewith the specified code exists
-
getAllPaymentModes
@Deprecated public java.util.Collection getAllPaymentModes()
Deprecated.since ages - Use PaymentModeService#getAllPaymentModes() instead.Returns allPaymentModeobjects- Returns:
- a
Collectionof allPaymentModeobjects
-
appendToCart
@Deprecated public void appendToCart(Cart sourceCart, Cart targetCart)
Deprecated.since ages - Use CartService.appendToCart(CartModel, CartModel) instead.Copies all entries of one cart to another cart.- Parameters:
sourceCart- the cart providing the entries to copytargetCart- the taret cart to create new entries for
-
getOrderStatusType
@Deprecated public EnumerationType getOrderStatusType()
Deprecated.since ages - Use OrderStatus.getType() instead.Gets the order status enumeration type.- Returns:
- the order status enumeration type.
-
getPaymentStatusType
@Deprecated public EnumerationType getPaymentStatusType()
Deprecated.since ages - Use PaymentStatus.getType()Gets the payment status enumeration type.- Returns:
- the payment status enumeration type.
-
getDeliveryStatusType
@Deprecated public EnumerationType getDeliveryStatusType()
Deprecated.since ages - Use DeliveryStatus.getType()Gets the delivery status enumeration type.- Returns:
- the delivery status enumeration type.
-
getExportStatusType
@Deprecated public EnumerationType getExportStatusType()
Deprecated.since ages - Use ExportStatus.getType() instead.Gets the export status enumeration type.- Returns:
- the export status enumeration type.
-
adjustOrderCode
@Deprecated protected java.lang.String adjustOrderCode(java.lang.String presetCode)
Deprecated.since ages - Since 4.3 the following is done automatically by order'sDefaultAbstractOrderPrepareInterceptor
-
writeReplace
public java.lang.Object writeReplace() throws java.io.ObjectStreamException- Specified by:
writeReplacein classManager- Throws:
java.io.ObjectStreamException
-
-