|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.udo.cs.miningmart.m4.core.M4Object
edu.udo.cs.miningmart.m4.core.M4Data
edu.udo.cs.miningmart.m4.core.Key
edu.udo.cs.miningmart.m4.core.ForeignKey
This class implements the foreign key functionality.
| Field Summary |
| Fields inherited from class edu.udo.cs.miningmart.m4.core.Key |
ATTRIB_HEAD_FK_CS, ATTRIB_HEAD_ID, ATTRIB_HEAD_NAME, ATTRIB_HEAD_PK_CS, M4_TABLE_NAME, m4Info |
| Fields inherited from class edu.udo.cs.miningmart.m4.core.M4Data |
myDocumentation |
| Fields inherited from class edu.udo.cs.miningmart.m4.core.M4Object |
myId, myName |
| Fields inherited from interface edu.udo.cs.miningmart.m4.utils.XmlInfo |
M4_XML_VERSION, TAG_COLLECTION, TAG_DOUBLE, TAG_INTEGER, TAG_LONG, TAG_M4_ID, TAG_SHORT, TAG_STRING, TAG_XML_ID |
| Fields inherited from interface edu.udo.cs.miningmart.m4.utils.M4Table |
NOT_NULL |
| Constructor Summary | |
ForeignKey(DB m4Db)
Constructor for ForeignKeyImpl. |
|
| Method Summary | |
void |
addColumnLink(Column fkColumn,
Column pkColumn)
Adds a Column Link to this ForeignKey. |
ForeignKey |
copy(Columnset newColumnSet)
|
java.util.Collection |
getAllColumnLinks()
This method returns a Collection of ForeignKeyLinks.
|
protected Column |
getColumn(KeyMember km)
|
java.util.Collection |
getDependentObjects()
This method is part of the XML-serialization and needs to be implemented by all M4Data sub-classes that need to be serialized. |
ForeignKeyLink |
getFirstColumnLink()
Convenience method used by classes that assume that each ForeignKey link involves only one Column in each of the two Columnsets. |
Column |
getForeignForPrimaryColumn(Column thePrimaryKeyColumn)
Returns the foreign key column that is associated with the given primary key column, if the latter exists in this ForeignKey. |
Columnset |
getForeignKeyColumnset()
Getter method. |
protected java.util.Collection |
getObjectsInNamespace(java.lang.Class typeOfObjects)
This method returns the objects of the specified type that form a namespace in the scope of this M4Data object. |
Column |
getPrimaryForForeignColumn(Column theForeignKeyColumn)
Returns the primary key column that is associated with the given foreign key column, if the latter exists in this ForeignKey. |
Columnset |
getPrimaryKeyColumnset()
Getter method. |
Relation |
getRelation()
Getter method. |
boolean |
isColumnContainedInForeignColumns(Column theColumn)
Returns TRUE iff the given Column acts as a foreign key Column in this ForeignKey. |
boolean |
isColumnContainedInPrimaryColumns(Column theColumn)
Returns TRUE iff the given Column acts as a primary key Column in this ForeignKey. |
void |
primitiveSetForeignKeyColumnset(Columnset cs)
Primitive setter, do not use it! |
void |
primitiveSetPrimaryKeyColumnset(Columnset cs)
Primitive setter, do not use it! |
void |
removeAllColumnLinks()
Empties this ForeignKey of all Column Links. |
void |
removeColumn(java.lang.String name)
Removing a Column from the Key, but not from the Columnset the Column belongs to. |
void |
removeColumnLink(java.lang.String name)
Removes a Column Link from this ForeignKey. |
void |
removeForeignKeyColumnset()
|
void |
removePrimaryKeyColumnset()
|
void |
setForeignKeyColumnset(Columnset cs)
Setter method. |
void |
setPrimaryKeyColumnset(Columnset cs)
Setter method. |
void |
setRelation(Relation rel,
boolean isFrom)
Setter method. |
void |
setRelationPrimitive(Relation r)
Primitive setter. |
| Methods inherited from class edu.udo.cs.miningmart.m4.core.Key |
addMember, deleteSoon, getIdAttributeName, getM4Info, getM4TableName, getMembers, getXmlInfo, print, removeAllColumns, removeAllM4References, removeMemberByForeignColumnName, removeMemberByPrimaryColumnName, removeMembers, setMembers |
| Methods inherited from class edu.udo.cs.miningmart.m4.core.M4Data |
deleteLocal, exportLocal, genericGetter, genericSetter, getDocumentation, getObjectsReferencingMe, getObjectsReferencingMe, getObjectTag, getValidName, getXmlIdTag, getXmlVersion, hasDeleteStatus, importLocal, isDirty, isWaitingForDelete, primitiveGetDocObject, primitiveSetDocObject, readFromDb, readFromDbLocal, removeDocObject, removeFromDb, removeSetFromDb, setDirty, setDocumentation, setId, setName, storeLocal, updateObjectsFromTable |
| Methods inherited from class edu.udo.cs.miningmart.m4.core.M4Object |
compareTo, doPrint, doPrint, equals, executeBusinessSingleValueSqlRead, executeBusinessSingleValueSqlReadL, executeBusinessSqlRead, executeBusinessSqlWrite, executeM4SingleValueSqlRead, executeM4SingleValueSqlReadL, executeM4SqlRead, executeM4SqlWrite, getCasePrintObject, getId, getM4Db, getM4ObjectFromCache, getName, getNextM4SequenceValue, isNew, load, putM4ObjectToCache, replaceSpacesInName |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface edu.udo.cs.miningmart.m4.M4Data |
deleteSoon, getDocumentation, getValidName, isDirty, isWaitingForDelete, setDocumentation |
| Methods inherited from interface edu.udo.cs.miningmart.m4.M4Object |
doPrint, doPrint, equals, executeBusinessSingleValueSqlRead, executeBusinessSingleValueSqlReadL, executeBusinessSqlRead, executeBusinessSqlWrite, executeM4SingleValueSqlRead, executeM4SingleValueSqlReadL, executeM4SqlRead, executeM4SqlWrite, getCasePrintObject, getId, getM4Db, getM4ObjectFromCache, getName, getNextM4SequenceValue, isNew, load, print, putM4ObjectToCache, replaceSpacesInName, setId, setName |
| Methods inherited from interface edu.udo.cs.miningmart.m4.utils.XmlInfo |
doPrint, doPrint, exportLocal, genericGetter, genericSetter, getObjectTag, getXmlIdTag, getXmlVersion, importLocal |
| Constructor Detail |
public ForeignKey(DB m4Db)
m4Db - The DB object| Method Detail |
protected java.util.Collection getObjectsInNamespace(java.lang.Class typeOfObjects)
throws M4Exception
M4Datanull. If a namespace could
exist but doesn't, an empty Collection is returned.
getObjectsInNamespace in class M4DatatypeOfObjects - the type of objects that form the namespace
typeOfObjects,
or null.
M4ExceptionM4Data.getObjectsInNamespace(Class)protected Column getColumn(KeyMember km)
edu.udo.cs.miningmart.m4.Key#getColumn(KeyMember)
public void addColumnLink(Column fkColumn,
Column pkColumn)
throws M4Exception
ForeignKey
addColumnLink in interface ForeignKeyfkColumn - The foreign key Column to add to this ForeignKey.pkColumn - The primary key Column that is referenced by fkColumn.
M4Exceptionminingmart.m4.ForeignKey#addColumn(Column, Column)
public boolean isColumnContainedInForeignColumns(Column theColumn)
throws M4Exception
ForeignKey
isColumnContainedInForeignColumns in interface ForeignKeytheColumn - the given Column
M4Exception
public boolean isColumnContainedInPrimaryColumns(Column theColumn)
throws M4Exception
ForeignKey
isColumnContainedInPrimaryColumns in interface ForeignKeytheColumn - the given Column
M4Exception
public Column getPrimaryForForeignColumn(Column theForeignKeyColumn)
throws M4Exception
ForeignKey
getPrimaryForForeignColumn in interface ForeignKeytheForeignKeyColumn - the given foreign key column
M4Exception
public Column getForeignForPrimaryColumn(Column thePrimaryKeyColumn)
throws M4Exception
ForeignKey
getForeignForPrimaryColumn in interface ForeignKeythePrimaryKeyColumn - the given primary key column
M4Exception
public ForeignKey copy(Columnset newColumnSet)
throws M4Exception
copy in interface ForeignKeyM4Exceptionedu.udo.cs.miningmart.m4.ForeignKey#copy(ColumnSet)
public Columnset getPrimaryKeyColumnset()
throws M4Exception
getPrimaryKeyColumnset in interface ForeignKeygetPrimaryKeyColumnset in class KeyM4Exception
public void setPrimaryKeyColumnset(Columnset cs)
throws M4Exception
setPrimaryKeyColumnset in interface ForeignKeysetPrimaryKeyColumnset in class Keycs - The new columnset of the primary key of this Key
M4Exception
public void removePrimaryKeyColumnset()
throws M4Exception
removePrimaryKeyColumnset in interface ForeignKeyM4Exceptionpublic void primitiveSetPrimaryKeyColumnset(Columnset cs)
primitiveSetPrimaryKeyColumnset in class Key
public Columnset getForeignKeyColumnset()
throws M4Exception
getForeignKeyColumnset in interface ForeignKeygetForeignKeyColumnset in class KeyM4Exception
public void setForeignKeyColumnset(Columnset cs)
throws M4Exception
setForeignKeyColumnset in interface ForeignKeysetForeignKeyColumnset in class Keycs - The new columnset of the foreign key of this Key
M4Exception
public void removeForeignKeyColumnset()
throws M4Exception
removeForeignKeyColumnset in interface ForeignKeyM4Exceptionpublic void primitiveSetForeignKeyColumnset(Columnset cs)
primitiveSetForeignKeyColumnset in class Key
public void removeColumn(java.lang.String name)
throws M4Exception
Key
removeColumn in class KeyM4Exception
public void removeColumnLink(java.lang.String name)
throws M4Exception
ForeignKey
removeColumnLink in interface ForeignKeyM4Exception
public void removeAllColumnLinks()
throws M4Exception
ForeignKey
removeAllColumnLinks in interface ForeignKeyM4Exception
public Relation getRelation()
throws M4Exception
getRelation in interface ForeignKeyM4Exception
public void setRelation(Relation rel,
boolean isFrom)
throws M4Exception
setRelation in interface ForeignKeyrel - The Relation this Key is to be associated withisFrom - TRUE iff this key is the fromKey of that Relation,
FALSE if it is the toKey.
M4Exception
public java.util.Collection getAllColumnLinks()
throws M4Exception
ForeignKeyCollection of ForeignKeyLinks.
Each ForeignKeyLink links one Column of the foreign Columnset
to the corresponding Column of the primary Columnset.
getAllColumnLinks in interface ForeignKeyCollection of ForeignKeyLinks
M4Exception
public ForeignKeyLink getFirstColumnLink()
throws M4Exception
ForeignKey
getFirstColumnLink in interface ForeignKeyM4Exceptionpublic void setRelationPrimitive(Relation r)
public java.util.Collection getDependentObjects()
throws M4Exception
M4DataM4Data sub-classes that need to be serialized.
getDependentObjects in interface XmlInfogetDependentObjects in class KeyM4ExceptionM4Data.getDependentObjects()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||