One line item joining a product to a lead, with an optional quantity, so a lead can record what the prospect is interested in or has been quoted. Adding the same product twice creates two line items, nothing deduplicates them. The account and funnel are denormalised onto the row so line items can be queried without joining back through the lead.
Group: Database Entities
Implements: Serializable, Relational
Properties
| Property | Returns | Description |
|---|---|---|
| adminDomain | Organisation | The account that owns the lead this line item belongs to. Lookups by id check this matches the caller's account, so a line item cannot be read across accounts. Never null. |
| createDate | Date | When the product was added to the lead, as a timestamp. Set automatically when the line item is instantiated. |
| funnelId | long | The database id of the funnel the lead was in when the product was added, copied onto the row so line items can be reported on per funnel without joining to the lead. It is a plain id, not a relationship, so it is not kept in step if the lead later moves funnel. |
| id | long | The database identifier of this line item. |
| lead | Lead | The lead this product is recorded against. Never null. |
| product | Product | The product the lead is interested in. Never null. |
| quantity | BigDecimal | How many of the product the lead is interested in. Optional, so it is null when a product was added without a quantity. Held as a decimal so fractional quantities are allowed. |
Methods
getId() · getAdminDomain() · setAdminDomain(Organisation adminDomain) · getCreateDate() · setCreateDate(Date createDate) · getFunnelId() · setFunnelId(long funnelId) · getLead() · setLead(Lead lead) · getProduct() · setProduct(Product product) · getQuantity() · setQuantity(BigDecimal quantity)
getId()
Returns: long
The database identifier of this line item.
getAdminDomain()
Returns: Organisation
The account that owns the lead this line item belongs to. Lookups by id check this matches the caller's account, so a line item cannot be read across accounts. Never null.
setAdminDomain(Organisation adminDomain)
Returns: void
Sets the account that owns the lead this line item belongs to.
| Parameter | Description |
|---|---|
adminDomain | the owning account |
getCreateDate()
Returns: Date
When the product was added to the lead, as a timestamp. Set automatically when the line item is instantiated.
setCreateDate(Date createDate)
Returns: void
Sets when the product was added to the lead.
| Parameter | Description |
|---|---|
createDate | the date and time this line item was created |
getFunnelId()
Returns: long
The database id of the funnel the lead was in when the product was added, copied onto the row so line items can be reported on per funnel without joining to the lead. It is a plain id, not a relationship, so it is not kept in step if the lead later moves funnel.
setFunnelId(long funnelId)
Returns: void
Sets the id of the funnel the lead belonged to when the product was added.
| Parameter | Description |
|---|---|
funnelId | the funnel's database id |
getLead()
Returns: Lead
The lead this product is recorded against. Never null.
setLead(Lead lead)
Returns: void
Sets the lead this product is recorded against.
| Parameter | Description |
|---|---|
lead | the lead this line item belongs to |
getProduct()
Returns: Product
The product the lead is interested in. Never null.
setProduct(Product product)
Returns: void
Sets the product the lead is interested in.
| Parameter | Description |
|---|---|
product | the product on this line item |
getQuantity()
Returns: BigDecimal
How many of the product the lead is interested in. Optional, so it is null when a product was added without a quantity. Held as a decimal so fractional quantities are allowed.
setQuantity(BigDecimal quantity)
Returns: void
Sets how many of the product the lead is interested in.
| Parameter | Description |
|---|---|
quantity | the quantity, or null to record none |