wt.clients.prodmgmt
Class InstanceMasterItem

java.lang.Object
  extended bywt.clients.beans.explorer.WTBusinessObject
      extended bywt.clients.prodmgmt.InstanceMasterItem
All Implemented Interfaces:
Explorable, Identifiable, ReferenceHolder, Serializable

public class InstanceMasterItem
extends WTBusinessObject

InstanceMasterItem is a wrapper class for viewing WTProductInstanceMaster objects. It extends WTBusinessObject to ease implementing the wt.clients.beans.explorer.Explorable interface and allowing viewing in the Product Information Explorer.

Supported API: false

Extendable: false

See Also:
WTProductInstanceMaster, Explorable, Serialized Form

Field Summary
(package private) static DecimalFormat df
           
private  PathOccurrence pathOccurrence
           
private  double quantity
           
private static ResourceBundle resource
           
private static String RESOURCE
           
private  SerialNumberMapping snMapping
           
private  QuantityUnit unit
           
private  UsesOccurrence usesOccurrence
           
 
Fields inherited from class wt.clients.beans.explorer.WTBusinessObject
 
Constructor Summary
InstanceMasterItem()
          Constructs a new InstanceMasterItem.
InstanceMasterItem(WTProductInstanceMaster instance)
          Constructs a new InstanceMasterItem.
 
Method Summary
 void create()
          Create a new contained instancemaster for this InstanceMasterItem.
static DecimalFormat getDecimalFormat()
           
 String getIdentity()
          Returns the identity of this object.
 WTProductInstanceMaster getInstanceMaster()
          Return the contained WTPart object.
 String getName()
          Returns the current name of this InstanceMasterItem.
 String getNumber()
          Returns the current number of this InstanceMasterItem.
 PathOccurrence getPathOccurrence()
          Gets the product path occurrence for this product.
 double getQuantity()
          Get the quantity amount in the usage link
 String getQuantityString()
           
protected  ResourceBundle getResource()
           
 String getSerialNumber()
          Return the serial number for the instance master item
 SerialNumberMapping getSNMapping()
           
 String getUnitName()
          Get a string representation of the units
 QuantityUnit getUnits()
          Get the units for the quantity.
 UsesOccurrence getUsesOccurrence()
          Gets the product uses occurrence for this product.
private  void initResources()
           
 void setInstanceMaster(WTProductInstanceMaster instance)
          Sets the contained instance.
protected  void setInstanceSimply(WTProductInstanceMaster instance)
          Sets the contained instance without any side effect.
 void setPathOccurrence(PathOccurrence path_occurrence)
          Sets the product path occurrence for this product.
 void setQuantity(double a_quantity)
          Set the quantity amount in the usage link.
 void setSNMapping(SerialNumberMapping sn_mapping)
           
 void setUnit(QuantityUnit a_unit)
          Set the units for the quantity.
 void setUsesOccurrence(UsesOccurrence uses_occurrence)
          Sets the product path occurrence for this product.
 String toString()
          Returns a string representation of the instanceitem.
 
Methods inherited from class wt.clients.beans.explorer.WTBusinessObject
getAttributeValue, getAttributeValue, getContents, getObject, getOpenIcon, getStandardIcon, getUniqueIdentity, getUses, setIdentity, setObject, setObject, setStandardIcon, setStandardIcon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

resource

private static ResourceBundle resource

RESOURCE

private static String RESOURCE

snMapping

private SerialNumberMapping snMapping

pathOccurrence

private PathOccurrence pathOccurrence

usesOccurrence

private UsesOccurrence usesOccurrence

quantity

private double quantity

unit

private QuantityUnit unit

df

static DecimalFormat df
Constructor Detail

InstanceMasterItem

public InstanceMasterItem()
                   throws WTException
Constructs a new InstanceMasterItem.

Throws:
WTException

InstanceMasterItem

public InstanceMasterItem(WTProductInstanceMaster instance)
Constructs a new InstanceMasterItem.

Parameters:
instance - the contained wt.part.WTProductInstanceMaster.
See Also:
WTProductInstanceMaster
Method Detail

setQuantity

public void setQuantity(double a_quantity)
Set the quantity amount in the usage link.

Parameters:
a_quantity - the amount

getQuantityString

public String getQuantityString()

setUnit

public void setUnit(QuantityUnit a_unit)
Set the units for the quantity.

Parameters:
a_unit - the unit to use

getUnits

public QuantityUnit getUnits()
Get the units for the quantity.

Returns:
the units for the quantity

getUnitName

public String getUnitName()
Get a string representation of the units

Returns:
a string representation of the units.

getQuantity

public double getQuantity()
Get the quantity amount in the usage link

Returns:
the quantity amount in the link

getDecimalFormat

public static DecimalFormat getDecimalFormat()

setPathOccurrence

public void setPathOccurrence(PathOccurrence path_occurrence)
Sets the product path occurrence for this product.

See Also:
WTProductConfiguration

getPathOccurrence

public PathOccurrence getPathOccurrence()
Gets the product path occurrence for this product.

See Also:
WTProductConfiguration

setUsesOccurrence

public void setUsesOccurrence(UsesOccurrence uses_occurrence)
Sets the product path occurrence for this product.

See Also:
WTProductConfiguration

getUsesOccurrence

public UsesOccurrence getUsesOccurrence()
Gets the product uses occurrence for this product.

See Also:
WTProductConfiguration

setSNMapping

public void setSNMapping(SerialNumberMapping sn_mapping)

getSNMapping

public SerialNumberMapping getSNMapping()

setInstanceMaster

public void setInstanceMaster(WTProductInstanceMaster instance)
Sets the contained instance. This will initialize many of the attributes in the InstanceMasterItem class.

Parameters:
instance - the contained wt.part.WTPart.
See Also:
WTPart

setInstanceSimply

protected void setInstanceSimply(WTProductInstanceMaster instance)
Sets the contained instance without any side effect.

Parameters:
instance - the contained wt.part.WTProductInstanceMaster.
See Also:
WTProductInstanceMaster

getInstanceMaster

public WTProductInstanceMaster getInstanceMaster()
Return the contained WTPart object.

Returns:
the contained wt.part.WTProductInstanceMaster.
See Also:
WTProductInstanceMaster

create

public void create()
            throws WTException
Create a new contained instancemaster for this InstanceMasterItem.

Throws:
WTException

getNumber

public String getNumber()
Returns the current number of this InstanceMasterItem.

Returns:
the current number of this InstanceMasterItem.

getName

public String getName()
Returns the current name of this InstanceMasterItem.

Returns:
the current name of this InstanceMasterItem.

getSerialNumber

public String getSerialNumber()
Return the serial number for the instance master item

Returns:
the serial number of the instance master item

toString

public String toString()
Returns a string representation of the instanceitem.

Returns:
a string representation of the instanceitem.

getIdentity

public String getIdentity()
Returns the identity of this object.

Specified by:
getIdentity in interface Identifiable
Overrides:
getIdentity in class WTBusinessObject
Returns:
athe identity of this object.
See Also:
String

initResources

private void initResources()

getResource

protected ResourceBundle getResource()