public interface IItem
extends org.sistema.persist.IPersistent
IDocItemized
document.Modifier and Type | Method and Description |
---|---|
void |
addPercentage(IItemPerc itemPercentage) |
void |
addSource(IItemRelation relation)
Adds a related item with this item as the source.
|
void |
addTarget(IItemRelation relation)
Adds a related item with this item as the target.
|
java.lang.String |
getCode() |
IConcept |
getConcept() |
java.lang.String |
getDescriptionSR() |
org.sistema.cs.agenda.IAgendaEntry |
getEntry() |
java.lang.String |
getNotes()
Retrieves the notes of the item.
|
IDocItem |
getParent(byte index) |
java.util.Collection<IDocItem> |
getParents() |
IDocItem |
getParentType(byte typeId) |
IItemPerc |
getPercentage(byte typeId)
Retrieves an
ItemPercentage by type. |
java.math.BigDecimal |
getPercentageAmount(java.lang.Integer filterId,
java.math.BigDecimal docSubtotal,
java.math.BigDecimal runningSum) |
java.math.BigDecimal |
getPercentageAmount(java.lang.Integer filterId,
java.math.BigDecimal filterRate,
java.math.BigDecimal docSubtotal,
java.math.BigDecimal runningSum)
Calculates the amount of a percentage type applied to an item at certain rate.
|
java.util.Collection<IItemPerc> |
getPercentages() |
java.math.BigDecimal |
getPrice() |
java.math.BigDecimal |
getQuantity()
Retrieves the quantity of the item.
|
java.util.Collection<IDocItem> |
getRelatedDocs()
Retrieves all documents related to this item.
|
IItemRelation |
getRelatedItem(java.lang.Integer id)
Retrieves a related item relationship by its unique identifier.
|
java.util.Collection<IItemRelation> |
getRelatedItems()
Retrieves all related items-relationships of this item.
|
int |
getStatus()
Retrieves the status of the item.
|
java.math.BigDecimal |
getSubtotal()
Calculates the subtotal based on the price and a quantity of the item.
|
java.math.BigDecimal |
getTotal()
Calculates the total of the item defined as its value after applying percentages.
|
void |
remove(IItemRelation relation)
Removes a related item.
|
void |
removePercentage(IItemPerc itemPercentage)
Removes a percentage from this item.
|
void |
setConcept(IConcept concept)
Sets the concept of this item.
|
void |
setId(java.lang.Integer id) |
void |
setNotes(java.lang.String notes)
Sets the notes of this item.
|
void |
setParent(IDoc parent) |
void |
setPrice(java.math.BigDecimal price)
Sets the unit price.
|
void |
setQuantity(java.math.BigDecimal quantity)
Sets the quantity of this item.
|
void |
setRelatedDocs(java.util.Collection<IDocItem> docItems)
Sets documents related to this item.
|
void |
setStatus(int s)
Sets the status of the item.
|
void addSource(IItemRelation relation)
relation
- A relationship in which this item is the source.void addTarget(IItemRelation relation)
relation
- A relationship in which this item is the target.void addPercentage(IItemPerc itemPercentage)
itemPercentage
- java.lang.String getCode()
IConcept getConcept()
java.lang.String getDescriptionSR()
org.sistema.cs.agenda.IAgendaEntry getEntry()
java.lang.String getNotes()
IDocItem getParent(byte index)
index
- IDocItem
IDocItem getParentType(byte typeId)
typeId
- IDocItem
java.util.Collection<IDocItem> getParents()
IItemPerc getPercentage(byte typeId)
ItemPercentage
by type.typeId
- Type of the ItemPercentage
type being requested.java.math.BigDecimal getPercentageAmount(java.lang.Integer filterId, java.math.BigDecimal filterRate, java.math.BigDecimal docSubtotal, java.math.BigDecimal runningSum)
filterId
- filterRate
- docSubtotal
- runningSum
- java.math.BigDecimal getPercentageAmount(java.lang.Integer filterId, java.math.BigDecimal docSubtotal, java.math.BigDecimal runningSum)
filterId
- docSubtotal
- runningSum
- java.util.Collection<IItemPerc> getPercentages()
java.math.BigDecimal getPrice()
java.math.BigDecimal getQuantity()
IItemRelation getRelatedItem(java.lang.Integer id)
id
- Identifier of the relation wanted.java.util.Collection<IDocItem> getRelatedDocs()
In other words, all document-item relationships in which this item is the child.
java.util.Collection<IItemRelation> getRelatedItems()
IItemRelation
s set on this item.java.math.BigDecimal getSubtotal()
int getStatus()
java.math.BigDecimal getTotal()
void remove(IItemRelation relation)
relation
- Item relationship to be removed.void removePercentage(IItemPerc itemPercentage)
itemPercentage
- Percentage to be removed.void setConcept(IConcept concept)
concept
- Concept of this item.void setId(java.lang.Integer id)
void setNotes(java.lang.String notes)
notes
- Some notes.void setParent(IDoc parent)
parent
- void setPrice(java.math.BigDecimal price)
price
- Unit price of this item.void setQuantity(java.math.BigDecimal quantity)
quantity
- Quantity of this item.void setRelatedDocs(java.util.Collection<IDocItem> docItems)
docItems
- Collection of document-item relationships.void setStatus(int s)
s
-