getID()
:
String
Returns the unique system generated ID of the object.
getQuantityValue()
:
Number
Returns the value part of the underlying quantity object, as distinct from the unit.
isPublic()
:
boolean
A flag, typically used to determine whether the item should display in a customer's view of the list (as opposed to the list owner's view).
setProduct(product
:
Product)
:
void
Sets the referenced product for this item by storing the product's id.
setPublic(flag
:
boolean)
:
void
Typically used to determine if the item is visible to other customers.
setQuantityValue(value
:
Number)
:
void
Set the value part of the underlying quantity object, as distinct from the unit.
createPurchase
Create a purchase record for this item.
Parameters:
quantity
-
The number of items purchased.
purchaserName
-
The name of the purchaser.
Returns:
the purchase record.
getID
Returns the unique system generated ID of the object.
Returns:
the ID of object.
getList
Returns the product list that this item belongs to.
getPriority
Specify the priority level for the item. Typically the lower the
number, the higher the priority. This can be used by the owner of the product list
to express which items he/she likes to get purchased first.
Returns:
the specified priority level.
getProduct
Returns the referenced product for this item. The reference is made
via the product ID attribute. This method returns null if there is
no such product in the system or if the product exists but is not
assigned to the site catalog.
Returns:
the product referenced by this item, or null.
getProductID
Returns the ID of the product referenced by this item.
This attribute is set when a product is assigned via setProduct().
It is possible for the ID to reference a product that doesn't exist
anymore. In this case getProduct() would return null.
Returns:
the product ID, or null if none exists.
getProductOptionModel
Returns the ProductOptionModel for the product associated with this item,
or null if there is no valid product associated with this item.
Returns:
the associated ProductOptionModel or null.
getPurchasedQuantity
Returns the sum of the quantities of all the individual purchase records
for this item.
Returns:
the sum of the quantities of all the individual purchase records for this item.
getPurchasedQuantityValue
getPurchasedQuantityValue()
:
Number
Returns the value part of the underlying purchased quantity object, as distinct
from the unit.
Returns:
the value part of the underlying purchased quantity object, as distinct from the unit.
getPurchases
Returns all purchases made for this item.
Returns:
the collection of purchase records for this item. Returns an empty list if this item has not been purchased yet.
getQuantity
Returns the quantity of the item.
The quantity is the number of products or gift certificates
that get shipped when purchasing this product list item.
Returns:
the quantity of the item.
getQuantityValue
Returns the value part of the underlying quantity object, as distinct
from the unit.
Returns:
the value part of the underlying quantity object, as distinct from the unit.
getType
Returns the type of this product list item.
Returns:
a code that specifies the type of item (i.e. product or gift certificate).
isPublic
isPublic()
:
boolean
A flag, typically used to determine whether the item should display
in a customer's view of the list (as opposed to the list owner's view).
Returns:
true if the item is public.
setPriority
setPriority(priority
:
Number)
:
void
Specify the priority level for the item. Typically the lower the
number, the higher the priority. This can be used by the owner of the product list
to express which items he/she likes to get purchased first.
Parameters:
priority
-
The new priority level.
setProduct
setProduct(product
:
Product)
:
void
Sets the referenced product for this item by storing the product's id.
If null is specified, then the id is set to null.
Parameters:
product
-
The referenced product for this item.
setProductOptionModel
Store a product option model with this object. This stores a copy
of the specified model, rather than an assocation to the same instance.
Parameters:
productOptionModel
-
The object to store.
setPublic
setPublic(flag
:
boolean)
:
void
Typically used to determine if the item is visible to other customers.
Parameters:
flag
-
If true, this product list becomes visible to other customers. If false, this product list can only be seen by the owner of the product list.
setQuantity
Sets the quantity of the item.
Parameters:
value
-
the new quantity of the item.
setQuantityValue
setQuantityValue(value
:
Number)
:
void
Set the value part of the underlying quantity object, as distinct from
the unit.
Parameters:
value
-
the value to use.