edu.udo.cs.miningmart.m4.core
Class KeyMember

java.lang.Object
  extended byedu.udo.cs.miningmart.m4.core.M4Object
      extended byedu.udo.cs.miningmart.m4.core.M4Data
          extended byedu.udo.cs.miningmart.m4.core.KeyMember
All Implemented Interfaces:
java.lang.Comparable, ForeignKeyLink, M4Object, M4Table, java.io.Serializable, XmlInfo

public class KeyMember
extends M4Data
implements XmlInfo, ForeignKeyLink

Each instance of this class represents an entry in the table KEYMEMBER_T. Several instances of this class may belong to the same Key.

Version:
$Id: KeyMember.java,v 1.4 2006/04/11 14:10:14 euler Exp $
Author:
Timm Euler
See Also:
Key, Serialized Form

Field Summary
static java.lang.String ATTRIB_MEM_FK_COLUMN
           
static java.lang.String ATTRIB_MEM_HEAD_ID
           
static java.lang.String ATTRIB_MEM_ID
           
static java.lang.String ATTRIB_MEM_PK_COLUMN
           
static java.lang.String ATTRIB_MEM_POSITION
           
static java.lang.String M4_TABLE_NAME
           
static M4Info m4Info
          Cache for getM4Info()
 
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
KeyMember(DB m4Db)
          Constructor for KeyMember.
 
Method Summary
 Column getForeignKeyColumn()
          Returns the ForeignKey Column.
 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.
 Column getPrimaryKeyColumn()
          Returns the Primary Key Column.
 Key getTheKey()
          Returns the Key this Keymember belongs to
 int getThePosition()
          Returns this keymember's position in the keyhead.
 M4Info getXmlInfo()
           
 void primitiveSetForeignKeyColumn(Column column)
          Primitive setter, do not use it!
 void primitiveSetKey(Key k)
          Primitive setter, do not use.
 void primitiveSetPrimaryKeyColumn(Column column)
          Primitive setter, do not use it!
 void print()
          Used to print information about this object.
protected  void removeAllM4References()
          This method needs to be implemented by all M4Data objects.
 void setForeignKeyColumn(Column foreignKeyColumn)
          Sets the foreign Key Column.
 void setPrimaryKeyColumn(Column primaryKeyColumn)
          Sets the primary Key Column.
 void setTheKey(Key newKey)
          Sets the Keyhead for this keymember
 void setThePosition(int newPosition)
          Sets the position.
 
Methods inherited from class edu.udo.cs.miningmart.m4.core.M4Data
deleteLocal, deleteSoon, exportLocal, genericGetter, genericSetter, getDependentObjects, 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.utils.XmlInfo
doPrint, doPrint, exportLocal, genericGetter, genericSetter, getDependentObjects, getObjectTag, getXmlIdTag, getXmlVersion, importLocal
 

Field Detail

M4_TABLE_NAME

public static final java.lang.String M4_TABLE_NAME
See Also:
Constant Field Values

ATTRIB_MEM_ID

public static final java.lang.String ATTRIB_MEM_ID
See Also:
Constant Field Values

ATTRIB_MEM_HEAD_ID

public static final java.lang.String ATTRIB_MEM_HEAD_ID
See Also:
Constant Field Values

ATTRIB_MEM_POSITION

public static final java.lang.String ATTRIB_MEM_POSITION
See Also:
Constant Field Values

ATTRIB_MEM_PK_COLUMN

public static final java.lang.String ATTRIB_MEM_PK_COLUMN
See Also:
Constant Field Values

ATTRIB_MEM_FK_COLUMN

public static final java.lang.String ATTRIB_MEM_FK_COLUMN
See Also:
Constant Field Values

m4Info

public static M4Info m4Info
Cache for getM4Info()

Constructor Detail

KeyMember

public KeyMember(DB m4Db)
Constructor for KeyMember.

Parameters:
m4Db - The DB object
Method Detail

getM4TableName

public java.lang.String getM4TableName()
Specified by:
getM4TableName in interface M4Table
See Also:
M4Table.getM4TableName()

getIdAttributeName

public java.lang.String getIdAttributeName()
Specified by:
getIdAttributeName in interface M4Table
See Also:
M4Table.getIdAttributeName()

getM4Info

public M4Info getM4Info()
Specified by:
getM4Info in interface M4Table
See Also:
M4Table.getM4Info()

getXmlInfo

public M4Info getXmlInfo()
Specified by:
getXmlInfo in interface XmlInfo
Returns:
a M4Info object with the information of all XML fields of this object.
See Also:
XmlInfo.getXmlInfo()

print

public void print()
Used to print information about this object.

Specified by:
print in interface M4Object
Specified by:
print in class M4Object
See Also:
M4Object.print()

getObjectsInNamespace

protected java.util.Collection getObjectsInNamespace(java.lang.Class typeOfObjects)
                                              throws M4Exception
Description copied from class: M4Data
This method returns the objects of the specified type that form a namespace in the scope of this M4Data object. For example, a Concept's namespace for the type BaseAttribute is the Collection of all BaseAttributes for this Concept. Many M4Data objects never have a namespace, they return null. If a namespace could exist but doesn't, an empty Collection is returned.

Specified by:
getObjectsInNamespace in class M4Data
Parameters:
typeOfObjects - the type of objects that form the namespace
Returns:
a Collection of objects of type typeOfObjects, or null.
Throws:
M4Exception
See Also:
M4Data.getObjectsInNamespace(Class)

getForeignKeyColumn

public Column getForeignKeyColumn()
Returns the ForeignKey Column.

Specified by:
getForeignKeyColumn in interface ForeignKeyLink
Returns:
The foreign key column of this key member

getTheKey

public Key getTheKey()
Returns the Key this Keymember belongs to

Returns:
the Keyhead

getThePosition

public int getThePosition()
Returns this keymember's position in the keyhead.

Returns:
the position

getPrimaryKeyColumn

public Column getPrimaryKeyColumn()
Returns the Primary Key Column.

Specified by:
getPrimaryKeyColumn in interface ForeignKeyLink
Returns:
The primary key column of this keymember

setForeignKeyColumn

public void setForeignKeyColumn(Column foreignKeyColumn)
                         throws M4Exception
Sets the foreign Key Column.

Specified by:
setForeignKeyColumn in interface ForeignKeyLink
Parameters:
foreignKeyColumn - The foreign Key Column to set
Throws:
M4Exception

primitiveSetForeignKeyColumn

public void primitiveSetForeignKeyColumn(Column column)
Primitive setter, do not use it!


setTheKey

public void setTheKey(Key newKey)
               throws M4Exception
Sets the Keyhead for this keymember

Parameters:
newKey - The keyhead
Throws:
M4Exception

setThePosition

public void setThePosition(int newPosition)
Sets the position.

Parameters:
newPosition - The position to set

setPrimaryKeyColumn

public void setPrimaryKeyColumn(Column primaryKeyColumn)
                         throws M4Exception
Sets the primary Key Column.

Specified by:
setPrimaryKeyColumn in interface ForeignKeyLink
Parameters:
primaryKeyColumn - The primary Key Column to set
Throws:
M4Exception

primitiveSetPrimaryKeyColumn

public void primitiveSetPrimaryKeyColumn(Column column)
Primitive setter, do not use it!


primitiveSetKey

public void primitiveSetKey(Key k)
Primitive setter, do not use.

Parameters:
k - the Key to be set

removeAllM4References

protected void removeAllM4References()
                              throws M4Exception
Description copied from class: M4Data
This method needs to be implemented by all M4Data objects. It has to remove all references to other M4Objects.

Specified by:
removeAllM4References in class M4Data
Throws:
M4Exception
See Also:
M4Data.removeAllM4References()


Copyright © 2001-2005