public class Price extends AbstractPrintTalk
Modifier and Type | Class and Description |
---|---|
static class |
Price.EnumPriceType
PrintTalk 1.5 priceType enum
|
static class |
Price.EnumTaxType
PrintTalk 1.5 priceType enum
|
Modifier and Type | Field and Description |
---|---|
static String |
ATTR_AMOUNT |
static String |
ATTR_LINEID |
static String |
ATTR_LINEIDREFS |
static String |
ATTR_PRICE |
static String |
ATTR_PRICETYPE |
static String |
ATTR_TAXTYPE |
static String |
ATTR_UNITPRICE |
static String |
ELEMENT_PRICE |
ATTR_JOBIDREF, log, theElement
Constructor and Description |
---|
Price(org.cip4.jdflib.core.KElement theElement) |
Modifier and Type | Method and Description |
---|---|
Additional |
addAdditional(double amount,
double price)
add a price element
|
void |
addLineIDRef(String lineIDRef) |
Additional |
getAdditional(int i)
get a price element by LineID
|
double |
getAmount()
get amount
|
static int |
getCurrencyPrecision()
get the precision for currency
|
String |
getDropID() |
String |
getLineID() |
org.cip4.jdflib.core.VString |
getLineIDRefs()
get the list of LineIDRefs
|
Pricing |
getParentPricing()
get the parent Pricing
|
double |
getPrice()
get the price
|
Price.EnumPriceType |
getPriceTypeEnum() |
String |
getPriceTypeString() |
Price.EnumTaxType |
getTaxType() |
double |
getUnitPrice()
get the price per unit
|
boolean |
isReferenced()
if true this price is referenced e.g. from a total and need not be included
|
void |
refPrice(Price subPrice)
add the LineID of subPrice to LineIDRefs of this, ignoring duplicates
|
void |
setAmount(double price)
set amount
|
static void |
setCurrencyPrecision(int currencyPrecision)
set the precision for currency
|
void |
setDropID(String dropID) |
void |
setLineID(String lineID) |
void |
setLineIDRefs(org.cip4.jdflib.core.VString lineIDRefs) |
void |
setPrice(double price)
set the price
|
void |
setPriceType(Price.EnumPriceType priceType) |
void |
setPriceType(String priceType) |
void |
setTaxType(Price.EnumTaxType taxType) |
void |
setUnitPrice(double price)
set the price per unit
|
appendElement, equals, getAttribute, getAttribute, getAttributeMap, getBoolAttribute, getComment, getCreateElement, getCreateElement, getCreateXPathElement, getDescriptiveName, getElement, getElement, getElements, getPrintTalk, getRealAttribute, getRoot, getTElem, getXPathAttribute, getXPathElement, hashCode, init, numElements, setAttribute, setAttribute, setAttribute, setAttribute, setComment, setDescriptiveName, setRoot, setTElem, setXPathAttribute, setXPathValue, toString
public static final String ELEMENT_PRICE
public static final String ATTR_PRICE
public static final String ATTR_UNITPRICE
public static final String ATTR_AMOUNT
public static final String ATTR_LINEID
public static final String ATTR_LINEIDREFS
public static final String ATTR_PRICETYPE
public static final String ATTR_TAXTYPE
public Price(org.cip4.jdflib.core.KElement theElement)
theElement
- public Price.EnumPriceType getPriceTypeEnum()
public Price.EnumTaxType getTaxType()
public void setTaxType(Price.EnumTaxType taxType)
taxType
- public String getPriceTypeString()
public void setPriceType(Price.EnumPriceType priceType)
priceType
- public void setPriceType(String priceType)
priceType
- public static int getCurrencyPrecision()
public static void setCurrencyPrecision(int currencyPrecision)
currencyPrecision
- typically 0 e.g. for yen or 2 e.g. for $, default=2public Pricing getParentPricing()
public void setPrice(double price)
price
- public double getPrice()
public void setUnitPrice(double price)
price
- public double getUnitPrice()
public void setAmount(double price)
price
- public double getAmount()
public void setLineID(String lineID)
lineID
- public void setDropID(String dropID)
dropID
- public boolean isReferenced()
public void setLineIDRefs(org.cip4.jdflib.core.VString lineIDRefs)
lineIDRefs
- public void addLineIDRef(String lineIDRef)
lineIDRef
- public void refPrice(Price subPrice)
subPrice
- public org.cip4.jdflib.core.VString getLineIDRefs()
public String getLineID()
public String getDropID()
public Additional addAdditional(double amount, double price)
amount
- price
- public Additional getAdditional(int i)
i
- indexCopyright © 2017. All rights reserved.