|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.altair.hwm.database.dbmodel.HWMClass
com.altair.hwm.database.dbmodel.HWMRelationClass
public class HWMRelationClass
Title: HWMRelationClass
Description: This class represents a relationship between any two classes A and B
Company: Altair Engineering, Inc.
Field Summary | |
---|---|
static java.lang.String |
PROP_REL_AB
The name of the property (name for relationship from class A to B) which when changed, an event is fired |
static java.lang.String |
PROP_REL_BA
The name of the property (name for relationship from class B to A) which when changed, an event is fired |
Fields inherited from class com.altair.hwm.database.dbmodel.HWMClass |
---|
HWM_UNIQUE_ID, MANDATORY_ATTRIB_COUNT, PROP_CLASS_ATTRIB, PROP_CLASS_ATTRIB_ADD, PROP_CLASS_ATTRIB_DEL, PROP_CLASS_CONST, PROP_CLASS_DISPLAY, PROP_CLASS_NAME |
Method Summary | |
---|---|
HWMAttribute |
AddAttribute(java.lang.String strAttribName)
Please use AddAttributeA and AddAttributeB to add the attributes. |
void |
AddAttributes(java.lang.String strAttribA,
HWMAttribute hwmAttribA,
java.lang.String strAttribB,
HWMAttribute hwmAttribB)
Add attributes A, B in the relationship class |
HWMForeignAttribute |
AddFgnAttrib(java.lang.String strName,
HWMAttribute hwmAttrib)
Add a foreign attribute to the class |
HWMForeignAttribute |
AddForeignAttribute(java.lang.String strName,
HWMAttribute hwmAttrib)
Please use AddAttributeA and AddAttributeB to add the attributes. |
void |
Export(org.jdom.Element elemClass)
Creates XML element representation of this class |
HWMAttribute |
GetAttributeA()
Returns the attribute A |
HWMAttribute |
GetAttributeB()
Returns the attribute B |
java.sql.ResultSet |
GetRelationshipAB(java.lang.Object objValue)
Given A's value, get all B |
java.sql.ResultSet |
GetRelationshipBA(java.lang.Object objValue)
Given B's value, get all A |
java.lang.String |
GetRelationshipNameAToB()
Get the name for relation from Class A to B |
java.lang.String |
GetRelationshipNameBToA()
Get the name for relation from Class B to A |
void |
Import(org.jdom.Element elemClass)
Recreates the class. |
void |
Init()
Init creates the required attributes |
void |
RemoveAttribute(java.lang.String strAttribName)
Use RemoveAttributes instead of this method. |
void |
RemoveAttributes()
Removes attributes A, B in the relationship class |
void |
Resolve()
Resolves the foreign attribs and constraints. |
void |
SetRelationshipNameAToB(java.lang.String strNameAToB)
Set the name for relation from Class A to B |
void |
SetRelationshipNameBToA(java.lang.String strNameBToA)
Set the name for relation from Class B to A |
Methods inherited from class com.altair.hwm.database.dbmodel.HWMClass |
---|
AddData, addPropertyChangeListener, addVetoableChangeListener, GetAttribute, GetAttributeCount, GetAttributes, GetConstraints, GetData, GetData, GetData, GetDataModel, GetDisplayName, GetForeignAttributes, GetName, GetPrimaryAttribute, GetRelatedClasses, GetSQLRepresentation, IsEditable, IsRelated, IsVisible, propertyChange, RemoveData, removePropertyChangeListener, removeVetoableChangeListener, SetDisplayName, SetEditable, SetName, SetVisible, toString, UpdateData, vetoableChange |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROP_REL_AB
public static final java.lang.String PROP_REL_BA
Method Detail |
---|
public void Init() throws java.lang.Exception
Init
in class HWMClass
java.lang.Exception
public java.lang.String GetRelationshipNameAToB()
public void SetRelationshipNameAToB(java.lang.String strNameAToB)
strNameAToB
- The name for the relationship form class A to Bpublic java.lang.String GetRelationshipNameBToA()
public void SetRelationshipNameBToA(java.lang.String strNameBToA)
strNameBToA
- The name for the relationship form class B to Apublic HWMAttribute AddAttribute(java.lang.String strAttribName)
AddAttribute
in class HWMClass
strAttribName
- The name of the attribute that should be added to
this class.
public HWMForeignAttribute AddForeignAttribute(java.lang.String strName, HWMAttribute hwmAttrib) throws java.lang.Exception
AddForeignAttribute
in class HWMClass
strName
- The name for the fgn attributehwmAttrib
- An attribute to be contained in this
class
java.lang.Exception
- If a class with given name already exists,
an exception is thrownpublic HWMForeignAttribute AddFgnAttrib(java.lang.String strName, HWMAttribute hwmAttrib) throws java.lang.Exception
strName
- The name for the fgn attributehwmAttrib
- An attribute to be contained in this class
java.lang.Exception
- If a class with given name already exists,
an exception is thrownpublic void RemoveAttribute(java.lang.String strAttribName) throws java.lang.Exception
RemoveAttribute
in class HWMClass
strAttribName
- The name of the attribute to be removed
java.lang.Exception
public void AddAttributes(java.lang.String strAttribA, HWMAttribute hwmAttribA, java.lang.String strAttribB, HWMAttribute hwmAttribB) throws java.lang.Exception
strAttribA
- The name for fgn attrib AhwmAttribA
- An attribute to be contained in this
class (A)strAttribB
- The name for fgn attrib BhwmAttribB
- An attribute to be contained in this
class (B)
java.lang.Exception
- If the attribute cannot be addedpublic void RemoveAttributes() throws java.lang.Exception
java.lang.Exception
- If the attribute cannot be addedpublic HWMAttribute GetAttributeA()
public HWMAttribute GetAttributeB()
public java.sql.ResultSet GetRelationshipAB(java.lang.Object objValue) throws java.lang.Exception
objValue
- The value of attribute A
java.lang.Exception
- If the data cannot be retrievedpublic java.sql.ResultSet GetRelationshipBA(java.lang.Object objValue) throws java.lang.Exception
objValue
- The value of attribute B
java.lang.Exception
- If the data cannot be retrievedpublic void Export(org.jdom.Element elemClass)
Export
in class HWMClass
elemClass
- The element representing this classpublic void Import(org.jdom.Element elemClass) throws java.lang.Exception
Import
in class HWMClass
elemDM
- The element representing this class
java.lang.Exception
public void Resolve() throws java.lang.Exception
Resolve
in class HWMClass
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |