wt.epm.structure
Class EPMReferenceLink

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.fc.ObjectToObjectLink
          extended bywt.epm.structure.EPMReferenceLink
All Implemented Interfaces:
Archiveable, BinaryLink, DisplayIdentification, EPMDependencyLink, EPMObject, Externalizable, IBAHolder, Link, NetFactor, ObjectMappable, Persistable, Serializable, Typed

public final class EPMReferenceLink
extends ObjectToObjectLink
implements EPMDependencyLink, Archiveable, Externalizable

Associates an EPMDocument with a WTDocument or another EPMDocument.

An IteratedReferenceLink associates an Iterated object with a Mastered object. Logically, an EPMReferenceLink associates an EPMDocument with either a WTDocumentMaster or an EPMDocumentMaster. Since the DocumentMaster interface does not extend Mastered, an EPMReferenceLink must associate an EPMDocument with a Master.

Use the newEPMReferenceLink static factory method(s), not the EPMReferenceLink 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:
Serialized Form

Field Summary
private static int AS_STORED_CHILD_NAME_UPPER_LIMIT
           
private  String asStoredChildName
           
private static String CLASSNAME
           
private  int depType
           
private static String EPMRESOURCE
           
static long EXTERNALIZATION_VERSION_UID
           
private  boolean hasIBAValues
           
protected static long OLD_FORMAT_VERSION_UID
           
static long R70_EXTERNALIZATION_VERSION_UID
           
static String REFERENCED_BY_ROLE
          Label for the attribute.
static String REFERENCES_ROLE
          Label for the attribute.
private  boolean required
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  AttributeContainer theAttributeContainer
           
private  TypeDefinitionReference typeDefinitionReference
           
private static int UNIQUE_NDID_UPPER_LIMIT
           
private  long uniqueLinkID
           
private  String uniqueNDId
           
 
Fields inherited from class wt.fc.ObjectToObjectLink
ROLE_AOBJECT_REF, ROLE_BOBJECT_REF
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.epm.structure.EPMDependencyLink
AS_STORED_CHILD_NAME, DEP_TYPE, HAS_IBAVALUES, REQUIRED, UNIQUE_LINK_ID, UNIQUE_NDID
 
Fields inherited from interface wt.epm.EPMObject
AUTHORING_APPLICATION, OWNER_APPLICATION, UNSPECIFIED
 
Fields inherited from interface wt.type.Typed
TYPE_DEFINITION_REFERENCE
 
Fields inherited from interface wt.iba.value.IBAHolder
ATTRIBUTE_CONTAINER
 
Fields inherited from interface wt.fc.Persistable
IDENTITY, PERSIST_INFO, TYPE
 
Fields inherited from interface wt.fc.BinaryLink
ALL_ROLES, BOTH_ROLES, ROLE_AOBJECT_ROLE, ROLE_BOBJECT_ROLE
 
Fields inherited from interface wt.identity.DisplayIdentification
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE
 
Constructor Summary
EPMReferenceLink()
           
 
Method Summary
private  void asStoredChildNameValidate(String a_AsStoredChildName)
           
 void checkAttributes()
          Validate the values of this Persistable object's attributes.
 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 getAsStoredChildName()
          Gets the value of the attribute: AS_STORED_CHILD_NAME.
 AttributeContainer getAttributeContainer()
          Gets the object for the association that plays role: ATTRIBUTE_CONTAINER.
 EPMAuthoringAppType getAuthoringApplication()
          Gets the value of the attribute: AUTHORING_APPLICATION.
 String getConceptualClassname()
          Deprecated.  
 int getDepType()
          Gets the value of the attribute: DEP_TYPE.
 EPMApplicationType getOwnerApplication()
          Gets the value of the attribute: OWNER_APPLICATION.
 EPMDocument getReferencedBy()
          Gets the object for the association that plays role: REFERENCED_BY_ROLE.
 DocumentMaster getReferences()
          Gets the object for the association that plays role: REFERENCES_ROLE.
 TypeDefinitionReference getTypeDefinitionReference()
          Gets the object for the association that plays role: TYPE_DEFINITION_REFERENCE.
 long getUniqueLinkID()
          Gets the value of the attribute: UNIQUE_LINK_ID.
 String getUniqueNDId()
          Gets the value of the attribute: UNIQUE_NDID.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
protected  void initialize(EPMDocument referencedBy, DocumentMaster references)
           
protected  void initialize(EPMDocument referencedBy, DocumentMaster references, String asStoredChildName, int depType)
          Supports initialization, following construction of an instance.
 boolean isHasIBAValues()
          Gets the value of the attribute: HAS_IBAVALUES.
 boolean isRequired()
          Gets the value of the attribute: REQUIRED.
static EPMReferenceLink newEPMReferenceLink(EPMDocument referencedBy, DocumentMaster references)
          Constructs an EPMReferenceLink.
static EPMReferenceLink newEPMReferenceLink(EPMDocument referencedBy, DocumentMaster references, String asStoredChildName, int depType)
          Constructs an EPMReferenceLink.
 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(EPMReferenceLink thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setAsStoredChildName(String a_AsStoredChildName)
          Sets the value of the attribute: AS_STORED_CHILD_NAME.
 void setAttributeContainer(AttributeContainer a_AttributeContainer)
          Sets the object for the association that plays role: ATTRIBUTE_CONTAINER.
 void setDepType(int a_DepType)
          Sets the value of the attribute: DEP_TYPE.
protected  void setHasIBAValues(boolean a_HasIBAValues)
          Sets the value of the attribute: HAS_IBAVALUES.
 void setReferencedBy(EPMDocument referencedBy)
          Sets the object for the association that plays role: REFERENCED_BY_ROLE.
 void setReferences(DocumentMaster references)
          Sets the object for the association that plays role: REFERENCES_ROLE.
 void setRequired(boolean a_Required)
          Sets the value of the attribute: REQUIRED.
 void setTypeDefinitionReference(TypeDefinitionReference a_TypeDefinitionReference)
          Sets the object for the association that plays role: TYPE_DEFINITION_REFERENCE.
 void setUniqueLinkID(long a_UniqueLinkID)
          Sets the value of the attribute: UNIQUE_LINK_ID.
 void setUniqueNDId(String a_UniqueNDId)
          Sets the value of the attribute: UNIQUE_NDID.
private  void typeDefinitionReferenceValidate(TypeDefinitionReference a_TypeDefinitionReference)
           
private  void uniqueLinkIDValidate(long a_UniqueLinkID)
           
private  void uniqueNDIdValidate(String a_UniqueNDId)
           
 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.fc.ObjectToObjectLink
appendJoinCriteria, appendRoleCriteria, duplicate, getAllObjects, getJoinValues, getLinkInfo, getObject, getOtherObject, getRemoteRoleAObjectId, getRemoteRoleBObjectId, getRole, getRoleAObject, getRoleAObjectId, getRoleAObjectRef, getRoleBObject, getRoleBObjectId, getRoleBObjectRef, getRoleIdName, getRoleObject, initialize, isRoleANonpersistentProxy, isRoleBNonpersistentProxy, readVersion, setRoleAObject, setRoleAObjectRef, setRoleBObject, setRoleBObjectRef, setRoleObject
 
Methods inherited from class wt.fc.WTObject
finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getIdentity, 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
getIdentity, getPersistInfo, getType, setPersistInfo
 
Methods inherited from interface wt.fc.NetFactor
getClassInfo
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

REFERENCED_BY_ROLE

public static final String REFERENCED_BY_ROLE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

REFERENCES_ROLE

public static final String REFERENCES_ROLE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

AS_STORED_CHILD_NAME_UPPER_LIMIT

private static int AS_STORED_CHILD_NAME_UPPER_LIMIT

asStoredChildName

private String asStoredChildName

depType

private int depType

required

private boolean required

uniqueLinkID

private long uniqueLinkID

UNIQUE_NDID_UPPER_LIMIT

private static int UNIQUE_NDID_UPPER_LIMIT

uniqueNDId

private String uniqueNDId

hasIBAValues

private boolean hasIBAValues

typeDefinitionReference

private TypeDefinitionReference typeDefinitionReference

theAttributeContainer

private AttributeContainer theAttributeContainer

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

EPMRESOURCE

private static final String EPMRESOURCE
See Also:
Constant Field Values

R70_EXTERNALIZATION_VERSION_UID

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

EPMReferenceLink

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

readVersion

protected boolean readVersion(EPMReferenceLink 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 ObjectToObjectLink
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 ObjectToObjectLink
Parameters:
input -
Throws:
SQLException
DatastoreException

getReferencedBy

public EPMDocument getReferencedBy()
Gets the object for the association that plays role: REFERENCED_BY_ROLE.

Supported API: false

Returns:
EPMDocument

setReferencedBy

public void setReferencedBy(EPMDocument referencedBy)
                     throws WTPropertyVetoException
Sets the object for the association that plays role: REFERENCED_BY_ROLE.

Supported API: false

Parameters:
referencedBy -
Throws:
WTPropertyVetoException

getReferences

public DocumentMaster getReferences()
Gets the object for the association that plays role: REFERENCES_ROLE.

Supported API: false

Returns:
DocumentMaster

setReferences

public void setReferences(DocumentMaster references)
                   throws WTPropertyVetoException
Sets the object for the association that plays role: REFERENCES_ROLE.

Supported API: false

Parameters:
references -
Throws:
WTPropertyVetoException

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Returns:
String

newEPMReferenceLink

public static EPMReferenceLink newEPMReferenceLink(EPMDocument referencedBy,
                                                   DocumentMaster references,
                                                   String asStoredChildName,
                                                   int depType)
                                            throws WTException
Constructs an EPMReferenceLink.

By default, this constructor sets 'required' to false.

Supported API: true

Parameters:
referencedBy -
references -
asStoredChildName -
depType -
Returns:
EPMReferenceLink
Throws:
WTException

initialize

protected void initialize(EPMDocument referencedBy,
                          DocumentMaster references,
                          String asStoredChildName,
                          int depType)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Parameters:
referencedBy -
references -
asStoredChildName -
depType -
Throws:
WTException

newEPMReferenceLink

public static EPMReferenceLink newEPMReferenceLink(EPMDocument referencedBy,
                                                   DocumentMaster references)
                                            throws WTException
Constructs an EPMReferenceLink.

By default, this constructor sets 'asStoredChildName' to null, 'depType' to UNSPECIFIED and 'required' to false.

Supported API: true

Parameters:
referencedBy -
references -
Returns:
EPMReferenceLink
Throws:
WTException

getAsStoredChildName

public String getAsStoredChildName()
Gets the value of the attribute: AS_STORED_CHILD_NAME. Specifies the name of the "child" document as it was known by the application when it created the dependency link. Applications often internally save the names of documents that they reference. This field enables those applications to find the correct document after it is renamed.

Supported API: true

Specified by:
getAsStoredChildName in interface EPMDependencyLink
Returns:
String

setAsStoredChildName

public void setAsStoredChildName(String a_AsStoredChildName)
                          throws WTPropertyVetoException
Sets the value of the attribute: AS_STORED_CHILD_NAME. Specifies the name of the "child" document as it was known by the application when it created the dependency link. Applications often internally save the names of documents that they reference. This field enables those applications to find the correct document after it is renamed.

Supported API: true

Specified by:
setAsStoredChildName in interface EPMDependencyLink
Parameters:
a_AsStoredChildName -
Throws:
WTPropertyVetoException

asStoredChildNameValidate

private void asStoredChildNameValidate(String a_AsStoredChildName)
                                throws WTPropertyVetoException
Parameters:
a_AsStoredChildName -
Throws:
WTPropertyVetoException

getDepType

public int getDepType()
Gets the value of the attribute: DEP_TYPE. an integer that authoring application may use to designate the type of dependency

Supported API: true

Specified by:
getDepType in interface EPMDependencyLink
Returns:
int

setDepType

public void setDepType(int a_DepType)
                throws WTPropertyVetoException
Sets the value of the attribute: DEP_TYPE. an integer that authoring application may use to designate the type of dependency

Supported API: true

Specified by:
setDepType in interface EPMDependencyLink
Parameters:
a_DepType -
Throws:
WTPropertyVetoException

isRequired

public boolean isRequired()
Gets the value of the attribute: REQUIRED. Designates that the authoring application requires the "child" document in order to work with the "parent" document.

Supported API: true

Specified by:
isRequired in interface EPMDependencyLink
Returns:
boolean

setRequired

public void setRequired(boolean a_Required)
                 throws WTPropertyVetoException
Sets the value of the attribute: REQUIRED. Designates that the authoring application requires the "child" document in order to work with the "parent" document.

Supported API: true

Specified by:
setRequired in interface EPMDependencyLink
Parameters:
a_Required -
Throws:
WTPropertyVetoException

getUniqueLinkID

public long getUniqueLinkID()
Gets the value of the attribute: UNIQUE_LINK_ID. An internally generated unique link identifier. It may be read but not changed.

Supported API: true

Specified by:
getUniqueLinkID in interface EPMDependencyLink
Returns:
long

setUniqueLinkID

public void setUniqueLinkID(long a_UniqueLinkID)
                     throws WTPropertyVetoException
Sets the value of the attribute: UNIQUE_LINK_ID. An internally generated unique link identifier. It may be read but not changed.

Supported API: true

Specified by:
setUniqueLinkID in interface EPMDependencyLink
Parameters:
a_UniqueLinkID -
Throws:
WTPropertyVetoException

uniqueLinkIDValidate

private void uniqueLinkIDValidate(long a_UniqueLinkID)
                           throws WTPropertyVetoException
Parameters:
a_UniqueLinkID -
Throws:
WTPropertyVetoException

getUniqueNDId

public String getUniqueNDId()
Gets the value of the attribute: UNIQUE_NDID.

Supported API: true

Specified by:
getUniqueNDId in interface EPMDependencyLink
Returns:
String

setUniqueNDId

public void setUniqueNDId(String a_UniqueNDId)
                   throws WTPropertyVetoException
Sets the value of the attribute: UNIQUE_NDID.

Supported API: true

Specified by:
setUniqueNDId in interface EPMDependencyLink
Parameters:
a_UniqueNDId -
Throws:
WTPropertyVetoException

uniqueNDIdValidate

private void uniqueNDIdValidate(String a_UniqueNDId)
                         throws WTPropertyVetoException
Parameters:
a_UniqueNDId -
Throws:
WTPropertyVetoException

isHasIBAValues

public boolean isHasIBAValues()
Gets the value of the attribute: HAS_IBAVALUES. Signifies whether or not this EPM Dependency link has IBA values.

The reason for this flag is to improve performance by significantly reducing the number of IBA related queries. Querying for IBA values is expensive. In practice, only a very small percentage of EPM Dependency links will ever have IBA values.

Supported API: false

Specified by:
isHasIBAValues in interface EPMDependencyLink
Returns:
boolean

setHasIBAValues

protected void setHasIBAValues(boolean a_HasIBAValues)
Sets the value of the attribute: HAS_IBAVALUES. Signifies whether or not this EPM Dependency link has IBA values.

The reason for this flag is to improve performance by significantly reducing the number of IBA related queries. Querying for IBA values is expensive. In practice, only a very small percentage of EPM Dependency links will ever have IBA values.

Supported API: false

Parameters:
a_HasIBAValues -

getOwnerApplication

public EPMApplicationType getOwnerApplication()
Gets the value of the attribute: OWNER_APPLICATION. Indicate that the named application owns the object.

The parameter is an EPMApplicationType, so that any sort of checking can be done at run-time.

Supported API: true

Specified by:
getOwnerApplication in interface EPMObject
Returns:
EPMApplicationType

getAuthoringApplication

public EPMAuthoringAppType getAuthoringApplication()
Gets the value of the attribute: AUTHORING_APPLICATION. Indicates that the named application authored the object.

The parameter is an EPMAuthoringAppType, so that any sort of checking can be done at run-time.

Supported API: true

Specified by:
getAuthoringApplication in interface EPMObject
Returns:
EPMAuthoringAppType

checkAttributes

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

In particular, this must check that the modifications to the object were made by an approved application.

Supported API: true

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

getTypeDefinitionReference

public TypeDefinitionReference getTypeDefinitionReference()
Gets the object for the association that plays role: TYPE_DEFINITION_REFERENCE.

Supported API: false

Specified by:
getTypeDefinitionReference in interface Typed
Returns:
TypeDefinitionReference

setTypeDefinitionReference

public void setTypeDefinitionReference(TypeDefinitionReference a_TypeDefinitionReference)
                                throws WTPropertyVetoException
Sets the object for the association that plays role: TYPE_DEFINITION_REFERENCE.

Supported API: false

Specified by:
setTypeDefinitionReference in interface Typed
Parameters:
a_TypeDefinitionReference -
Throws:
WTPropertyVetoException

typeDefinitionReferenceValidate

private void typeDefinitionReferenceValidate(TypeDefinitionReference a_TypeDefinitionReference)
                                      throws WTPropertyVetoException
Parameters:
a_TypeDefinitionReference -
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 -

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

initialize

protected void initialize(EPMDocument referencedBy,
                          DocumentMaster references)
                   throws WTException
Throws:
WTException