Item
instead.public class Item extends org.sistema.persist.Persistent implements IItem
IDocumentItemized
.Document
,
Serialized FormConstructor and Description |
---|
Item()
Deprecated.
Default constructor
|
Modifier and Type | Method and Description |
---|---|
private void |
add(IItemRelation r)
Deprecated.
Adds an related item.
|
void |
addPercentage(IItemPercentage ip)
Deprecated.
|
void |
addSource(IItemRelation r)
Deprecated.
Adds a related item with this item as the source.
|
void |
addTarget(IItemRelation relation)
Deprecated.
Adds a related item with this item as the target.
|
java.lang.String |
getCode()
Deprecated.
|
IConcept |
getConcept()
Deprecated.
|
java.lang.String |
getDescriptionSR()
Deprecated.
|
org.sistema.cs.agenda.IAgendaEntry |
getEntry()
Deprecated.
|
java.lang.Integer |
getId()
Deprecated.
|
java.lang.String |
getNotes()
Deprecated.
Retrieves the notes of the item.
|
IDocumentItem |
getParent(byte index)
Deprecated.
|
java.util.Collection<IDocumentItem> |
getParents()
Deprecated.
|
IDocumentItem |
getParentType(byte typeId)
Deprecated.
|
ItemPercentage |
getPercentage(byte typeId)
Deprecated.
Retrieves an
ItemPercentage by type. |
java.math.BigDecimal |
getPercentageAmount(java.lang.Integer filterId,
java.math.BigDecimal docSubtotal,
java.math.BigDecimal runningSum)
Deprecated.
|
java.math.BigDecimal |
getPercentageAmount(java.lang.Integer filterId,
java.math.BigDecimal filterRate,
java.math.BigDecimal docSubtotal,
java.math.BigDecimal runningSum)
Deprecated.
Calculates the amount of a percentage type applied to an item at certain rate.
|
java.util.Collection<IItemPercentage> |
getPercentages()
Deprecated.
|
java.math.BigDecimal |
getPrice()
Deprecated.
|
java.math.BigDecimal |
getQuantity()
Deprecated.
Retrieves the quantity of the item.
|
java.util.Collection<IDocumentItem> |
getRelatedDocs()
Deprecated.
Retrieves all documents related to this item.
|
private java.util.Map<java.lang.Integer,IDocumentItem> |
getRelatedDocsMap()
Deprecated.
|
IItemRelation |
getRelatedItem(java.lang.Integer id)
Deprecated.
Retrieves a related item relationship by its unique identifier.
|
java.util.Collection<IItemRelation> |
getRelatedItems()
Deprecated.
Retrieves all related items-relationships of this item.
|
private java.util.Map<java.lang.Integer,IItemRelation> |
getRelatedItemsMap()
Deprecated.
|
int |
getStatus()
Deprecated.
Retrieves the status of the item.
|
java.math.BigDecimal |
getSubtotal()
Deprecated.
Calculates the subtotal based on the price and a quantity of the item.
|
static java.math.BigDecimal |
getSubtotal(java.math.BigDecimal price,
java.math.BigDecimal quantity)
Deprecated.
Calculates the subtotal for a given price and quantity.
|
java.math.BigDecimal |
getTotal()
Deprecated.
Calculates the total of the item defined as its value after applying percentages.
|
void |
remove(IItemRelation relation)
Deprecated.
Removes a related item.
|
void |
removePercentage(IItemPercentage itemPercentage)
Deprecated.
Removes a percentage from this item.
|
void |
setConcept(IConcept concept)
Deprecated.
Sets the concept of this item.
|
void |
setId(java.lang.Integer id)
Deprecated.
|
void |
setNotes(java.lang.String notes)
Deprecated.
Sets the notes of this item.
|
void |
setParent(IDocument parent)
Deprecated.
|
void |
setPrice(java.math.BigDecimal newPrice)
Deprecated.
Sets the unit price.
|
void |
setQuantity(java.math.BigDecimal quantity)
Deprecated.
Sets the quantity of this item.
|
void |
setRelatedDocs(java.util.Collection<IDocumentItem> docItems)
Deprecated.
Sets documents related to this item.
|
void |
setStatus(int s)
Deprecated.
Sets the status of the item.
|
java.lang.String |
toString()
Deprecated.
|
addAttribute, addAttribute, equals, getAttribute, getAttributeMaximumLength, getAttributeMinimumLength, getAttributeValue, getField, getFieldFlagValue, getFieldNames, getFields, getFieldsUnsavedElements, getFieldValue, getPrimaryKey, getValue, hasUnsavedElements, isAttributeEditable, isAttributeRequired, isAttributeVisible, isAttributeVisible, isDeletable, isDeleted, isEditable, isFieldModified, isFieldState, isModified, isModifiedBase, isNew, setAttributeValue, setDeletable, setDeleted, setFieldFlag, setFieldState, setFieldValue, setNew
private void add(IItemRelation r)
r
- An item relationship in which this item
is either the source or the target.public void addPercentage(IItemPercentage ip)
addPercentage
in interface IItem
public void addSource(IItemRelation r)
IItem
public void addTarget(IItemRelation relation)
IItem
public java.lang.String getCode()
public IConcept getConcept()
getConcept
in interface IItem
public java.lang.String getDescriptionSR()
getDescriptionSR
in interface IItem
public org.sistema.cs.agenda.IAgendaEntry getEntry()
public java.lang.Integer getId()
getId
in interface org.sistema.persist.IPersistent
public java.util.Collection<IDocumentItem> getRelatedDocs()
IItem
In other words, all document-item relationships in which this item is the child.
getRelatedDocs
in interface IItem
private java.util.Map<java.lang.Integer,IDocumentItem> getRelatedDocsMap()
public IItemRelation getRelatedItem(java.lang.Integer id)
IItem
getRelatedItem
in interface IItem
id
- Identifier of the relation wanted.public java.util.Collection<IItemRelation> getRelatedItems()
IItem
getRelatedItems
in interface IItem
IItemRelation
s set on this item.private java.util.Map<java.lang.Integer,IItemRelation> getRelatedItemsMap()
public java.lang.String getNotes()
IItem
public IDocumentItem getParent(byte index)
getParent
in interface IItem
IDocumentItem
public IDocumentItem getParentType(byte typeId)
getParentType
in interface IItem
IDocumentItem
public java.util.Collection<IDocumentItem> getParents()
getParents
in interface IItem
public ItemPercentage getPercentage(byte typeId)
IItem
ItemPercentage
by type.getPercentage
in interface IItem
typeId
- Type of the ItemPercentage
type being requested.public java.math.BigDecimal getPercentageAmount(java.lang.Integer filterId, java.math.BigDecimal docSubtotal, java.math.BigDecimal runningSum)
getPercentageAmount
in interface IItem
public java.math.BigDecimal getPercentageAmount(java.lang.Integer filterId, java.math.BigDecimal filterRate, java.math.BigDecimal docSubtotal, java.math.BigDecimal runningSum)
IItem
getPercentageAmount
in interface IItem
public java.util.Collection<IItemPercentage> getPercentages()
getPercentages
in interface IItem
public java.math.BigDecimal getPrice()
public java.math.BigDecimal getQuantity()
IItem
getQuantity
in interface IItem
public java.math.BigDecimal getSubtotal()
IItem
getSubtotal
in interface IItem
public static java.math.BigDecimal getSubtotal(java.math.BigDecimal price, java.math.BigDecimal quantity)
price
- quantity
- public int getStatus()
public java.math.BigDecimal getTotal()
IItem
public void remove(IItemRelation relation)
IItem
public void removePercentage(IItemPercentage itemPercentage)
IItem
removePercentage
in interface IItem
itemPercentage
- Percentage to be removed.public void setConcept(IConcept concept)
IItem
setConcept
in interface IItem
concept
- Concept of this item.public void setNotes(java.lang.String notes)
IItem
public void setParent(IDocument parent)
public void setPrice(java.math.BigDecimal newPrice)
IItem
public void setQuantity(java.math.BigDecimal quantity)
IItem
setQuantity
in interface IItem
quantity
- Quantity of this item.public void setRelatedDocs(java.util.Collection<IDocumentItem> docItems)
IItem
setRelatedDocs
in interface IItem
docItems
- Collection of document-item relationships.public void setStatus(int s)
s
- new status as a bit-wise integer.public java.lang.String toString()
toString
in class java.lang.Object