Lightweight, template-friendly view of a Product, used to render product listings, product detail pages and shopping cart lines without exposing the full Product entity. Instances are produced from a Product entity by the toBean factory methods and are not persisted themselves. Subclasses such as ProductInStoreBean and ProductCatBean extend it with fields specific to their own listing context. Beans are ordered by product name via compareTo.
Implements: Comparable
Properties
| Property | Returns | Description |
|---|---|---|
| baseCost | BigDecimal | Base cost of the product before any freight is added, in the organisation's currency. May be null if no base cost has been set. |
| canOrderQuantity | boolean | Whether shop visitors can specify a quantity when ordering this product, rather than ordering a single unit. |
| createdDate | Date | Date and time the underlying product was created. |
| endDate | Long | Date and time after which the product is no longer available for ordering, as epoch milliseconds. Null if the product has no end date restriction. |
| freightCost | BigDecimal | Optional cost added to the base cost to cover shipping this product. May be null if no freight cost applies. |
| myOrders | List<OrderBean> | Orders placed for this product by the profile the bean was built for. Only populated when the bean was created with toBean(Product, List), otherwise null. |
| name | String | Path-safe, unique identifier of the product, used as the lookup key and in URLs. |
| orderColumns | List<String> | Names of the extra columns to display for this product in order listing tables, derived from the product's configured order columns. |
| rrp | BigDecimal | Optional recommended retail price for the product. May be null if no RRP has been set. |
| startDate | Long | Date and time from which the product becomes available for ordering, as epoch milliseconds. Null if the product has no start date restriction. |
| status | String | Workflow status of the product, for example whether it is published or a draft. See the underlying Product entity for the set of valid status values. |
| title | String | Display title of the product, shown to shop visitors. |
Methods
getName() · getTitle() · getStatus() · getStartDate() · getEndDate() · isCanOrderQuantity() · getOrderColumns() · getBaseCost() · getFreightCost() · getRrp() · getCreatedDate() · getMyOrders()
getName()
Returns: String
Path-safe, unique identifier of the product, used as the lookup key and in URLs.
getTitle()
Returns: String
Display title of the product, shown to shop visitors.
getStatus()
Returns: String
Workflow status of the product, for example whether it is published or a draft. See the underlying Product entity for the set of valid status values.
getStartDate()
Returns: Long
Date and time from which the product becomes available for ordering, as epoch milliseconds. Null if the product has no start date restriction.
getEndDate()
Returns: Long
Date and time after which the product is no longer available for ordering, as epoch milliseconds. Null if the product has no end date restriction.
isCanOrderQuantity()
Returns: boolean
Whether shop visitors can specify a quantity when ordering this product, rather than ordering a single unit.
getOrderColumns()
Returns: List<String>
Names of the extra columns to display for this product in order listing tables, derived from the product's configured order columns.
getBaseCost()
Returns: BigDecimal
Base cost of the product before any freight is added, in the organisation's currency. May be null if no base cost has been set.
getFreightCost()
Returns: BigDecimal
Optional cost added to the base cost to cover shipping this product. May be null if no freight cost applies.
getRrp()
Returns: BigDecimal
Optional recommended retail price for the product. May be null if no RRP has been set.
getCreatedDate()
Returns: Date
Date and time the underlying product was created.
getMyOrders()
Returns: List<OrderBean>
Orders placed for this product by the profile the bean was built for. Only populated when the bean was created with toBean(Product, List), otherwise null.