|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.clients.prodmgmt.UsageItem
UsageItem is a model class for manipulating WTPartUsageLinks.
UsageItem implements the wt.explorer.Explorable interface to allow for use in the WTExplorer.
It contains many methods which it delegates to the contained uses Part Item to allow for easy integration with the PartExplorer.
Supported API: false
Extendable: false
WTExplorer
,
PartItem
,
PartExplorer
,
WTPartUsageLink
Field Summary | |
(package private) static DecimalFormat |
df
|
private String |
id
|
private long |
lineNumber
|
private boolean |
modified
|
private static int |
newUsageCounter
|
private double |
quantity
|
private QuantityUnit |
unit
|
private WTPartUsageLink |
usageLink
|
private PartItem |
usedBy
|
private PartItem |
uses
|
Constructor Summary | |
UsageItem()
Create an empty usage item. |
|
UsageItem(PartItem uses,
PartItem usedBy)
Create a usage item between the specified part items. |
|
UsageItem(PartItem uses,
PartItem usedBy,
WTPartUsageLink usage_link)
Create a usage item between the specified part items using the specified usage link. |
Method Summary | |
void |
create()
Create a new usage link using the contained information. |
void |
delete()
Delete the usage link. |
Explorable[] |
getContents()
Return the contents of the uses part item |
static DecimalFormat |
getDecimalFormat()
|
String |
getId()
Get an identifier for this object. |
String |
getIdentity()
Return the identity icon of the uses part item |
String |
getLastUpdatedDate()
Returns the date on which this part was last updated. |
long |
getLineNumber()
Return the number of the uses part item |
String |
getLineNumberString()
Return the number of the uses part item |
String |
getName()
Return the name of the uses part item |
String |
getNumber()
Return the number of the uses part item |
Object |
getObject()
Get the contained object. |
Image |
getOpenIcon()
Return the open icon of the uses part item |
String |
getOrganizationUniqueId()
Returns the current organizationUniqueId of this PartItem. |
WTPartUsageLink |
getPartUsageLink()
Get the contained usage link. |
double |
getQuantity()
Get the quantity amount in the usage link |
String |
getQuantityString()
|
String |
getReferenceDesignator()
Returns the reference designator associated with this part. |
String |
getRevision()
Return the revision of the uses part item |
Image |
getStandardIcon()
Return the standard icon of the uses part item |
String |
getState()
Return the state of the uses part item |
String |
getType()
Return the type of the uses part item |
String |
getUniqueIdentity()
Return the unique identity icon of the uses part item |
String |
getUnitName()
Get a string representation of the units |
QuantityUnit |
getUnits()
Get the units for the quantity. |
PartItem |
getUsedBy()
Get the used by part item |
Explorable[] |
getUses()
Return the objects used by the uses part item. |
PartItem |
getUsesPart()
Get the uses part item |
String |
getVersion()
Return the version of the uses part item |
View |
getView()
Return the view of the uses part item |
String |
getViewName()
Return the view name of the uses part item |
boolean |
isModified()
Return the modified flag |
void |
setLineNumber(long a_lineNumber)
Set the quantity amount in the usage link. |
void |
setModified(boolean modified_flag)
Set the modified flag. |
void |
setObject(Object obj)
Set the contained object. |
void |
setPartUsageLink(WTPartUsageLink usage_link)
Set the contained usage link. |
void |
setQuantity(double a_quantity)
Set the quantity amount in the usage link. |
void |
setUnit(QuantityUnit a_unit)
Set the units for the quantity. |
void |
setUsedBy(PartItem usedBy)
Set the used by part item |
void |
setUses(PartItem uses)
Set the uses part item. |
String |
toString()
Return a string with debug information |
void |
update()
Update the usage link. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private WTPartUsageLink usageLink
private static int newUsageCounter
private boolean modified
private String id
private double quantity
private QuantityUnit unit
private long lineNumber
private PartItem uses
private PartItem usedBy
static DecimalFormat df
Constructor Detail |
public UsageItem()
public UsageItem(PartItem uses, PartItem usedBy)
uses
- the uses partusedBy
- the usedBy partpublic UsageItem(PartItem uses, PartItem usedBy, WTPartUsageLink usage_link)
uses
- the uses partusedBy
- the usedBy partusage_link
- the actual usage linkMethod Detail |
public void setModified(boolean modified_flag)
modified_flag
- the new value for the modified flagpublic boolean isModified()
public void create() throws WTException
create
in interface Updateable
WTException
WTException
public void update() throws WTException
update
in interface Updateable
WTException
WTException
public void delete() throws WTException
delete
in interface Updateable
WTException
WTException
public void setPartUsageLink(WTPartUsageLink usage_link)
usage_link
- the usage link to contain.public WTPartUsageLink getPartUsageLink()
public void setUses(PartItem uses)
uses
- the uses part itempublic PartItem getUsesPart()
public void setUsedBy(PartItem usedBy)
usedBy
- the used by part itempublic PartItem getUsedBy()
public String getId()
public void setLineNumber(long a_lineNumber)
public void setQuantity(double a_quantity)
a_quantity
- the amountpublic String getQuantityString()
public double getQuantity()
public void setUnit(QuantityUnit a_unit)
a_unit
- the unit to usepublic QuantityUnit getUnits()
public String getUnitName()
public String toString()
public Explorable[] getUses() throws WTException
getUses
in interface Explorable
WTException
WTException
public String getState()
public String getRevision()
public String getVersion()
public long getLineNumber()
public String getLineNumberString()
public String getNumber()
public String getType()
public String getName()
public String getOrganizationUniqueId()
public View getView()
public String getViewName()
public Image getStandardIcon()
getStandardIcon
in interface Identifiable
public Image getOpenIcon()
getOpenIcon
in interface Identifiable
public String getIdentity()
getIdentity
in interface Identifiable
public String getUniqueIdentity()
getUniqueIdentity
in interface Identifiable
public Explorable[] getContents() throws WTException
getContents
in interface Explorable
WTException
WTException
public void setObject(Object obj)
Implements the ReferenceHolder interface.
setObject
in interface ReferenceHolder
obj
- the contained objectpublic Object getObject()
Implements the ReferenceHolder interface.
getObject
in interface ReferenceHolder
public static DecimalFormat getDecimalFormat()
public String getLastUpdatedDate()
public String getReferenceDesignator()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |