com.altair.hwm.database.dbmodel
Class HWMForeignAttribute

java.lang.Object
  extended by com.altair.hwm.database.dbmodel.HWMAttribute
      extended by com.altair.hwm.database.dbmodel.HWMForeignAttribute
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener

public class HWMForeignAttribute
extends HWMAttribute

Title: HWMForeignAttribute

Description: This class represents attributes that point to other classes i.e. foreign keys.

Company: Altair Engineering, Inc.


Field Summary
static java.lang.String PROP_ATTRIB_FGN
          The prop name for the event fired when the foreign attribute is set
 
Fields inherited from class com.altair.hwm.database.dbmodel.HWMAttribute
PROP_ATTRIB_CONST, PROP_ATTRIB_DISPLAY, PROP_ATTRIB_NAME, PROP_ATTRIB_TYPE
 
Method Summary
 void Export(org.jdom.Element elemAttrib)
          Creates XML element representation for this attribute
 HWMAttribute GetForeignAttribute()
          Get the foreign attribute
 java.lang.String GetName()
          Gets the name of the attribute
 java.lang.String GetType()
          Gets the type of the attribute
 void Resolve(org.jdom.Element elemAttrib)
          Resolves the foreign attribute.
 void SetDefaultValue(java.lang.Object objDefValue)
          Overrides the SetDefaultValue method to prohibit any user from associating the foreign key with a default value
 void SetForeignAttribute(HWMAttribute hwmAttribute)
          Set the foreign attribute
 void SetType(java.lang.String strType)
          This method does nothing
 
Methods inherited from class com.altair.hwm.database.dbmodel.HWMAttribute
addPropertyChangeListener, addVetoableChangeListener, GetConstraints, GetDisplayName, GetHWMClass, GetSQLRepresentation, Import, IsEditable, IsVisible, propertyChange, removePropertyChangeListener, removeVetoableChangeListener, SetDisplayName, SetEditable, SetName, SetVisible, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROP_ATTRIB_FGN

public static final java.lang.String PROP_ATTRIB_FGN
The prop name for the event fired when the foreign attribute is set

See Also:
Constant Field Values
Method Detail

GetName

public java.lang.String GetName()
Gets the name of the attribute

Overrides:
GetName in class HWMAttribute
Returns:
String Name of this attribute.

GetForeignAttribute

public HWMAttribute GetForeignAttribute()
Get the foreign attribute

Returns:
HWMAttribute The attribute in the class to which this attrib points to

SetForeignAttribute

public void SetForeignAttribute(HWMAttribute hwmAttribute)
Set the foreign attribute

Parameters:
hwmAttribute - The foreign attribute this points to

GetType

public java.lang.String GetType()
                         throws java.lang.Exception
Gets the type of the attribute

Overrides:
GetType in class HWMAttribute
Returns:
String Type of this attribute.
Throws:
java.lang.Exception - If the attribute was not initialized

SetType

public void SetType(java.lang.String strType)
This method does nothing

Overrides:
SetType in class HWMAttribute
Parameters:
strType - Type of this attribute.
Throws:
java.lang.Exception - Cannot set the type for a foreign attribute

SetDefaultValue

public void SetDefaultValue(java.lang.Object objDefValue)
Overrides the SetDefaultValue method to prohibit any user from associating the foreign key with a default value

Parameters:
bNumeric - If numeric then true else false

Export

public void Export(org.jdom.Element elemAttrib)
Creates XML element representation for this attribute

Overrides:
Export in class HWMAttribute
Parameters:
elemAttrib - The element representing this attribute

Resolve

public void Resolve(org.jdom.Element elemAttrib)
             throws java.lang.Exception
Resolves the foreign attribute.

Parameters:
elemAttrib - The element representing this attribute
Throws:
java.lang.Exception