wt.part
Class WTPartUsageLink

java.lang.Object
  extended by wt.fc.WTObject
      extended by wt.fc.ObjectToObjectLink
          extended by wt.vc.struct.IteratedUsageLink
              extended by wt.part.WTPartUsageLink
All Implemented Interfaces:
Externalizable, Serializable, wt.build.BuildableLink, wt.build.BuildableObject, TraceableLink, wt.fc.archive.Archiveable, BinaryLink, Link, NetFactor, ObjectMappable, Persistable, wt.generic.GenericizableUsageLink, wt.iba.value.IBAHolder, DisplayIdentification, OccurrenceableLink, wt.type.FlexTyped, wt.type.Typed

public class WTPartUsageLink
extends IteratedUsageLink
implements wt.build.BuildableLink, OccurrenceableLink, wt.fc.archive.Archiveable, wt.type.Typed, TraceableLink, wt.generic.GenericizableUsageLink, Externalizable

This is an IteratedUsageLink where a specific WTPart uses a WTPartMaster (actually it will use one of the WTParts associated with the WTPartMaster based on a config spec) and the part uses a specific Quantity (with unit of measure) of the part master as a component of its structure.

For example to build a car there are 4 tires for each car built. For a hammock there might be 2 end ropes that are three feet long.

Note that since the link is between a WTPart and a WTPartMaster it will be necessary to use a config spec (usually WTPartConfigSpec) to select the correct version of the WTPartMaster, which is a WTPart.

Use the newWTPartUsageLink static factory method(s), not the WTPartUsageLink constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
vc.config.ConfigSpec, Serialized Form

Field Summary
static String ALLOCATION_TYPE
          Label for the attribute.
static String LINE_NUMBER
          Label for the attribute.
static String QUANTITY
          Label for the attribute.
static String USED_BY_ROLE
          Label for the attribute.
static String USES_ROLE
          Label for the attribute.
 
Fields inherited from interface wt.occurrence.OccurrenceableLink
USES_OCCURRENCE_VECTOR
 
Fields inherited from interface wt.configuration.TraceableLink
TRACE_CODE
 
Method Summary
 OperationAllocationType getAllocationType()
          Gets the object for the association that plays role: ALLOCATION_TYPE.
 LineNumber getLineNumber()
          Gets the object for the association that plays role: LINE_NUMBER.
 Quantity getQuantity()
          Gets the object for the association that plays role: QUANTITY.
 TraceCode getTraceCode()
          Gets the object for the association that plays role: TRACE_CODE.
 Vector getUsesOccurrenceVector()
          Gets the value of the attribute: USES_OCCURRENCE_VECTOR.
static WTPartUsageLink newWTPartUsageLink(WTPart usedBy, WTPartMaster uses)
          Default factory for the class.
 void setAllocationType(OperationAllocationType a_AllocationType)
          Sets the object for the association that plays role: ALLOCATION_TYPE.
 void setLineNumber(LineNumber a_LineNumber)
          Sets the object for the association that plays role: LINE_NUMBER.
 void setQuantity(Quantity a_Quantity)
          Sets the object for the association that plays role: QUANTITY.
 void setTraceCode(TraceCode a_TraceCode)
          Sets the object for the association that plays role: TRACE_CODE.
 void setUsedBy(Iterated usedBy)
          Sets the object for the association that plays role: USED_BY_ROLE.
 void setUses(Mastered uses)
          Sets the object for the association that plays role: USES_ROLE.
 void setUsesOccurrenceVector(Vector a_UsesOccurrenceVector)
          Sets the value of the attribute: USES_OCCURRENCE_VECTOR.
 
Methods inherited from class wt.vc.struct.IteratedUsageLink
getUsedBy, getUses
 
Methods inherited from class wt.fc.WTObject
getDisplayIdentifier, getDisplayIdentity, getDisplayType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

USED_BY_ROLE

public static final String USED_BY_ROLE
Label for the attribute.

Supported API: true

See Also:
Constant Field Values

USES_ROLE

public static final String USES_ROLE
Label for the attribute.

Supported API: true

See Also:
Constant Field Values

QUANTITY

public static final String QUANTITY
Label for the attribute.

Supported API: true

See Also:
Constant Field Values

LINE_NUMBER

public static final String LINE_NUMBER
Label for the attribute.

Supported API: true

See Also:
Constant Field Values

ALLOCATION_TYPE

public static final String ALLOCATION_TYPE
Label for the attribute.

Supported API: true

See Also:
Constant Field Values
Method Detail

setUsedBy

public void setUsedBy(Iterated usedBy)
               throws WTPropertyVetoException
Sets the object for the association that plays role: USED_BY_ROLE.

Supported API: true

Overrides:
setUsedBy in class IteratedUsageLink
Parameters:
usedBy -
Throws:
WTPropertyVetoException

setUses

public void setUses(Mastered uses)
             throws WTPropertyVetoException
Sets the object for the association that plays role: USES_ROLE.

Supported API: true

Overrides:
setUses in class IteratedUsageLink
Parameters:
uses -
Throws:
WTPropertyVetoException

getQuantity

public Quantity getQuantity()
Gets the object for the association that plays role: QUANTITY.

Supported API: true

Returns:
Quantity

setQuantity

public void setQuantity(Quantity a_Quantity)
Sets the object for the association that plays role: QUANTITY.

Supported API: true

Parameters:
a_Quantity -

getLineNumber

public LineNumber getLineNumber()
Gets the object for the association that plays role: LINE_NUMBER.

Supported API: true

Returns:
LineNumber

setLineNumber

public void setLineNumber(LineNumber a_LineNumber)
                   throws WTPropertyVetoException
Sets the object for the association that plays role: LINE_NUMBER.

Supported API: true

Parameters:
a_LineNumber -
Throws:
WTPropertyVetoException

getAllocationType

public OperationAllocationType getAllocationType()
Gets the object for the association that plays role: ALLOCATION_TYPE.

Supported API: true

Returns:
OperationAllocationType

setAllocationType

public void setAllocationType(OperationAllocationType a_AllocationType)
                       throws WTPropertyVetoException
Sets the object for the association that plays role: ALLOCATION_TYPE.

Supported API: true

Parameters:
a_AllocationType -
Throws:
WTPropertyVetoException

newWTPartUsageLink

public static WTPartUsageLink newWTPartUsageLink(WTPart usedBy,
                                                 WTPartMaster uses)
                                          throws WTException
Default factory for the class.

Supported API: true

Parameters:
usedBy -
uses -
Returns:
WTPartUsageLink
Throws:
WTException

getUsesOccurrenceVector

public Vector getUsesOccurrenceVector()
Gets the value of the attribute: USES_OCCURRENCE_VECTOR. Each element of this non-persistent Vector contains UsesOccurrences, each of which may contain a PathOccurrence. Note that any implementation of this interface must provide server-side APIs that specifically populate this Vector, otherwise it will be null.

Supported API: true

Specified by:
getUsesOccurrenceVector in interface OccurrenceableLink
Returns:
Vector

setUsesOccurrenceVector

public void setUsesOccurrenceVector(Vector a_UsesOccurrenceVector)
Sets the value of the attribute: USES_OCCURRENCE_VECTOR. Each element of this non-persistent Vector contains UsesOccurrences, each of which may contain a PathOccurrence. Note that any implementation of this interface must provide server-side APIs that specifically populate this Vector, otherwise it will be null.

Supported API: true

Specified by:
setUsesOccurrenceVector in interface OccurrenceableLink
Parameters:
a_UsesOccurrenceVector -

getTraceCode

public TraceCode getTraceCode()
Gets the object for the association that plays role: TRACE_CODE.

Supported API: true

Specified by:
getTraceCode in interface TraceableLink
Returns:
TraceCode

setTraceCode

public void setTraceCode(TraceCode a_TraceCode)
Sets the object for the association that plays role: TRACE_CODE.

Supported API: true

Specified by:
setTraceCode in interface TraceableLink
Parameters:
a_TraceCode -