Class Product

All Implemented Interfaces:
Serializable, Comparable
Direct Known Subclasses:
GeneratedApparelProduct, GeneratedSubscriptionProduct, GeneratedVariantProduct

@Deprecated(since="ages", forRemoval=false) public class Product extends GeneratedProduct
Deprecated.
since ages - as of release 4.3, please useProductModel instead

Represents a product.

See Also:
  • Constructor Details

    • Product

      public Product()
      Deprecated.
  • Method Details

    • createItem

      protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
      Deprecated.
      Description copied from class: Item
      Has to be implemented for each concrete subtype of item. This method is responsible for creating a new item instance ( by calling managers, ejb homes, etc. ) during ComposedType.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; }
      
       
      Overrides:
      createItem in class GenericItem
      Parameters:
      ctx - the current session context which this item is created within
      type - 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
    • getAllNames

      @Deprecated(since="ages", forRemoval=false) public Map getAllNames(SessionContext ctx)
      Deprecated.
      Gives all names (in all languages).
      Parameters:
      ctx - A SessionContext object
      Returns:
      map with following combination key:language, value:name
    • setAllNames

      @AttributeSetter("Product.name") @Deprecated(since="ages", forRemoval=false) public void setAllNames(SessionContext ctx, Map names)
      Sets names (in all languages).
      Parameters:
      ctx - A SessionContext object
      names - map with following combination key:language, value:name
    • getAllDescriptions

      @Deprecated(since="ages", forRemoval=false) public Map getAllDescriptions(SessionContext ctx)
      Gives all descriptions (in all languages).
      Parameters:
      ctx - A SessionContext object
      Returns:
      map with following combination key:language, value:description
    • setAllDescriptions

      @AttributeSetter("Product.description") @Deprecated(since="ages", forRemoval=false) public void setAllDescriptions(SessionContext ctx, Map descriptions)
      Sets descriptions (in all languages).
      Parameters:
      ctx - A SessionContext object
      descriptions - map with following combination key:language, value:description
    • getAllPriceInformations

      @Deprecated(since="ages", forRemoval=false) public ProductPriceInformations getAllPriceInformations(boolean net) throws JaloPriceFactoryException
      Deprecated.
      Please use {@link de.hybris.platform.product.PriceService.getAllPriceInformation(PriceCriteria)} when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation (prices, tax & discounts) processing strategy.
      Calculates all applicable prices, taxes and discounts for this product and the current session user at the current time.

      As default this methods just calls AbstractPriceFactory.getAllPriceInformations(Product, Date, boolean). Override this method to implement other (non-pricefactory) logic.

      Parameters:
      net - tells whether net or gross prices are requested
      Returns:
      the ProductPriceInformations object
      Throws:
      JaloPriceFactoryException - indicates an price calculation error
    • getAllPriceInformations

      @Deprecated(since="ages", forRemoval=false) public ProductPriceInformations getAllPriceInformations(SessionContext ctx, boolean net) throws JaloPriceFactoryException
      Deprecated.
      Please use {@link de.hybris.platform.product.PriceService.getAllPriceInformation(PriceCriteria)} when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation (prices, tax & discounts) processing strategy.
      Calculates all applicable prices, taxes and discounts for this product and the current session user at the current time.

      As default this methods just calls AbstractPriceFactory.getAllPriceInformations(Product, Date, boolean). Override this method to implement other (non-pricefactory) logic.

      Parameters:
      net - tells whether net or gross prices are requested
      Returns:
      the ProductPriceInformations object
      Throws:
      JaloPriceFactoryException - indicates an price calculation error
      Since:
      2.10
    • getAllPriceInformations

      @Deprecated(since="ages", forRemoval=false) public ProductPriceInformations getAllPriceInformations(Date forDate, boolean net) throws JaloPriceFactoryException
      Deprecated.
      Please use {@link de.hybris.platform.product.PriceService.getAllPriceInformation(PriceCriteria)} when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation (prices, tax & discounts) processing strategy.
      Calculates all applicable prices, taxes and discounts for this product and the current session user at the given time.

      As default this methods just calls AbstractPriceFactory.getAllPriceInformations(Product, Date, boolean). Override this method to implement other (non-pricefactory) logic.

      Parameters:
      net - tells whether net or gross prices are requested
      forDate - the date to calculate prices, taxes and discounts for
      Returns:
      the ProductPriceInformations object
      Throws:
      JaloPriceFactoryException - indicates an price calculation error
    • getAllPriceInformations

      @Deprecated(since="ages", forRemoval=false) public ProductPriceInformations getAllPriceInformations(SessionContext ctx, Date forDate, boolean net) throws JaloPriceFactoryException
      Deprecated.
      Please use {@link de.hybris.platform.product.PriceService.getAllPriceInformation(PriceCriteria)} when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation (prices, tax & discounts) processing strategy.
      Calculates all applicable prices, taxes and discounts for this product and the current session user at the given time.

      As default this methods just calls AbstractPriceFactory.getAllPriceInformations(Product, Date, boolean). Override this method to implement other (non-pricefactory) logic.

      Parameters:
      net - tells whether net or gross prices are requested
      forDate - the date to calculate prices, taxes and discounts for
      Returns:
      the ProductPriceInformations object
      Throws:
      JaloPriceFactoryException - indicates an price calculation error
      Since:
      2.10
    • getPriceInformations

      @Deprecated(since="ages", forRemoval=false) public List getPriceInformations(Date forDate, boolean net) throws JaloPriceFactoryException
      Deprecated.
      Please use {@link de.hybris.platform.product.PriceService.getPriceInformations(PriceCriteria)} when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation (prices, tax & discounts) processing strategy.
      Calculates all applicable prices for this product and the current session user.
      Parameters:
      forDate - the date for which the prices should be calculated
      net - tells whether net or gross prices are requested
      Returns:
      a List containing PriceInformations
      Throws:
      JaloPriceFactoryException - indicates an price calculation error
    • getPriceInformations

      @Deprecated(since="ages", forRemoval=false) public List getPriceInformations(SessionContext ctx, Date forDate, boolean net) throws JaloPriceFactoryException
      Deprecated.
      Please use {@link de.hybris.platform.product.PriceService.getPriceInformations(PriceCriteria)} when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation (prices, tax & discounts) processing strategy.
      Calculates all applicable prices for this product and the current session user.
      Parameters:
      forDate - the date for which the prices should be calculated
      net - tells whether net or gross prices are requested
      Returns:
      a List containing PriceInformations
      Throws:
      JaloPriceFactoryException - indicates an price calculation error
      Since:
      2.10
    • getPriceInformations

      @Deprecated(since="ages", forRemoval=false) public List getPriceInformations(boolean net) throws JaloPriceFactoryException
      Deprecated.
      Please use {@link de.hybris.platform.product.PriceService.getPriceInformationsForProduct(ProductModel)} when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation (prices, tax & discounts) processing strategy.
      Calculates all applicable prices for this product and the current session user at this time.
      Parameters:
      net - tells whether net or gross prices are requested
      Returns:
      a List containing PriceInformations
      Throws:
      JaloPriceFactoryException - indicates an price calculation error
    • getPriceInformations

      @Deprecated(since="ages", forRemoval=false) public List getPriceInformations(SessionContext ctx, boolean net) throws JaloPriceFactoryException
      Deprecated.
      Please use {@link de.hybris.platform.product.PriceService.getPriceInformations(PriceCriteria)} when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation (prices, tax & discounts) processing strategy.
      Calculates all applicable prices for this product and the current session user at this time.
      Parameters:
      net - tells whether net or gross prices are requested
      Returns:
      a List containing PriceInformations
      Throws:
      JaloPriceFactoryException - indicates an price calculation error
      Since:
      2.10
    • getTaxInformations

      @Deprecated(since="ages", forRemoval=false) public List getTaxInformations(Date forDate) throws JaloPriceFactoryException
      Deprecated.
      Please use {@link de.hybris.platform.order.TaxService.getTaxInformations(BaseCriteria)} when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation (prices, tax & discounts) processing strategy.
      Calculates all applying taxes for this product and the current session user.
      Parameters:
      forDate - the date (in case taxes are assoziated time dependantly)
      Returns:
      a List containing TaxInformations
      Throws:
      JaloPriceFactoryException - indicates an price calculation error
    • getTaxInformations

      @Deprecated(since="ages", forRemoval=false) public List getTaxInformations(SessionContext ctx, Date forDate) throws JaloPriceFactoryException
      Deprecated.
      Please use {@link de.hybris.platform.order.TaxService.getTaxInformations(BaseCriteria)} when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation (prices, tax & discounts) processing strategy.
      Calculates all applying taxes for this product and the current session user.
      Parameters:
      forDate - the date (in case taxes are assoziated time dependantly)
      Returns:
      a List containing TaxInformations
      Throws:
      JaloPriceFactoryException - indicates an price calculation error
      Since:
      2.10
    • getTaxInformations

      @Deprecated(since="ages", forRemoval=false) public List getTaxInformations() throws JaloPriceFactoryException
      Deprecated.
      Please use {@link de.hybris.platform.order.TaxService.getTaxInformations(BaseCriteria)} when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation (prices, tax & discounts) processing strategy.
      Calculates all applying taxes for this product and the current session user at this time.
      Returns:
      a List containing TaxInformations
      Throws:
      JaloPriceFactoryException - indicates an price calculation error
    • getTaxInformations

      @Deprecated(since="ages", forRemoval=false) public List getTaxInformations(SessionContext ctx) throws JaloPriceFactoryException
      Deprecated.
      Please use {@link de.hybris.platform.order.TaxService.getTaxInformations(BaseCriteria)} when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation (prices, tax & discounts) processing strategy.
      Calculates all applying taxes for this product and the current session user at this time.
      Returns:
      a List containing TaxInformations
      Throws:
      JaloPriceFactoryException - indicates an price calculation error
      Since:
      2.10
    • getDiscountInformations

      @Deprecated(since="ages", forRemoval=false) public List getDiscountInformations(Date forDate, boolean net) throws JaloPriceFactoryException
      Deprecated.
      Please use {@link de.hybris.platform.order.DiscountService.getDiscountInformations(BaseCriteria)} when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation (prices, tax & discounts) processing strategy.
      Calculates all applying discounts for this product and the current session user.
      Parameters:
      forDate - the date (in case discounts are assoziated time dependantly)
      net - true if net values should be caculated
      Returns:
      a List containing DiscountInformations
      Throws:
      JaloPriceFactoryException - indicates an calculation error
    • getDiscountInformations

      @Deprecated(since="ages", forRemoval=false) public List getDiscountInformations(SessionContext ctx, Date forDate, boolean net) throws JaloPriceFactoryException
      Deprecated.
      Please use {@link de.hybris.platform.order.DiscountService.getDiscountInformations(BaseCriteria)} when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation (prices, tax & discounts) processing strategy.
      Calculates all applying discounts for this product and the current session user.
      Parameters:
      forDate - the date (in case discounts are assoziated time dependantly)
      net - true if net values should be caculated
      Returns:
      a List containing DiscountInformations
      Throws:
      JaloPriceFactoryException - indicates an calculation error
      Since:
      2.10
    • getDiscountInformations

      @Deprecated(since="ages", forRemoval=false) public List getDiscountInformations(boolean net) throws JaloPriceFactoryException
      Deprecated.
      Please use {@link de.hybris.platform.order.DiscountService.getDiscountInformations(BaseCriteria)} when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation (prices, tax & discounts) processing strategy.
      Calculates all applying discounts for this product and the current session user at this time.
      Parameters:
      net - true if net values should be caculated
      Returns:
      a List containing DiscountInformations
      Throws:
      JaloPriceFactoryException - indicates an calculation error
    • getDiscountInformations

      @Deprecated(since="ages", forRemoval=false) public List getDiscountInformations(SessionContext ctx, boolean net) throws JaloPriceFactoryException
      Deprecated.
      Please use {@link de.hybris.platform.order.DiscountService.getDiscountInformations(BaseCriteria)} when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation (prices, tax & discounts) processing strategy.
      Calculates all applying discounts for this product and the current session user at this time.
      Parameters:
      net - true if net values should be caculated
      Returns:
      a List containing DiscountInformations
      Throws:
      JaloPriceFactoryException - indicates an calculation error
      Since:
      2.10
    • toString

      public String toString()
      Deprecated.
      Returns String representation the string representation of a product adds the product code to the representation of an Item (pk).
      Examples:
           Product 'AUDIA2' (2we8sdf/23423rwqade88%32:1)
       
      Overrides:
      toString in class Item
      Returns:
      the string representation of this product