|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.clients.replication.unit.UnitUsageItem
UnitUsageItem is a model class for manipulating WTUnitUsageLinks.
UnitUsageItem implements the wt.explorer.Explorable interface to allow for use in the WTExplorer.
It contains many methods which it delegates to the contained uses Unit Item to allow for easy integration with the PartExplorer.
Supported API: false
Extendable: false
WTExplorer
,
PartItem
,
wt.clients.replication.unit.PartExplorer
,
WTPartUsageLink
Field Summary | |
(package private) static DecimalFormat |
df
|
private String |
id
|
private boolean |
modified
|
private static int |
newUsageCounter
|
private double |
quantity
|
private QuantityUnit |
unit
|
private WTPartUsageLink |
usageLink
|
private UnitItem |
usedBy
|
private PartItem |
uses
|
Constructor Summary | |
UnitUsageItem()
Create an empty usage item. |
|
UnitUsageItem(PartItem uses,
UnitItem usedBy)
Create a usage item between the specified part items. |
|
UnitUsageItem(PartItem uses,
UnitItem 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 |
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 |
WTPartUsageLink |
getPartUsageLink()
Get the contained usage link. |
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 |
getUniqueIdentity()
Return the unique identity icon of the uses part item |
UnitItem |
getUsedBy()
Get the used by unit 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 |
boolean |
isModified()
Return the modified flag |
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 |
setUsedBy(UnitItem usedBy)
Set the used by unit item |
void |
setUses(PartItem uses)
Set the uses part item. |
void |
update()
Update the usage link. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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 PartItem uses
private UnitItem usedBy
static DecimalFormat df
Constructor Detail |
public UnitUsageItem()
public UnitUsageItem(PartItem uses, UnitItem usedBy)
uses
- the uses partusedBy
- the usedBy unitpublic UnitUsageItem(PartItem uses, UnitItem 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(UnitItem usedBy)
usedBy
- the used by unit itempublic UnitItem getUsedBy()
public String getId()
public Explorable[] getUses() throws WTException
getUses
in interface Explorable
WTException
WTException
public String getState()
public String getRevision()
public String getVersion()
public String getNumber()
public String getName()
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()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |