wt.part
Class WTProduct

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.enterprise.RevisionControlled
          extended bywt.part.WTPart
              extended bywt.part.WTProduct
All Implemented Interfaces:
_DepthLock000, _DepthLock001, _DepthLock002, _DepthLock003, _DepthLock004, _DepthLock005, _DepthLock006, _DepthLock007, AccessControlled, AccessControlList, AdHocControlled, AnnotationTarget, Archiveable, Baselineable, BuildTarget, BusinessInformation, CabinetBased, Changeable2, ChangeableIfc, ConfigurationManageable, ConfiguredVersion, ContentHolder, DisplayIdentification, DomainAdministered, EffectivityHolder, EffectivityManageable, EffManagedVersion, ElectronicallySignable, Externalizable, Federatable, Foldered, FolderEntry, FolderServiceManaged, IBAHolder, Indexable, Iterated, IteratedFoldered, IteratedLifeCycleManaged, IteratedSubjectOfForum, IteratedSubjectOfNotebook, LifeCycleManaged, Lockable, NetFactor, Notifiable, ObjectMappable, OneOffVersioned, OrganizationOwned, OrganizationOwnedVersion, Ownable, Part, PartVersion, PathOccurrenceContext, PathOwner, Persistable, Promotable, RecentlyVisited, Releasable, RemotelyLinkable, Representable, RepresentablesAndMasters, RepresentationContributor, RequirementsManageable, Serializable, SubjectOfForum, SubjectOfNotebook, TeamManaged, Trackable, Typed, UsesOccurrenceContext, Versionable, Versioned, Viewable, ViewManageable, Workable, WorkspaceTrackable, WTContained

public class WTProduct
extends WTPart
implements ConfiguredVersion, PathOccurrenceContext, PathOwner, Externalizable

Use the newWTProduct static factory method(s), not the WTProduct 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: true

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
 
Fields inherited from class wt.part.WTPart
CONTAINER, DEFAULT_UNIT, NAME, NUMBER, PART_TYPE, R30_EXTERNALIZATION_VERSION_UID, R51_EXTERNALIZATION_VERSION_UID, R60_EXTERNALIZATION_VERSION_UID, SOURCE
 
Fields inherited from class wt.enterprise.RevisionControlled
MASTER, VERSION_DISPLAY_IDENTIFIER, VERSION_DISPLAY_IDENTITY, VERSION_DISPLAY_TYPE
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.configuration.ConfiguredVersion
MASTER, MASTER_REFERENCE
 
Fields inherited from interface wt.vc.Iterated
BRANCH_IDENTIFIER, CONTROL_BRANCH, CREATOR, CREATOR_EMAIL, CREATOR_FULL_NAME, CREATOR_NAME, ITERATION_IDENTIFIER, ITERATION_INFO, ITERATION_NOTE, LATEST_ITERATION, MODIFIER, MODIFIER_EMAIL, MODIFIER_FULL_NAME, MODIFIER_NAME
 
Fields inherited from interface wt.fc.Persistable
IDENTITY, PERSIST_INFO, TYPE
 
Fields inherited from interface wt.vc.OneOffVersioned
ONE_OFF_VERSION_IDENTIFIER, ONE_OFF_VERSION_INFO
 
Fields inherited from interface wt.vc.Versioned
VERSION_IDENTIFIER, VERSION_INFO
 
Fields inherited from interface wt.content.ContentHolder
CONTENT_VECTOR, HAS_CONTENTS, HTTP_VECTOR, OPERATION
 
Fields inherited from interface wt.eff.EffManagedVersion
EFF_VECTOR
 
Fields inherited from interface wt.vc.views.ViewManageable
VIEW, VIEW_NAME
 
Fields inherited from interface wt.iba.value.IBAHolder
ATTRIBUTE_CONTAINER
 
Fields inherited from interface wt.ufid.Federatable
FEDERATABLE_INFO
 
Fields inherited from interface wt.type.Typed
TYPE_DEFINITION_REFERENCE
 
Fields inherited from interface wt.inf.container.WTContained
CONTAINER_ID, CONTAINER_NAME, CONTAINER_REFERENCE
 
Fields inherited from interface wt.org.OrganizationOwnedVersion
MASTER, MASTER_REFERENCE, ORGANIZATION_REFERENCE
 
Fields inherited from interface wt.org.OrganizationOwned
ORGANIZATION, ORGANIZATION_CODING_SYSTEM, ORGANIZATION_NAME, ORGANIZATION_UNIQUE_IDENTIFIER
 
Fields inherited from interface wt.admin.DomainAdministered
DOMAIN_REF, INHERITED_DOMAIN
 
Fields inherited from interface wt.fc.BusinessInformation
BUSINESS_TYPE, IDENTITY
 
Fields inherited from interface wt.vc.wip.Workable
CHECKOUT_INFO
 
Fields inherited from interface wt.locks.Lockable
LOCK, LOCK_DATE, LOCK_NOTE, LOCKED, LOCKER, LOCKER_EMAIL, LOCKER_FULL_NAME, LOCKER_NAME
 
Fields inherited from interface wt.ownership.Ownable
OWNERSHIP
 
Fields inherited from interface wt.folder.Foldered
CABINET, CABINET_NAME, FOLDERING_INFO
 
Fields inherited from interface wt.folder.CabinetBased
CABINET_REFERENCE, FOLDER_PATH, LOCATION
 
Fields inherited from interface wt.notify.Notifiable
EVENT_SET
 
Fields inherited from interface wt.index.Indexable
INDEXER_SET
 
Fields inherited from interface wt.lifecycle.LifeCycleManaged
LIFE_CYCLE_AT_GATE, LIFE_CYCLE_BASIC, LIFE_CYCLE_NAME, LIFE_CYCLE_STATE, LIFE_CYCLE_TEMPLATE, STATE
 
Fields inherited from interface wt.access.AdHocControlled
ENTRY_SET
 
Fields inherited from interface wt.team.TeamManaged
TEAM_ID, TEAM_IDENTITY, TEAM_NAME, TEAM_TEMPLATE_ID, TEAM_TEMPLATE_IDENTITY, TEAM_TEMPLATE_NAME
 
Fields inherited from interface wt.identity.DisplayIdentification
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE
 
Constructor Summary
WTProduct()
           
 
Method Summary
 boolean equals(Object obj)
          Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers.
 String getConceptualClassname()
          Deprecated.  
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
protected  void initialize(String number, String name)
          Supports initialization, following construction of an instance.
protected  void initialize(String number, String name, QuantityUnit defaultUnit)
          Supports initialization, following construction of an instance.
private  void masterReferenceValidate(ObjectReference a_MasterReference)
           
static WTProduct newWTProduct()
          Construct a new WTPart (and its WTPartMaster).
static WTProduct newWTProduct(String number, String name)
          Constructs a new WTPart and sets the WTPartMaster's name and number to the passed-in values.
static WTProduct newWTProduct(String number, String name, QuantityUnit defaultUnit)
          Constructs a new WTPart and sets the WTPartMaster's name and number to the passed-in values.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
 void readExternal(PersistentRetrieveIfc input)
          Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(WTProduct thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setMaster(Mastered a_Master)
          Sets the object for the association that plays role: MASTER.
 void setMasterReference(ObjectReference a_MasterReference)
          Sets the value of the attribute: MASTER_REFERENCE.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 void writeExternal(PersistentStoreIfc output)
          Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.
 
Methods inherited from class wt.part.WTPart
checkAttributes, getAttributeContainer, getContainer, getContainerName, getContainerReference, getContentVector, getDefaultUnit, getEffVector, getFederatableInfo, getHttpVector, getIdentity, getIterationDisplayIdentifierSansView, getName, getNumber, getOneOffVersionIdentifier, getOneOffVersionInfo, getOperation, getOrganization, getOrganizationCodingSystem, getOrganizationName, getOrganizationReference, getOrganizationUniqueIdentifier, getPartType, getSource, getTypeDefinitionReference, getView, getViewName, isHasContents, newWTPart, newWTPart, newWTPart, readVersion, setAttributeContainer, setContainer, setContainerReference, setContentVector, setDefaultUnit, setEffVector, setFederatableInfo, setHasContents, setHttpVector, setName, setNumber, setOneOffVersionInfo, setOperation, setOrganization, setOrganizationReference, setPartType, setSource, setTypeDefinitionReference, setView
 
Methods inherited from class wt.enterprise.RevisionControlled
getBranchIdentifier, getBusinessType, getCabinet, getCabinetName, getCabinetReference, getCheckoutInfo, getControlBranch, getCreator, getCreatorEMail, getCreatorFullName, getCreatorName, getDomainRef, getEntrySet, getEventSet, getFolderingInfo, getFolderPath, getIndexerSet, getIterationDisplayIdentifier, getIterationIdentifier, getIterationInfo, getIterationNote, getLifeCycleName, getLifeCycleState, getLifeCycleTemplate, getLocation, getLock, getLockDate, getLocker, getLockerEMail, getLockerFullName, getLockerName, getLockNote, getMaster, getMasterReference, getModifier, getModifierEMail, getModifierFullName, getModifierName, getOwnership, getState, getTeamId, getTeamIdentity, getTeamName, getTeamTemplateId, getTeamTemplateIdentity, getTeamTemplateName, getVersionDisplayIdentifier, getVersionDisplayIdentity, getVersionDisplayType, getVersionIdentifier, getVersionInfo, initialize, isInheritedDomain, isLatestIteration, isLifeCycleAtGate, isLifeCycleBasic, isLocked, readVersion, setCheckoutInfo, setControlBranch, setDomainRef, setEntrySet, setEventSet, setFolderingInfo, setIndexerSet, setInheritedDomain, setIterationInfo, setLock, setOwnership, setState, setTeamId, setTeamTemplateId, setVersionInfo
 
Methods inherited from class wt.fc.WTObject
duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getModifyTimestamp, getPersistInfo, getType, readVersion, setPersistInfo, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wt.configuration.ConfiguredVersion
getMaster, getMasterReference
 
Methods inherited from interface wt.vc.Iterated
getBranchIdentifier, getControlBranch, getCreator, getCreatorEMail, getCreatorFullName, getCreatorName, getIterationIdentifier, getIterationInfo, getIterationNote, getModifier, getModifierEMail, getModifierFullName, getModifierName, isLatestIteration, setControlBranch, setIterationInfo
 
Methods inherited from interface wt.fc.Persistable
checkAttributes, getIdentity, getPersistInfo, getType, setPersistInfo
 
Methods inherited from interface wt.fc.NetFactor
getClassInfo
 
Methods inherited from interface wt.vc.OneOffVersioned
getOneOffVersionIdentifier, getOneOffVersionInfo, setOneOffVersionInfo
 
Methods inherited from interface wt.vc.Versioned
getVersionIdentifier, getVersionInfo, setVersionInfo
 
Methods inherited from interface wt.org.OrganizationOwnedVersion
getMaster, getMasterReference
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values
Constructor Detail

WTProduct

public WTProduct()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class WTPart
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class WTPart
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(WTProduct thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(PersistentStoreIfc output)
                   throws SQLException,
                          DatastoreException
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
writeExternal in interface ObjectMappable
Overrides:
writeExternal in class WTPart
Parameters:
output -
Throws:
SQLException
DatastoreException

readExternal

public void readExternal(PersistentRetrieveIfc input)
                  throws SQLException,
                         DatastoreException
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
readExternal in interface ObjectMappable
Overrides:
readExternal in class WTPart
Parameters:
input -
Throws:
SQLException
DatastoreException

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class WTPart
Returns:
String

setMaster

public void setMaster(Mastered a_Master)
               throws WTPropertyVetoException,
                      WTException
Sets the object for the association that plays role: MASTER.

Supported API: true

Specified by:
setMaster in interface ConfiguredVersion
Overrides:
setMaster in class WTPart
Parameters:
a_Master -
Throws:
WTPropertyVetoException
WTException

setMasterReference

public void setMasterReference(ObjectReference a_MasterReference)
                        throws WTPropertyVetoException
Sets the value of the attribute: MASTER_REFERENCE.

Supported API: true

Specified by:
setMasterReference in interface ConfiguredVersion
Overrides:
setMasterReference in class WTPart
Parameters:
a_MasterReference -
Throws:
WTPropertyVetoException

masterReferenceValidate

private void masterReferenceValidate(ObjectReference a_MasterReference)
                              throws WTPropertyVetoException
Parameters:
a_MasterReference -
Throws:
WTPropertyVetoException

newWTProduct

public static WTProduct newWTProduct()
                              throws WTException
Construct a new WTPart (and its WTPartMaster).

Supported API: true

Returns:
WTProduct
Throws:
WTException

newWTProduct

public static WTProduct newWTProduct(String number,
                                     String name)
                              throws WTException
Constructs a new WTPart and sets the WTPartMaster's name and number to the passed-in values.

Supported API: true

Parameters:
number -
name -
Returns:
WTProduct
Throws:
WTException

initialize

protected void initialize(String number,
                          String name)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Overrides:
initialize in class WTPart
Parameters:
number -
name -
Throws:
WTException

newWTProduct

public static WTProduct newWTProduct(String number,
                                     String name,
                                     QuantityUnit defaultUnit)
                              throws WTException
Constructs a new WTPart and sets the WTPartMaster's name and number to the passed-in values.

Supported API: true

Parameters:
number -
name -
defaultUnit -
Returns:
WTProduct
Throws:
WTException

initialize

protected void initialize(String number,
                          String name,
                          QuantityUnit defaultUnit)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Overrides:
initialize in class WTPart
Parameters:
number -
name -
defaultUnit -
Throws:
WTException

equals

public boolean equals(Object obj)
Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers. Changed or stale copies are still considered equal by this method. Delegates to PersistenceHelper.equals(Persistable,Object).

Warning: Certain core Windchill operations may depend upon equals being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
equals in class WTPart
Parameters:
obj -
Returns:
boolean

hashCode

public int hashCode()
Returns a hash code for this object based upon its ObjectIdentifier. Delegates to PersistenceHelper.hashCode(Persistable).

Warning: Certain core Windchill operations may depend upon hashCode being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
hashCode in class WTPart
Returns:
int