wt.federation
Class InfoEngineTranslationTable

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.fc.Item
          extended bywt.federation.InfoEngineTranslationTable
All Implemented Interfaces:
AccessControlled, DisplayIdentification, DomainAdministered, Externalizable, NetFactor, ObjectMappable, Persistable, Serializable

public class InfoEngineTranslationTable
extends Item
implements Externalizable

Generate a unique identifier for a remote object given a key and a set of name/value substitutions.

Use the newInfoEngineTranslationTable static factory method(s), not the InfoEngineTranslationTable 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
static String CLASS_GROUP_TABLE
          Label for the attribute.
static String CLASS_TEMPLATE_TABLE
          Label for the attribute.
private  Hashtable classGroupTable
           
private static String CLASSNAME
           
private  Hashtable classTemplateTable
           
static long EXTERNALIZATION_VERSION_UID
           
static String ID_TEMPLATE_TABLE
          Label for the attribute.
private  Hashtable idTemplateTable
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
private static String ROLE_QUALIFIER
           
(package private) static long serialVersionUID
           
static String TABLE_NAME
          Label for the attribute.
private static int TABLE_NAME_UPPER_LIMIT
           
static String TABLE_TYPE
          Label for the attribute.
private static int TABLE_TYPE_UPPER_LIMIT
           
private  String tableName
           
private  String tableType
           
static String TRANSLATION_TABLE
          Label for the attribute.
private  Hashtable translationTable
           
private static String URL_QUALIFIER
           
 
Fields inherited from class wt.fc.Item
VERSION_40_UID, VERSION_51_UID
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.admin.DomainAdministered
DOMAIN_REF, INHERITED_DOMAIN
 
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
InfoEngineTranslationTable()
           
 
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 generateObjectId(Class javaClass, Hashtable attributeTable, Hashtable arguments)
          Generate a unique identifier for a remote object given the Java class to which it is being mapped and a set of name/value substitutions.
 String generateObjectId(Class linkClass, String role, Hashtable attributeTable, Hashtable arguments)
          Generate a unique identifier for a remote object given a link class that references it, the role that it plays in the association defined by the link class, and a set of name/value substitutions.
 String generateObjectId(String key, Hashtable attributeTable, Hashtable arguments)
          Generate a unique identifier for a remote object given a generic key and a set of name/value substitutions.
 String generateSourceURL(Class javaClass, Hashtable attributeTable, Hashtable arguments)
          Generate a source URL for a remote object given the Java class to which it is mapped and a set of name/value substitutions.
 String getAttributeForField(Class javaClass, String fieldName)
          Return the remote attribute name associated with a specified field name of a specified Java class.
 Class getClassForGroup(String groupName)
          Get the Java class corresponding to a specified Info*Engine group name.
 Hashtable getClassGroupTable()
          Gets the value of the attribute: CLASS_GROUP_TABLE.
 Hashtable getClassTable(Class javaClass)
          Return the Hashtable defining translations between the field names of a specified Java class and remote attribute names.
 Hashtable getClassTemplate(Class javaClass)
          Return the Hashtable defining a template that can be used to create a remote object representing the specified Java class.
 Hashtable getClassTemplateTable()
          Gets the value of the attribute: CLASS_TEMPLATE_TABLE.
 String getConceptualClassname()
          Deprecated.  
 Enumeration getDefinedJavaClasses()
          Return the enumeration of Java class names for which there are translations to remote object classes.
 String getGroupForClass(Class javaClass)
          Return the Info*Engine group name corresponding to the specified Java class.
 String getIdTemplate(Class javaClass)
          

Supported API: false
 String getIdTemplate(Class linkClass, String role)
          

Supported API: false
 String getIdTemplate(String key)
          Return the template associated with the specified key.
 Hashtable getIdTemplateTable()
          Gets the value of the attribute: ID_TEMPLATE_TABLE.
 String getSourceURLTemplate(Class javaClass)
          

Supported API: false
 String getTableName()
          Gets the value of the attribute: TABLE_NAME.
 String getTableType()
          Gets the value of the attribute: TABLE_TYPE.
 Hashtable getTranslationTable()
          Gets the value of the attribute: TRANSLATION_TABLE.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
protected  void initialize()
          Supports initialization, following construction of an instance.
protected  void initialize(String name, String type)
          Supports initialization, following construction of an instance.
static InfoEngineTranslationTable newInfoEngineTranslationTable()
          Constructor returning an instance initialized with default property values.
static InfoEngineTranslationTable newInfoEngineTranslationTable(String name, String type)
          Constructor returning an instance initialized with a specified name and type.
 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(InfoEngineTranslationTable thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setAttributeForField(Class javaClass, String fieldName, String attributeName)
          Set the remote attribute name associated with a specified field name of a specified Java class.
 void setClassAndGroup(Class javaClass, String groupName)
          Set the Java class associated with a specified Info*Engine group name, and vice versa.
 void setClassForGroup(String groupName, Class javaClass)
          Set the Java class associated with a specified Info*Engine group name.
 void setClassGroupTable(Hashtable a_ClassGroupTable)
          Sets the value of the attribute: CLASS_GROUP_TABLE.
 void setClassTable(Class javaClass, Hashtable translations)
          Set the Hashtable defining translations between the field names of a specified Java class and remote attribute names.
 void setClassTemplate(Class javaClass, Hashtable template)
          Set the Hashtable defining a template that can be used to create a remote object representing the specified Java class.
 void setClassTemplateTable(Hashtable a_ClassTemplateTable)
          Sets the value of the attribute: CLASS_TEMPLATE_TABLE.
 void setGroupForClass(Class javaClass, String groupName)
          Set the Info*Engine group name corresponding to the specified Java class.
 void setIdTemplate(Class javaClass, String template)
          Establish the template that will be used to generate unique identifiers for remote objects mapped to the specified Java class.
 void setIdTemplate(Class linkClass, String roleAName, String roleATemplate, String roleBName, String roleBTemplate)
          Establish the templates that will be used to generate unique identifiers for remote objects associated by a specified link class.
 void setIdTemplate(String key, String template)
          Establish the template that will be used to generate unique identifiers associated with the specified key.
 void setIdTemplateTable(Hashtable a_IdTemplateTable)
          Sets the value of the attribute: ID_TEMPLATE_TABLE.
 void setSourceURLTemplate(Class javaClass, String template)
          Establish the template that will be used to generate source URL's for remote objects mapped to the specified Java class.
 void setTableName(String a_TableName)
          Sets the value of the attribute: TABLE_NAME.
 void setTableType(String a_TableType)
          Sets the value of the attribute: TABLE_TYPE.
 void setTranslationTable(Hashtable a_TranslationTable)
          Sets the value of the attribute: TRANSLATION_TABLE.
private  void tableNameValidate(String a_TableName)
           
private  void tableTypeValidate(String a_TableType)
           
 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.Item
getDomainRef, isInheritedDomain, readVersion, setDomainRef, setInheritedDomain
 
Methods inherited from class wt.fc.WTObject
checkAttributes, duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getIdentity, 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.fc.NetFactor
getClassInfo
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

TRANSLATION_TABLE

public static final String TRANSLATION_TABLE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

translationTable

private Hashtable translationTable

CLASS_GROUP_TABLE

public static final String CLASS_GROUP_TABLE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

classGroupTable

private Hashtable classGroupTable

CLASS_TEMPLATE_TABLE

public static final String CLASS_TEMPLATE_TABLE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

classTemplateTable

private Hashtable classTemplateTable

ID_TEMPLATE_TABLE

public static final String ID_TEMPLATE_TABLE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

idTemplateTable

private Hashtable idTemplateTable

TABLE_NAME

public static final String TABLE_NAME
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

TABLE_NAME_UPPER_LIMIT

private static int TABLE_NAME_UPPER_LIMIT

tableName

private String tableName

TABLE_TYPE

public static final String TABLE_TYPE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

TABLE_TYPE_UPPER_LIMIT

private static int TABLE_TYPE_UPPER_LIMIT

tableType

private String tableType

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

ROLE_QUALIFIER

private static final String ROLE_QUALIFIER
See Also:
Constant Field Values

URL_QUALIFIER

private static final String URL_QUALIFIER
See Also:
Constant Field Values
Constructor Detail

InfoEngineTranslationTable

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

readVersion

protected boolean readVersion(InfoEngineTranslationTable 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 Item
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 Item
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

getTranslationTable

public Hashtable getTranslationTable()
Gets the value of the attribute: TRANSLATION_TABLE.

Supported API: false

Returns:
Hashtable

setTranslationTable

public void setTranslationTable(Hashtable a_TranslationTable)
                         throws WTPropertyVetoException
Sets the value of the attribute: TRANSLATION_TABLE.

Supported API: false

Parameters:
a_TranslationTable -
Throws:
WTPropertyVetoException

getClassGroupTable

public Hashtable getClassGroupTable()
Gets the value of the attribute: CLASS_GROUP_TABLE.

Supported API: false

Returns:
Hashtable

setClassGroupTable

public void setClassGroupTable(Hashtable a_ClassGroupTable)
                        throws WTPropertyVetoException
Sets the value of the attribute: CLASS_GROUP_TABLE.

Supported API: false

Parameters:
a_ClassGroupTable -
Throws:
WTPropertyVetoException

getClassTemplateTable

public Hashtable getClassTemplateTable()
Gets the value of the attribute: CLASS_TEMPLATE_TABLE.

Supported API: false

Returns:
Hashtable

setClassTemplateTable

public void setClassTemplateTable(Hashtable a_ClassTemplateTable)
                           throws WTPropertyVetoException
Sets the value of the attribute: CLASS_TEMPLATE_TABLE.

Supported API: false

Parameters:
a_ClassTemplateTable -
Throws:
WTPropertyVetoException

getIdTemplateTable

public Hashtable getIdTemplateTable()
Gets the value of the attribute: ID_TEMPLATE_TABLE.

Supported API: false

Returns:
Hashtable

setIdTemplateTable

public void setIdTemplateTable(Hashtable a_IdTemplateTable)
                        throws WTPropertyVetoException
Sets the value of the attribute: ID_TEMPLATE_TABLE.

Supported API: false

Parameters:
a_IdTemplateTable -
Throws:
WTPropertyVetoException

getTableName

public String getTableName()
Gets the value of the attribute: TABLE_NAME.

Supported API: false

Returns:
String

setTableName

public void setTableName(String a_TableName)
                  throws WTPropertyVetoException
Sets the value of the attribute: TABLE_NAME.

Supported API: false

Parameters:
a_TableName -
Throws:
WTPropertyVetoException

tableNameValidate

private void tableNameValidate(String a_TableName)
                        throws WTPropertyVetoException
Parameters:
a_TableName -
Throws:
WTPropertyVetoException

getTableType

public String getTableType()
Gets the value of the attribute: TABLE_TYPE.

Supported API: false

Returns:
String

setTableType

public void setTableType(String a_TableType)
                  throws WTPropertyVetoException
Sets the value of the attribute: TABLE_TYPE.

Supported API: false

Parameters:
a_TableType -
Throws:
WTPropertyVetoException

tableTypeValidate

private void tableTypeValidate(String a_TableType)
                        throws WTPropertyVetoException
Parameters:
a_TableType -
Throws:
WTPropertyVetoException

newInfoEngineTranslationTable

public static InfoEngineTranslationTable newInfoEngineTranslationTable()
                                                                throws FederationServicesException
Constructor returning an instance initialized with default property values.

Supported API: true

Returns:
InfoEngineTranslationTable
Throws:
FederationServicesException

newInfoEngineTranslationTable

public static InfoEngineTranslationTable newInfoEngineTranslationTable(String name,
                                                                       String type)
                                                                throws FederationServicesException
Constructor returning an instance initialized with a specified name and type.

Supported API: true

Parameters:
name -
type -
Returns:
InfoEngineTranslationTable
Throws:
FederationServicesException

initialize

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

Supported API: true

Parameters:
name -
type -
Throws:
FederationServicesException

getGroupForClass

public String getGroupForClass(Class javaClass)
Return the Info*Engine group name corresponding to the specified Java class.

Supported API: false

Parameters:
javaClass -
Returns:
String

setGroupForClass

public void setGroupForClass(Class javaClass,
                             String groupName)
Set the Info*Engine group name corresponding to the specified Java class.

Supported API: false

Parameters:
javaClass -
groupName -

getDefinedJavaClasses

public Enumeration getDefinedJavaClasses()
Return the enumeration of Java class names for which there are translations to remote object classes.

Supported API: false

Returns:
Enumeration

getClassTable

public Hashtable getClassTable(Class javaClass)
Return the Hashtable defining translations between the field names of a specified Java class and remote attribute names.

Supported API: false

Parameters:
javaClass -
Returns:
Hashtable

setClassTable

public void setClassTable(Class javaClass,
                          Hashtable translations)
Set the Hashtable defining translations between the field names of a specified Java class and remote attribute names.

Supported API: false

Parameters:
javaClass -
translations -

getClassForGroup

public Class getClassForGroup(String groupName)
Get the Java class corresponding to a specified Info*Engine group name.

Supported API: false

Parameters:
groupName -
Returns:
Class

setClassForGroup

public void setClassForGroup(String groupName,
                             Class javaClass)
Set the Java class associated with a specified Info*Engine group name.

Supported API: false

Parameters:
groupName -
javaClass -

setClassAndGroup

public void setClassAndGroup(Class javaClass,
                             String groupName)
Set the Java class associated with a specified Info*Engine group name, and vice versa.

Supported API: true

Parameters:
javaClass -
groupName -

getAttributeForField

public String getAttributeForField(Class javaClass,
                                   String fieldName)
Return the remote attribute name associated with a specified field name of a specified Java class.

Supported API: false

Parameters:
javaClass -
fieldName -
Returns:
String

setAttributeForField

public void setAttributeForField(Class javaClass,
                                 String fieldName,
                                 String attributeName)
Set the remote attribute name associated with a specified field name of a specified Java class.

Supported API: false

Parameters:
javaClass -
fieldName -
attributeName -

getIdTemplate

public String getIdTemplate(String key)
Return the template associated with the specified key.

Supported API: true

Parameters:
key -
Returns:
String

getIdTemplate

public String getIdTemplate(Class javaClass)


Supported API: false

Parameters:
javaClass -
Returns:
String

getIdTemplate

public String getIdTemplate(Class linkClass,
                            String role)


Supported API: false

Parameters:
linkClass -
role -
Returns:
String

setIdTemplate

public void setIdTemplate(String key,
                          String template)
Establish the template that will be used to generate unique identifiers associated with the specified key.

Supported API: true

Parameters:
key -
template -

setIdTemplate

public void setIdTemplate(Class javaClass,
                          String template)
Establish the template that will be used to generate unique identifiers for remote objects mapped to the specified Java class.

Supported API: true

Parameters:
javaClass -
template -

setIdTemplate

public void setIdTemplate(Class linkClass,
                          String roleAName,
                          String roleATemplate,
                          String roleBName,
                          String roleBTemplate)
Establish the templates that will be used to generate unique identifiers for remote objects associated by a specified link class.

Supported API: true

Parameters:
linkClass -
roleAName -
roleATemplate -
roleBName -
roleBTemplate -

getSourceURLTemplate

public String getSourceURLTemplate(Class javaClass)


Supported API: false

Parameters:
javaClass -
Returns:
String

setSourceURLTemplate

public void setSourceURLTemplate(Class javaClass,
                                 String template)
Establish the template that will be used to generate source URL's for remote objects mapped to the specified Java class.

Supported API: true

Parameters:
javaClass -
template -

generateObjectId

public String generateObjectId(Class javaClass,
                               Hashtable attributeTable,
                               Hashtable arguments)
Generate a unique identifier for a remote object given the Java class to which it is being mapped and a set of name/value substitutions.

Supported API: true

Parameters:
javaClass -
attributeTable -
arguments -
Returns:
String

generateObjectId

public String generateObjectId(Class linkClass,
                               String role,
                               Hashtable attributeTable,
                               Hashtable arguments)
Generate a unique identifier for a remote object given a link class that references it, the role that it plays in the association defined by the link class, and a set of name/value substitutions.

Supported API: true

Parameters:
linkClass -
role -
attributeTable -
arguments -
Returns:
String

generateObjectId

public String generateObjectId(String key,
                               Hashtable attributeTable,
                               Hashtable arguments)
Generate a unique identifier for a remote object given a generic key and a set of name/value substitutions.

Supported API: true

Parameters:
key -
attributeTable -
arguments -
Returns:
String

generateSourceURL

public String generateSourceURL(Class javaClass,
                                Hashtable attributeTable,
                                Hashtable arguments)
Generate a source URL for a remote object given the Java class to which it is mapped and a set of name/value substitutions.

Supported API: true

Parameters:
javaClass -
attributeTable -
arguments -
Returns:
String

getClassTemplate

public Hashtable getClassTemplate(Class javaClass)
Return the Hashtable defining a template that can be used to create a remote object representing the specified Java class.

Supported API: false

Parameters:
javaClass -
Returns:
Hashtable

setClassTemplate

public void setClassTemplate(Class javaClass,
                             Hashtable template)
Set the Hashtable defining a template that can be used to create a remote object representing the specified Java class.

Supported API: false

Parameters:
javaClass -
template -

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

initialize

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

Supported API: true

Overrides:
initialize in class Item
Throws:
FederationServicesException