|
||||||||||
| 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.GraphicalM4Object
edu.udo.cs.miningmart.m4.core.ParameterObject
edu.udo.cs.miningmart.m4.core.Relation
This class represents an M4 Relation object. It bundles the pointers to the ToConcept and FromConcept as well as the FromKey and ToKey.
Concept,
Key,
Serialized Form| Field Summary | |
static java.lang.String |
ATTRIB_COLUMNSET
|
static java.lang.String |
ATTRIB_FROM_CONCEPT
|
static java.lang.String |
ATTRIB_FROM_KEY
|
static java.lang.String |
ATTRIB_REL_ID
|
static java.lang.String |
ATTRIB_REL_NAME
|
static java.lang.String |
ATTRIB_TO_CONCEPT
|
static java.lang.String |
ATTRIB_TO_KEY
|
static java.lang.String |
M4_TABLE_NAME
|
static M4Info |
m4Info
Cache for getM4Info() |
| Fields inherited from class edu.udo.cs.miningmart.m4.core.GraphicalM4Object |
graph2coord |
| 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 | |
Relation(DB m4Db)
Constructor for Relation. |
|
| Method Summary | |
void |
addSubRelationship(Relation relationship)
|
Relation |
copy(Concept fromConcept,
Concept toConcept)
|
Columnset |
createCrossLinkColumnset(java.lang.String name,
java.lang.String schema,
java.lang.String type)
Creates a ColumnSet that will be connected to this Relation. |
void |
deleteSoon()
Overwrites the superclass method because the cross link columnset must be deleted, too, if it is used only for this relation. |
java.util.Collection |
getAllSubRelationships()
|
Columnset |
getCrossLinkColumnSet()
|
ForeignKey |
getFromKey()
Getter method. |
java.lang.String |
getIdAttributeName()
|
M4Info |
getM4Info()
|
java.lang.String |
getM4TableName()
|
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. |
Columnset |
getResultOfJoin()
This method creates a Columnset that represents the inner join resulting from joining the FromConcept and the ToConcept. |
java.util.Collection |
getStepsWhereThisIsInputRelation()
Returns all Steps in the Case that use this Relation as an input. |
Relation |
getSubRelation(java.lang.String name)
|
java.util.Collection |
getSubRelations()
|
Relation |
getSuperRelation()
|
Concept |
getTheFromConcept()
Getter method. |
Concept |
getTheToConcept()
Getter method. |
ForeignKey |
getToKey()
Getter method. |
M4Info |
getXmlInfo()
|
protected boolean |
hasCoordinates()
Relations have coordinates. |
boolean |
isManyToManyRelation()
Returns true iff this Relation models an n:m relationship. |
boolean |
isOneToManyRelation()
Returns true iff this Relation models a 1:n relationship. |
boolean |
isRelationallyValid()
A Relationship is relationally valid, if the fromConcept, the toConcept and the fromKey exist. |
void |
primitiveSetColumnset(Columnset cs)
Primitive setter method. |
void |
primitiveSetFromConcept(Concept c)
Primitive setter, do not use. |
void |
primitiveSetFromKey(ForeignKey fk)
Primitive setter. |
void |
primitiveSetToConcept(Concept c)
Primitive setter, do not use. |
void |
primitiveSetToKey(ForeignKey fk)
Primitive setter. |
void |
print()
Method to print data about this M4Object. |
protected void |
removeAllM4References()
This method needs to be implemented by all M4Data
objects. |
void |
removeAllSubRelationships()
|
void |
removeCrossLinkColumnset()
Removes the ColumnSet for this Relation. |
void |
removeFromKey()
|
void |
removeSubRelationship(java.lang.String name)
|
void |
removeSuperRelation()
Remove the link to the superRelationship. |
void |
removeToKey()
|
void |
setCrossLinkColumnSet(Columnset cs)
Setter method. |
void |
setFromKey(ForeignKey newFromKey)
Setter method. |
void |
setM2mKeys(ForeignKey fromFK,
ForeignKey toFK)
This method is used for n:m relationships. |
void |
setSuperRelation(Relation superRelationship)
|
void |
setTheFromConcept(Concept c)
Setter method. |
void |
setTheToConcept(Concept c)
Setter method. |
void |
setToKey(ForeignKey newToKey)
Setter method. |
| Methods inherited from class edu.udo.cs.miningmart.m4.core.ParameterObject |
addParameterReference, getDependentObjects, getParameterReferences, removeParameterReference |
| Methods inherited from class edu.udo.cs.miningmart.m4.core.GraphicalM4Object |
deleteLocal, getCoordinates, getPoint, primitiveSetCoordinates, setCoordinatesDirty, setName, setPoint, storeLocal |
| Methods inherited from class edu.udo.cs.miningmart.m4.core.M4Data |
exportLocal, genericGetter, genericSetter, getDocumentation, getObjectsReferencingMe, getObjectsReferencingMe, getObjectTag, getValidName, getXmlIdTag, getXmlVersion, hasDeleteStatus, importLocal, isDirty, isWaitingForDelete, primitiveGetDocObject, primitiveSetDocObject, readFromDb, readFromDbLocal, removeDocObject, removeFromDb, removeSetFromDb, setDirty, setDocumentation, setId, 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.utils.XmlInfo |
doPrint, doPrint, exportLocal, genericGetter, genericSetter, getDependentObjects, getObjectTag, getXmlIdTag, getXmlVersion, importLocal |
| Methods inherited from interface edu.udo.cs.miningmart.m4.ParameterObject |
addParameterReference, getParameterReferences, removeParameterReference |
| Methods inherited from interface edu.udo.cs.miningmart.m4.GraphicalM4Object |
getPoint, setPoint |
| Methods inherited from interface edu.udo.cs.miningmart.m4.M4Data |
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, putM4ObjectToCache, replaceSpacesInName, setId, setName |
| Field Detail |
public static final java.lang.String M4_TABLE_NAME
public static final java.lang.String ATTRIB_REL_ID
public static final java.lang.String ATTRIB_REL_NAME
public static final java.lang.String ATTRIB_FROM_CONCEPT
public static final java.lang.String ATTRIB_TO_CONCEPT
public static final java.lang.String ATTRIB_FROM_KEY
public static final java.lang.String ATTRIB_TO_KEY
public static final java.lang.String ATTRIB_COLUMNSET
public static M4Info m4Info
| Constructor Detail |
public Relation(DB m4Db)
m4Db - edu.udo.cs.miningmart.m4.core.M4Data#Constructor| Method Detail |
public java.lang.String getM4TableName()
getM4TableName in interface M4TableM4Table.getM4TableName()public java.lang.String getIdAttributeName()
getIdAttributeName in interface M4TableM4Table.getIdAttributeName()public M4Info getM4Info()
getM4Info in interface M4TableM4Table.getM4Info()public M4Info getXmlInfo()
getXmlInfo in interface XmlInfoM4Info object with the information
of all XML fields of this object.XmlInfo.getXmlInfo()public void print()
M4Object
print in interface M4Objectprint in class GraphicalM4ObjectParameter.print()
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)
public void setTheToConcept(Concept c)
throws M4Exception
setTheToConcept in interface Relationc - the new value
M4Exceptionpublic Concept getTheToConcept()
getTheToConcept in interface Relation
public void setTheFromConcept(Concept c)
throws M4Exception
setTheFromConcept in interface Relationc - the new value
M4Exceptionpublic Concept getTheFromConcept()
getTheFromConcept in interface Relation
public void setToKey(ForeignKey newToKey)
throws M4Exception
setToKey in interface RelationnewToKey - the new toKey
M4Exceptionpublic void primitiveSetToKey(ForeignKey fk)
public ForeignKey getToKey()
getToKey in interface Relation
public void setFromKey(ForeignKey newFromKey)
throws M4Exception
setFromKey in interface RelationnewFromKey - the new FromKey
M4Exceptionpublic void primitiveSetFromKey(ForeignKey fk)
public ForeignKey getFromKey()
getFromKey in interface Relationpublic Columnset getCrossLinkColumnSet()
getCrossLinkColumnSet in interface Relation
public void setCrossLinkColumnSet(Columnset cs)
throws M4Exception
setCrossLinkColumnSet in interface Relationcs - The new cross columnset for the n:m relation.
M4Exception
public void removeCrossLinkColumnset()
throws M4Exception
Relation
removeCrossLinkColumnset in interface RelationM4Exceptionminingmart.m4.Relationship#removeColumnSet()
public Columnset createCrossLinkColumnset(java.lang.String name,
java.lang.String schema,
java.lang.String type)
throws M4Exception
Relation
createCrossLinkColumnset in interface Relationname - The name for the new ColumnSet.
M4Exception - when an error occurs during creation of the object.miningmart.m4.Relationship#createColumnSet(String, String, String)public boolean isOneToManyRelation()
Relation
isOneToManyRelation in interface Relationpublic boolean isManyToManyRelation()
Relation
isManyToManyRelation in interface Relation
public Columnset getResultOfJoin()
throws M4Exception
Relation
getResultOfJoin in interface RelationM4ExceptionRelation.getResultOfJoin()
public void setM2mKeys(ForeignKey fromFK,
ForeignKey toFK)
throws M4Exception
setM2mKeys in interface RelationfromFK - The foreignKey corresponding to the FromConcept.toFK - The foreignKey corresponding to the ToConcept.
M4ExceptionRelation.setM2mKeys(ForeignKey, ForeignKey)public void primitiveSetColumnset(Columnset cs)
public void primitiveSetFromConcept(Concept c)
c - the Concept to be setpublic void primitiveSetToConcept(Concept c)
c - the Concept to be set
protected void removeAllM4References()
throws M4Exception
M4DataM4Data
objects. It has to remove all references to other
M4Objects.
removeAllM4References in class ParameterObjectM4ExceptionM4Data.removeAllM4References()
public void deleteSoon()
throws M4Exception
deleteSoon in interface M4DatadeleteSoon in class GraphicalM4ObjectM4Exceptionprotected boolean hasCoordinates()
Relations have coordinates.
hasCoordinates in class GraphicalM4Objectpublic boolean isRelationallyValid()
isRelationallyValid in interface Relationminingmart.m4.Relationship#isRelationallyValid()
public Relation copy(Concept fromConcept,
Concept toConcept)
throws M4Exception
copy in interface RelationM4ExceptionRelation.copy(Concept, Concept)
public java.util.Collection getStepsWhereThisIsInputRelation()
throws M4Exception
getStepsWhereThisIsInputRelation in interface RelationM4Exception
public void removeFromKey()
throws M4Exception
removeFromKey in interface RelationM4ExceptionRelation.removeFromKey()
public void removeToKey()
throws M4Exception
removeToKey in interface RelationM4ExceptionRelation.removeToKey()public java.util.Collection getSubRelations()
getSubRelations in interface Relationpublic Relation getSuperRelation()
getSuperRelation in interface Relation
public void setSuperRelation(Relation superRelationship)
throws M4Exception
setSuperRelation in interface RelationM4Exception
public void removeSuperRelation()
throws M4Exception
removeSuperRelation in interface RelationM4Exception
public void addSubRelationship(Relation relationship)
throws M4Exception
addSubRelationship in interface RelationM4Exceptionpublic Relation getSubRelation(java.lang.String name)
getSubRelation in interface Relationpublic java.util.Collection getAllSubRelationships()
getAllSubRelationships in interface Relation
public void removeSubRelationship(java.lang.String name)
throws M4Exception
removeSubRelationship in interface RelationM4Exception
public void removeAllSubRelationships()
throws M4Exception
removeAllSubRelationships in interface RelationM4Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||