wt.doc
Class WTDocumentMaster

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.enterprise.Master
          extended bywt.doc.WTDocumentMaster
All Implemented Interfaces:
BusinessInformation, DisplayIdentification, Document, DocumentMaster, ElectronicallySignable, Externalizable, Federatable, IBAHolder, Identified, Mastered, NetFactor, ObjectMappable, OrganizationOwned, OrganizationOwnedImpl, OrganizationOwnedMaster, Persistable, RecentlyVisited, RemotelyLinkable, RepresentableMaster, RepresentablesAndMasters, Serializable, UniquelyIdentified, WTContained, WTContainedIdentified
Direct Known Subclasses:
ProxyDocumentMaster

public class WTDocumentMaster
extends Master
implements DocumentMaster, UniquelyIdentified, Federatable, IBAHolder, WTContained, OrganizationOwnedMaster, WTContainedIdentified, RepresentableMaster, Externalizable

Reference implementation of DocumentMaster. Attributes defined on this object have the same value across all versions and iterations. In this case, all document versions have the same name and number. The document number must be unique amongst all WTDocuments. A WTDocumentMaster holds a type attribute based on the DocumentType enumeration. The type is constant for all versions.

Use the newWTDocumentMaster static factory method(s), not the WTDocumentMaster 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:
WTDocument, DocumentType, Serialized Form

Field Summary
private static String CLASSNAME
           
static String CONTAINER
          Label for the attribute.
private  WTContainerRef containerReference
           
static String DOC_TYPE
          Label for the attribute.
private static int DOC_TYPE_UPPER_LIMIT
           
private  DocumentType docType
           
static long EXTERNALIZATION_VERSION_UID
           
private  FederatableInfo federatableInfo
           
private  String name
           
static String NAME
          Label for the attribute; A string representing the name of a document.
private static int NAME_UPPER_LIMIT
           
private  String number
           
static String NUMBER
          Label for the attribute; A string representing the number of a document.
private static int NUMBER_UPPER_LIMIT
           
protected static long OLD_FORMAT_VERSION_UID
           
private  WTPrincipalReference organizationReference
           
static long R51_EXTERNALIZATION_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  AttributeContainer theAttributeContainer
           
 
Fields inherited from class wt.enterprise.Master
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.fc.Persistable
IDENTITY, PERSIST_INFO, TYPE
 
Fields inherited from interface wt.ufid.Federatable
FEDERATABLE_INFO
 
Fields inherited from interface wt.iba.value.IBAHolder
ATTRIBUTE_CONTAINER
 
Fields inherited from interface wt.inf.container.WTContained
CONTAINER_ID, CONTAINER_NAME, CONTAINER_REFERENCE
 
Fields inherited from interface wt.vc.Mastered
SERIES
 
Fields inherited from interface wt.org.OrganizationOwnedImpl
ORGANIZATION_REFERENCE
 
Fields inherited from interface wt.org.OrganizationOwned
ORGANIZATION, ORGANIZATION_CODING_SYSTEM, ORGANIZATION_NAME, ORGANIZATION_UNIQUE_IDENTIFIER
 
Fields inherited from interface wt.inf.container.WTContainedIdentified
CONTAINER_REFERENCE
 
Fields inherited from interface wt.fc.BusinessInformation
BUSINESS_TYPE, IDENTITY
 
Fields inherited from interface wt.identity.DisplayIdentification
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE
 
Constructor Summary
WTDocumentMaster()
           
 
Method Summary
 void checkAttributes()
          Validate the values of this Persistable object's required attributes.
private  void containerReferenceValidate(WTContainerRef a_ContainerReference)
           
private  void docTypeValidate(DocumentType a_DocType)
           
 boolean equals(Object obj)
          Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers.
private  void federatableInfoValidate(FederatableInfo a_FederatableInfo)
           
 AttributeContainer getAttributeContainer()
          Gets the object for the association that plays role: ATTRIBUTE_CONTAINER.
 String getConceptualClassname()
          Deprecated.  
 WTContainer getContainer()
          Gets the object for the association that plays role: CONTAINER.
 String getContainerName()
          Gets the value of the attribute: CONTAINER_NAME.
 WTContainerRef getContainerReference()
          Gets the value of the attribute: CONTAINER_REFERENCE.
 DocumentType getDocType()
          Gets the object for the association that plays role: DOC_TYPE.
 FederatableInfo getFederatableInfo()
          Gets the object for the association that plays role: FEDERATABLE_INFO.
 IdentificationObject getIdentificationObject()
          Constructs and returns an identification object.
 String getIdentity()
          

Supported API: false
 String getName()
          Gets the value of the attribute: NAME.
 String getNumber()
          Gets the value of the attribute: NUMBER.
 WTOrganization getOrganization()
          Gets the value of the attribute: ORGANIZATION.
 String getOrganizationCodingSystem()
          Gets the value of the attribute: ORGANIZATION_CODING_SYSTEM.
 String getOrganizationName()
          Gets the value of the attribute: ORGANIZATION_NAME.
 WTPrincipalReference getOrganizationReference()
          Gets the value of the attribute: ORGANIZATION_REFERENCE.
 String getOrganizationUniqueIdentifier()
          Gets the value of the attribute: ORGANIZATION_UNIQUE_IDENTIFIER.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
private  void nameValidate(String a_Name)
           
static WTDocumentMaster newWTDocumentMaster()
          Default factory for the class.
private  void numberValidate(String a_Number)
           
private  void organizationReferenceValidate(WTPrincipalReference a_OrganizationReference)
           
 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(WTDocumentMaster thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setAttributeContainer(AttributeContainer a_AttributeContainer)
          Sets the object for the association that plays role: ATTRIBUTE_CONTAINER.
 void setContainer(WTContainer a_Container)
          Sets the object for the association that plays role: CONTAINER.
 void setContainerReference(WTContainerRef a_ContainerReference)
          Sets the value of the attribute: CONTAINER_REFERENCE.
 void setDocType(DocumentType a_DocType)
          Sets the object for the association that plays role: DOC_TYPE.
 void setFederatableInfo(FederatableInfo a_FederatableInfo)
          Sets the object for the association that plays role: FEDERATABLE_INFO.
 void setName(String a_Name)
          Sets the value of the attribute: NAME.
 void setNumber(String a_Number)
          Sets the value of the attribute: NUMBER.
 void setOrganization(WTOrganization a_Organization)
          Sets the value of the attribute: ORGANIZATION.
 void setOrganizationReference(WTPrincipalReference a_OrganizationReference)
          Sets the value of the attribute: ORGANIZATION_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.enterprise.Master
getBusinessType, getSeries, readVersion, setSeries
 
Methods inherited from class wt.fc.WTObject
duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getModifyTimestamp, getPersistInfo, getType, initialize, readVersion, setPersistInfo, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wt.fc.Persistable
getPersistInfo, getType, setPersistInfo
 
Methods inherited from interface wt.fc.NetFactor
getClassInfo
 
Methods inherited from interface wt.vc.Mastered
getSeries, setSeries
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

NAME

public static final String NAME
Label for the attribute; A string representing the name of a document.

Supported API: true

See Also:
Constant Field Values

NAME_UPPER_LIMIT

private static int NAME_UPPER_LIMIT

name

private String name

NUMBER

public static final String NUMBER
Label for the attribute; A string representing the number of a document.

Supported API: true

See Also:
Constant Field Values

NUMBER_UPPER_LIMIT

private static int NUMBER_UPPER_LIMIT

number

private String number

DOC_TYPE

public static final String DOC_TYPE
Label for the attribute.

Supported API: true

See Also:
Constant Field Values

DOC_TYPE_UPPER_LIMIT

private static int DOC_TYPE_UPPER_LIMIT

docType

private DocumentType docType

federatableInfo

private FederatableInfo federatableInfo

theAttributeContainer

private AttributeContainer theAttributeContainer

CONTAINER

public static final String CONTAINER
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

containerReference

private WTContainerRef containerReference

organizationReference

private WTPrincipalReference organizationReference

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

R51_EXTERNALIZATION_VERSION_UID

public static final long R51_EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values
Constructor Detail

WTDocumentMaster

public WTDocumentMaster()
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 Master
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 Master
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(WTDocumentMaster 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 Master
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 Master
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
Returns:
String

getName

public String getName()
Gets the value of the attribute: NAME. A string representing the name of a document.

Supported API: true

Returns:
String

setName

public void setName(String a_Name)
             throws WTPropertyVetoException
Sets the value of the attribute: NAME. A string representing the name of a document.

Supported API: true

Parameters:
a_Name -
Throws:
WTPropertyVetoException

nameValidate

private void nameValidate(String a_Name)
                   throws WTPropertyVetoException
Parameters:
a_Name -
Throws:
WTPropertyVetoException

getNumber

public String getNumber()
Gets the value of the attribute: NUMBER. A string representing the number of a document.

Supported API: true

Returns:
String

setNumber

public void setNumber(String a_Number)
               throws WTPropertyVetoException
Sets the value of the attribute: NUMBER. A string representing the number of a document.

Supported API: true

Parameters:
a_Number -
Throws:
WTPropertyVetoException

numberValidate

private void numberValidate(String a_Number)
                     throws WTPropertyVetoException
Parameters:
a_Number -
Throws:
WTPropertyVetoException

getDocType

public DocumentType getDocType()
Gets the object for the association that plays role: DOC_TYPE.

Supported API: true

Returns:
DocumentType

setDocType

public void setDocType(DocumentType a_DocType)
                throws WTPropertyVetoException
Sets the object for the association that plays role: DOC_TYPE.

Supported API: true

Parameters:
a_DocType -
Throws:
WTPropertyVetoException

docTypeValidate

private void docTypeValidate(DocumentType a_DocType)
                      throws WTPropertyVetoException
Parameters:
a_DocType -
Throws:
WTPropertyVetoException

getIdentity

public String getIdentity()


Supported API: false

Specified by:
getIdentity in interface Persistable
Overrides:
getIdentity in class Master
Returns:
String

checkAttributes

public void checkAttributes()
                     throws InvalidAttributeException
Validate the values of this Persistable object's required attributes.

Supported API: false

Specified by:
checkAttributes in interface Persistable
Overrides:
checkAttributes in class WTObject
Throws:
InvalidAttributeException

getIdentificationObject

public IdentificationObject getIdentificationObject()
                                             throws WTException
Constructs and returns an identification object. This method is the only way to obtain an identification object.

Supported API: false

Specified by:
getIdentificationObject in interface Identified
Returns:
IdentificationObject
Throws:
WTException

newWTDocumentMaster

public static WTDocumentMaster newWTDocumentMaster()
                                            throws WTException
Default factory for the class.

Supported API: false

Returns:
WTDocumentMaster
Throws:
WTException

getFederatableInfo

public FederatableInfo getFederatableInfo()
Gets the object for the association that plays role: FEDERATABLE_INFO.

Supported API: false

Specified by:
getFederatableInfo in interface Federatable
Returns:
FederatableInfo

setFederatableInfo

public void setFederatableInfo(FederatableInfo a_FederatableInfo)
                        throws WTPropertyVetoException
Sets the object for the association that plays role: FEDERATABLE_INFO.

Supported API: false

Specified by:
setFederatableInfo in interface Federatable
Parameters:
a_FederatableInfo -
Throws:
WTPropertyVetoException

federatableInfoValidate

private void federatableInfoValidate(FederatableInfo a_FederatableInfo)
                              throws WTPropertyVetoException
Parameters:
a_FederatableInfo -
Throws:
WTPropertyVetoException

getAttributeContainer

public AttributeContainer getAttributeContainer()
Gets the object for the association that plays role: ATTRIBUTE_CONTAINER.

Supported API: false

Specified by:
getAttributeContainer in interface IBAHolder
Returns:
AttributeContainer

setAttributeContainer

public void setAttributeContainer(AttributeContainer a_AttributeContainer)
Sets the object for the association that plays role: ATTRIBUTE_CONTAINER.

Supported API: false

Specified by:
setAttributeContainer in interface IBAHolder
Parameters:
a_AttributeContainer -

getContainerName

public String getContainerName()
Gets the value of the attribute: CONTAINER_NAME. The name of the WTContainer this object is assigned to.

Supported API: false

Specified by:
getContainerName in interface WTContained
Returns:
String

getContainer

public WTContainer getContainer()
Gets the object for the association that plays role: CONTAINER.

Supported API: false

Specified by:
getContainer in interface WTContained
Returns:
WTContainer

setContainer

public void setContainer(WTContainer a_Container)
                  throws WTPropertyVetoException,
                         WTException
Sets the object for the association that plays role: CONTAINER.

Supported API: false

Specified by:
setContainer in interface WTContained
Parameters:
a_Container -
Throws:
WTPropertyVetoException
WTException

getContainerReference

public WTContainerRef getContainerReference()
Gets the value of the attribute: CONTAINER_REFERENCE.

Supported API: false

Specified by:
getContainerReference in interface WTContained
Returns:
WTContainerRef

setContainerReference

public void setContainerReference(WTContainerRef a_ContainerReference)
                           throws WTPropertyVetoException
Sets the value of the attribute: CONTAINER_REFERENCE.

Supported API: false

Specified by:
setContainerReference in interface WTContained
Parameters:
a_ContainerReference -
Throws:
WTPropertyVetoException

containerReferenceValidate

private void containerReferenceValidate(WTContainerRef a_ContainerReference)
                                 throws WTPropertyVetoException
Parameters:
a_ContainerReference -
Throws:
WTPropertyVetoException

getOrganizationReference

public WTPrincipalReference getOrganizationReference()
Gets the value of the attribute: ORGANIZATION_REFERENCE.

Supported API: false

Specified by:
getOrganizationReference in interface OrganizationOwnedImpl
Returns:
WTPrincipalReference

setOrganizationReference

public void setOrganizationReference(WTPrincipalReference a_OrganizationReference)
                              throws WTPropertyVetoException
Sets the value of the attribute: ORGANIZATION_REFERENCE.

Supported API: false

Specified by:
setOrganizationReference in interface OrganizationOwnedImpl
Parameters:
a_OrganizationReference -
Throws:
WTPropertyVetoException

organizationReferenceValidate

private void organizationReferenceValidate(WTPrincipalReference a_OrganizationReference)
                                    throws WTPropertyVetoException
Parameters:
a_OrganizationReference -
Throws:
WTPropertyVetoException

getOrganizationUniqueIdentifier

public String getOrganizationUniqueIdentifier()
Gets the value of the attribute: ORGANIZATION_UNIQUE_IDENTIFIER. The getter for this attribute delivers organization unique identifier.

Supported API: true

Specified by:
getOrganizationUniqueIdentifier in interface OrganizationOwned
Returns:
String

getOrganizationCodingSystem

public String getOrganizationCodingSystem()
Gets the value of the attribute: ORGANIZATION_CODING_SYSTEM. The getter for this attribute delivers organization coding system.

Supported API: true

Specified by:
getOrganizationCodingSystem in interface OrganizationOwned
Returns:
String

getOrganizationName

public String getOrganizationName()
Gets the value of the attribute: ORGANIZATION_NAME. The getter for this attribute delivers organization name.

Supported API: true

Specified by:
getOrganizationName in interface OrganizationOwned
Returns:
String

getOrganization

public WTOrganization getOrganization()
Gets the value of the attribute: ORGANIZATION.

Supported API: true

Specified by:
getOrganization in interface OrganizationOwned
Returns:
WTOrganization

setOrganization

public void setOrganization(WTOrganization a_Organization)
                     throws WTPropertyVetoException
Sets the value of the attribute: ORGANIZATION.

Supported API: true

Specified by:
setOrganization in interface OrganizationOwned
Parameters:
a_Organization -
Throws:
WTPropertyVetoException

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 Master
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 Master
Returns:
int