wt.vc
Class VersionToVersionLink

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.vc.VersionToVersionLink
All Implemented Interfaces:
BinaryLink, DisplayIdentification, Externalizable, Link, NetFactor, ObjectMappable, Persistable, Serializable
Direct Known Subclasses:
EPMBuildRule, VersionToVersionForeignKeyLink

public abstract class VersionToVersionLink
extends WTObject
implements BinaryLink, Externalizable



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
           
static String ROLE_AOBJECT_REF
          Label for the attribute.
static String ROLE_BOBJECT_REF
          Label for the attribute.
private  VersionReference roleAObjectRef
           
private  VersionReference roleBObjectRef
           
(package private) static long serialVersionUID
           
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.fc.BinaryLink
ALL_ROLES, BOTH_ROLES, ROLE_AOBJECT_ROLE, ROLE_BOBJECT_ROLE
 
Fields inherited from interface wt.fc.Persistable
IDENTITY, PERSIST_INFO, TYPE
 
Fields inherited from interface wt.identity.DisplayIdentification
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE
 
Constructor Summary
VersionToVersionLink()
           
 
Method Summary
 QuerySpec appendJoinCriteria(Persistable obj, String otherSideRole, QuerySpec qs, int targetPos, int linkPos)
          Appends applicable search condition(s) onto the end of the given query spec based on the role to be navigate to and the attributes of the given object.
 QuerySpec appendRoleCriteria(Persistable obj, String role, QuerySpec qs, int linkPos)
          Appends applicable search condition(s) onto the end of the given query spec based on the role and the attributes of the given object.
 WTObject duplicate()
          Create a deep copy of this Link.
 boolean equals(Object obj)
          Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers.
 Object[] getAllObjects()
          Gets all the role objects of this link.
 Object[] getJoinValues(Persistable obj, String otherSideRole)
          Gets an array of values in the same order as the query was appended with search conditions.
 LinkInfo getLinkInfo()
          Return the LinkInfo object for this Link

Supported API: false
 Persistable getObject(String role)
          Deprecated. replaced by getRoleObject(String)
 Persistable getOtherObject(Persistable obj)
          

Supported API: false
 String getRole(Persistable obj)
          

Supported API: false
 Persistable getRoleAObject()
          Returns the role A object of this Link for this Link.
 QueryKey getRoleAObjectId()
          Return the object id of the role A object for this Link.
 WTReference getRoleAObjectRef()
          Gets the object for the association that plays role: ROLE_AOBJECT_REF.
 Persistable getRoleBObject()
          Returns the role B object of this Link for this Link.
 QueryKey getRoleBObjectId()
          Return the object id of the role B object for this Link.
 WTReference getRoleBObjectRef()
          Gets the object for the association that plays role: ROLE_BOBJECT_REF.
 String getRoleIdName(String rolename)
          Gets the role's key id attribute name of this link for the given role name.
 Object getRoleObject(String rolename)
          Gets the role object of this link for the given role name.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
protected  void initialize(Iterated roleAObject, Iterated roleBObject)
          Default initializer for Link objects.
 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(VersionToVersionLink thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setRoleAObject(Persistable roleAObject)
          Sets the role A object for this Link.
 void setRoleAObjectRef(WTReference a_RoleAObjectRef)
          Sets the object for the association that plays role: ROLE_AOBJECT_REF.
 void setRoleBObject(Persistable roleBObject)
          Sets the role B object for this Link.
 void setRoleBObjectRef(WTReference a_RoleBObjectRef)
          Sets the object for the association that plays role: ROLE_BOBJECT_REF.
 void setRoleObject(Object roleObject, String rolename)
          Sets the role object of this link for the given role name.
 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.WTObject
checkAttributes, 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
checkAttributes, getIdentity, getPersistInfo, getType, setPersistInfo
 
Methods inherited from interface wt.fc.NetFactor
getClassInfo, getConceptualClassname
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

ROLE_AOBJECT_REF

public static final String ROLE_AOBJECT_REF
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

roleAObjectRef

private VersionReference roleAObjectRef

ROLE_BOBJECT_REF

public static final String ROLE_BOBJECT_REF
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

roleBObjectRef

private VersionReference roleBObjectRef

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

VersionToVersionLink

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

readVersion

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

getLinkInfo

public LinkInfo getLinkInfo()
                     throws WTIntrospectionException
Return the LinkInfo object for this Link

Supported API: false

Specified by:
getLinkInfo in interface BinaryLink
Returns:
LinkInfo
Throws:
WTIntrospectionException

getObject

public Persistable getObject(String role)
                      throws WTException,
                             InvalidRoleException
Deprecated. replaced by getRoleObject(String)

Returns a Persistable object associated by this link given a role.

Supported API: false

Specified by:
getObject in interface BinaryLink
Parameters:
role -
Returns:
Persistable
Throws:
WTException
InvalidRoleException

getOtherObject

public Persistable getOtherObject(Persistable obj)
                           throws ObjectNotForLinkException


Supported API: false

Specified by:
getOtherObject in interface BinaryLink
Parameters:
obj -
Returns:
Persistable
Throws:
ObjectNotForLinkException

getRole

public String getRole(Persistable obj)
               throws WTException,
                      ObjectNotForLinkException


Supported API: false

Specified by:
getRole in interface BinaryLink
Parameters:
obj -
Returns:
String
Throws:
WTException
ObjectNotForLinkException

getRoleAObject

public Persistable getRoleAObject()
Returns the role A object of this Link for this Link.

Supported API: false

Specified by:
getRoleAObject in interface BinaryLink
Returns:
Persistable

setRoleAObject

public void setRoleAObject(Persistable roleAObject)
Sets the role A object for this Link.

Supported API: true

Specified by:
setRoleAObject in interface BinaryLink
Parameters:
roleAObject - The role A object for this Link.

getRoleAObjectId

public QueryKey getRoleAObjectId()
Return the object id of the role A object for this Link.

Supported API: false

Specified by:
getRoleAObjectId in interface BinaryLink
Returns:
QueryKey

getRoleBObject

public Persistable getRoleBObject()
Returns the role B object of this Link for this Link.

Supported API: false

Specified by:
getRoleBObject in interface BinaryLink
Returns:
Persistable

setRoleBObject

public void setRoleBObject(Persistable roleBObject)
Sets the role B object for this Link.

Supported API: true

Specified by:
setRoleBObject in interface BinaryLink
Parameters:
roleBObject - The role B object for this Link.

getRoleBObjectId

public QueryKey getRoleBObjectId()
Return the object id of the role B object for this Link.

Supported API: false

Specified by:
getRoleBObjectId in interface BinaryLink
Returns:
QueryKey

getAllObjects

public Object[] getAllObjects()
Gets all the role objects of this link.

Supported API: true

Specified by:
getAllObjects in interface Link
Returns:
Object[]

getRoleObject

public Object getRoleObject(String rolename)
                     throws WTException
Gets the role object of this link for the given role name.

Supported API: true

Specified by:
getRoleObject in interface Link
Parameters:
rolename -
Returns:
Object
Throws:
WTException

setRoleObject

public void setRoleObject(Object roleObject,
                          String rolename)
                   throws WTException
Sets the role object of this link for the given role name.

Supported API: true

Specified by:
setRoleObject in interface Link
Parameters:
roleObject - The role A object for this Link.
rolename -
Throws:
WTException

getRoleIdName

public String getRoleIdName(String rolename)
                     throws WTException
Gets the role's key id attribute name of this link for the given role name.

Supported API: false

Specified by:
getRoleIdName in interface Link
Parameters:
rolename -
Returns:
String
Throws:
WTException

appendJoinCriteria

public QuerySpec appendJoinCriteria(Persistable obj,
                                    String otherSideRole,
                                    QuerySpec qs,
                                    int targetPos,
                                    int linkPos)
                             throws WTException
Appends applicable search condition(s) onto the end of the given query spec based on the role to be navigate to and the attributes of the given object. This method is static to allow for use where there is only a class of the link available.

Supported API: false

Specified by:
appendJoinCriteria in interface Link
Parameters:
obj -
otherSideRole -
qs -
targetPos -
linkPos -
Returns:
QuerySpec
Throws:
WTException

getJoinValues

public Object[] getJoinValues(Persistable obj,
                              String otherSideRole)
                       throws WTException
Gets an array of values in the same order as the query was appended with search conditions.

Supported API: false

Specified by:
getJoinValues in interface Link
Parameters:
obj -
otherSideRole -
Returns:
Object[]
Throws:
WTException

duplicate

public WTObject duplicate()
                   throws WTException
Create a deep copy of this Link. This overriding method ensures that the copy has the same references to the roleA and roleB members as the source object.

Supported API: true

Overrides:
duplicate in class WTObject
Returns:
WTObject
Throws:
WTException

initialize

protected void initialize(Iterated roleAObject,
                          Iterated roleBObject)
                   throws WTException
Default initializer for Link objects.

Supported API: true

Parameters:
roleAObject -
roleBObject -
Throws:
WTException

appendRoleCriteria

public QuerySpec appendRoleCriteria(Persistable obj,
                                    String role,
                                    QuerySpec qs,
                                    int linkPos)
                             throws WTException
Appends applicable search condition(s) onto the end of the given query spec based on the role and the attributes of the given object.

Supported API: false

Specified by:
appendRoleCriteria in interface Link
Parameters:
obj -
role -
qs -
linkPos -
Returns:
QuerySpec
Throws:
WTException

getRoleAObjectRef

public WTReference getRoleAObjectRef()
Gets the object for the association that plays role: ROLE_AOBJECT_REF.

Supported API: false

Specified by:
getRoleAObjectRef in interface BinaryLink
Returns:
WTReference

setRoleAObjectRef

public void setRoleAObjectRef(WTReference a_RoleAObjectRef)
Sets the object for the association that plays role: ROLE_AOBJECT_REF.

Supported API: false

Specified by:
setRoleAObjectRef in interface BinaryLink
Parameters:
a_RoleAObjectRef -

getRoleBObjectRef

public WTReference getRoleBObjectRef()
Gets the object for the association that plays role: ROLE_BOBJECT_REF.

Supported API: false

Specified by:
getRoleBObjectRef in interface BinaryLink
Returns:
WTReference

setRoleBObjectRef

public void setRoleBObjectRef(WTReference a_RoleBObjectRef)
Sets the object for the association that plays role: ROLE_BOBJECT_REF.

Supported API: false

Specified by:
setRoleBObjectRef in interface BinaryLink
Parameters:
a_RoleBObjectRef -

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