Read-only projection of a Cart entity, exposing the order's contact, address and fulfilment details. Built from a persisted Cart with toBean, this bean is the shape used to render carts and orders in admin screens and templates without exposing the underlying Hibernate entity directly. The original Cart is still reachable through useCart for code that needs to perform further lookups against it.
Properties
| Property | Returns | Description |
|---|---|---|
| addressLine1 | String | First line of the delivery street address. |
| addressLine2 | String | Second line of the delivery street address. |
| addressState | String | State or province of the delivery address. |
| cartId | String | Human-readable reference for the order, shown to the customer and used to look up the cart. |
| city | String | City of the delivery address. |
| company | String | Company name associated with the order, if any. |
| country | String | Country of the delivery address. |
| firstName | String | First name of the person placing the order. |
| fulfilmentState | String | Code for the order's current fulfilment state, for example fulfilled, not fulfilled or deleted. |
| id | long | Database identifier of the cart this bean was built from. |
| orderedDate | Date | Date the cart was checked out and turned into an order. |
| orderedForOrg | OrgData | Organisation the order was placed on behalf of, if any. |
| orderNotes | String | Free-text notes entered against the order. |
| phone | String | Contact phone number for the order. |
| postcode | String | Postcode of the delivery address. |
| productOrders | List<ProductOrderBean> | The line items ordered in this cart. |
| profile | ExtProfileBean | Profile that owns this cart. |
| surName | String | Surname of the person placing the order. |
Methods
useCart(Function<Cart,R> p) · getId() · getProfile() · getOrderedForOrg() · getOrderedDate() · getOrderNotes() · getCartId() · getFirstName() · getSurName() · getPhone() · getAddressLine1() · getAddressLine2() · getCity() · getPostcode() · getAddressState() · getCountry() · getCompany() · getFulfilmentState() · getProductOrders()
useCart(Function<Cart,R> p)
Returns: R
Applies the given function to the underlying Cart entity that this bean was built from. Use this to run further Cart lookups without exposing the entity through a getter.
| Parameter | Description |
|---|---|
p | the function to apply to the underlying cart |
getId()
Returns: long
Database identifier of the cart this bean was built from.
getProfile()
Returns: ExtProfileBean
Profile that owns this cart.
getOrderedForOrg()
Returns: OrgData
Organisation the order was placed on behalf of, if any.
getOrderedDate()
Returns: Date
Date the cart was checked out and turned into an order.
getOrderNotes()
Returns: String
Free-text notes entered against the order.
getCartId()
Returns: String
Human-readable reference for the order, shown to the customer and used to look up the cart.
getFirstName()
Returns: String
First name of the person placing the order.
getSurName()
Returns: String
Surname of the person placing the order.
getPhone()
Returns: String
Contact phone number for the order.
getAddressLine1()
Returns: String
First line of the delivery street address.
getAddressLine2()
Returns: String
Second line of the delivery street address.
getCity()
Returns: String
City of the delivery address.
getPostcode()
Returns: String
Postcode of the delivery address.
getAddressState()
Returns: String
State or province of the delivery address.
getCountry()
Returns: String
Country of the delivery address.
getCompany()
Returns: String
Company name associated with the order, if any.
getFulfilmentState()
Returns: String
Code for the order's current fulfilment state, for example fulfilled, not fulfilled or deleted.
getProductOrders()
Returns: List<ProductOrderBean>
The line items ordered in this cart.