Interface Item
- All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject, OsidRelationship, Temporal
A Item represents a collection of orders. Like all OSID
objects, a Item is identified by its Id and any persisted
references should use the Id .
An Item may have multiple unit prices for different types of
currencies, such as one for payment and one for credits. Each line item
cost type should be lined up with the unit price type.
-
Method Summary
Modifier and TypeMethodDescriptiongetCosts()Gets the line item costs.getItemRecord(Type itemRecordType) Gets the item record corresponding to the givenItemrecordType.This method is used to retrieve an object implementing the requested record.getOrder()Gets the order for this item.Gets the orderIdfor this item.Gets the product for this item.Gets the productIdfor this item.longGets the quantity of the product.Gets the priceIdsfor this item.Gets the prices for this item.booleanTests if the item is a derived item as opposed to one that has been explicitly selected.Methods inherited from interface Browsable
getProperties, getPropertiesByRecordTypeModifier and TypeMethodDescriptionGets a list of properties.getPropertiesByRecordType(Type recordType) Gets a list of properties corresponding to the specified record type.Methods inherited from interface Extensible
getRecordTypes, hasRecordTypeModifier and TypeMethodDescriptionGets the record types available in this object.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.Methods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusTypeModifier and TypeMethodDescriptionGets the description associated with this instance of this OSID object.Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.Gets the genus type of this object.booleanisOfGenusType(Type genusType) Tests if this object is of the given genusType.Methods inherited from interface OsidRelationship
getEndReason, getEndReasonId, hasEndReasonModifier and TypeMethodDescriptionGets a state indicating why this relationship has ended.Gets a stateIdindicating why this relationship has ended.booleanTests if a reason this relationship came to an end is known.Methods inherited from interface Temporal
getEndDate, getStartDate, isEffectiveModifier and TypeMethodDescriptionGets the end date.Gets the start date.booleanTests if the current date is within the start end end dates inclusive.
-
Method Details
-
getOrderId
Id getOrderId()Gets the orderIdfor this item.- Returns:
- the order
Id - Compliance:
mandatory- This method must be implemented.
-
getOrder
Gets the order for this item.- Returns:
- the order
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
isDerived
boolean isDerived()Tests if the item is a derived item as opposed to one that has been explicitly selected.- Returns:
trueif this item is derived,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getProductId
Id getProductId()Gets the productIdfor this item.- Returns:
- the product
Id - Compliance:
mandatory- This method must be implemented.
-
getProduct
Gets the product for this item.- Returns:
- the product
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getUnitPriceIds
IdList getUnitPriceIds()Gets the priceIdsfor this item.- Returns:
- the price
Ids - Compliance:
mandatory- This method must be implemented.
-
getUnitPrices
Gets the prices for this item. There may be different price types for a single item.- Returns:
- the prices
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getQuantity
long getQuantity()Gets the quantity of the product.- Returns:
- the quantity of the product
- Compliance:
mandatory- This method must be implemented.
-
getCosts
CostList getCosts()Gets the line item costs.- Returns:
- the costs.
- Compliance:
mandatory- This method must be implemented.
-
getItemRecord
Gets the item record corresponding to the givenItemrecordType.This method is used to retrieve an object implementing the requested record. TheitemRecordTypemay be theTypereturned ingetRecordTypes()or any of its parents in aTypehierarchy wherehasRecordType(itemRecordType)istrue.- Parameters:
itemRecordType- the type of item record to retrieve- Returns:
- the item record
- Throws:
NullArgumentException-itemRecordTypeisnullOperationFailedException- unable to complete requestUnsupportedException-hasRecordType(itemRecordType)isfalse- Compliance:
mandatory- This method must be implemented.
-