Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.udo.cs.miningmart.m4.core
Class PrimaryKey

    java.lang.Object
      edu.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.PrimaryKey

All Implemented Interfaces:
  Key, M4Data, M4Object, PrimaryKey, M4Table, XmlInfo, java.io.Serializable, java.lang.Comparable

    public class PrimaryKey

extends Key
implements PrimaryKey

This class realises the primary key functionality.

Version:
  $Id: PrimaryKey.java,v 1.5 2006/09/27 14:59:59 euler Exp $
Author:
  Timm Euler
See Also:
  Serialized Form

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
`PrimaryKey(DB m4Db)` Constructor for PrimaryKey.

Method Summary
`void` | `addColumn(Column column)`
`PrimaryKey` | `copy(Columnset newColumnSet)`
`java.util.Collection` | `getAllColumns()`
`protected Column` | `getColumn(KeyMember km)`
`Columnset` | `getColumnset()`
`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.
`Columnset` | `getForeignKeyColumnset()`
`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` | `getPrimaryKeyColumnset()`
`void` | `primitiveSetColumnset(Columnset cs)` Primitive setter.
`void` | `primitiveSetForeignKeyColumnset(Columnset fkCs)`
`void` | `primitiveSetPrimaryKeyColumnset(Columnset pkCs)`
`void` | `removeColumn(java.lang.String name)` Removing a Column from the Key, but not from the Columnset the Column belongs to.
`void` | `setColumnset(Columnset columnSet)`
`void` | `setForeignKeyColumnset(Columnset fkCs)`
`void` | `setPrimaryKeyColumnset(Columnset pkCs)`

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, getUniqueName, getValidName, 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, setNotNew`

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.PrimaryKey
`removeAllColumns`

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, setNotNew`

Methods inherited from interface edu.udo.cs.miningmart.m4.utils.XmlInfo
`doPrint, doPrint, exportLocal, genericGetter, genericSetter, getObjectTag, getXmlIdTag, getXmlVersion, importLocal`

Constructor Detail

### PrimaryKey

    public PrimaryKey(DB m4Db)

  Constructor for PrimaryKey.

  Parameters:
    `m4Db` - The DB object

Method Detail

### 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)`

### getColumn

    protected Column getColumn(KeyMember km)

  See Also:
    `edu.udo.cs.miningmart.m4.hci.Key#getColumn(KeyMember)`

### getColumnset

    public Columnset getColumnset()

  Specified by:
    `getColumnset` in interface `PrimaryKey`
  See Also:
    `miningmart.m4.Key#getColumnSet()`

### setColumnset

    public void setColumnset(Columnset columnSet)
                      throws M4Exception

  Specified by:
    `setColumnset` in interface `PrimaryKey`
  Throws:
    `M4Exception`
  See Also:
    `miningmart.m4.Key#setColumnSet(ColumnSet)`

### setPrimaryKeyColumnset

    public void setPrimaryKeyColumnset(Columnset pkCs)
                                throws M4Exception

  Specified by:
    `setPrimaryKeyColumnset` in interface `Key`
  Specified by:
    `setPrimaryKeyColumnset` in class `Key`
  Throws:
    `M4Exception`

### setForeignKeyColumnset

    public void setForeignKeyColumnset(Columnset fkCs)
                                throws M4Exception

  Specified by:
    `setForeignKeyColumnset` in interface `Key`
  Specified by:
    `setForeignKeyColumnset` in class `Key`
  Throws:
    `M4Exception`

### primitiveSetPrimaryKeyColumnset

    public void primitiveSetPrimaryKeyColumnset(Columnset pkCs)
                                         throws M4Exception

  Specified by:
    `primitiveSetPrimaryKeyColumnset` in class `Key`
  Throws:
    `M4Exception`

### primitiveSetForeignKeyColumnset

    public void primitiveSetForeignKeyColumnset(Columnset fkCs)
                                         throws M4Exception

  Specified by:
    `primitiveSetForeignKeyColumnset` in class `Key`
  Throws:
    `M4Exception`

### getPrimaryKeyColumnset

    public Columnset getPrimaryKeyColumnset()
                                     throws M4Exception

  Specified by:
    `getPrimaryKeyColumnset` in interface `Key`
  Specified by:
    `getPrimaryKeyColumnset` in class `Key`
  Throws:
    `M4Exception`

### getForeignKeyColumnset

    public Columnset getForeignKeyColumnset()
                                     throws M4Exception

  Specified by:
    `getForeignKeyColumnset` in interface `Key`
  Specified by:
    `getForeignKeyColumnset` in class `Key`
  Throws:
    `M4Exception`

### primitiveSetColumnset

    public void primitiveSetColumnset(Columnset cs)

  Primitive setter. Do not use!

  Parameters:
    `cs` - New Columnset

### removeColumn

    public void removeColumn(java.lang.String name)
                      throws M4Exception

  Description copied from class: `Key`
  Removing a Column from the Key, but not from the Columnset the Column belongs to. In the case of ForeignKey, a Column Link is removed.

  Specified by:
    `removeColumn` in interface `PrimaryKey`
  Specified by:
    `removeColumn` in class `Key`
  Throws:
    `M4Exception`
  See Also:
    `miningmart.m4.Key#removeColumn(String)`

### addColumn

    public void addColumn(Column column)
                   throws M4Exception

  Specified by:
    `addColumn` in interface `PrimaryKey`
  Throws:
    `M4Exception`
  See Also:
    `miningmart.m4.PrimaryKey#addColumn(Column)`

### getAllColumns

    public java.util.Collection getAllColumns()
                                       throws M4Exception

  Specified by:
    `getAllColumns` in interface `PrimaryKey`
  Throws:
    `M4Exception`

### copy

    public PrimaryKey copy(Columnset newColumnSet)
                    throws M4Exception

  Specified by:
    `copy` in interface `PrimaryKey`
  Throws:
    `M4Exception`
  See Also:
    `miningmart.m4.PrimaryKey#copy(ColumnSet)`

### getDependentObjects

    public java.util.Collection getDependentObjects()
                                             throws M4Exception

  Description copied from class: `M4Data`
  This method is part of the XML-serialization and needs to be implemented by all `M4Data` sub-classes that need to be serialized.

  Specified by:
    `getDependentObjects` in interface `XmlInfo`
  Overrides:
    `getDependentObjects` in class `Key`
  Returns:
    a `Collection` of all `M4Data` Java objects holding a foreign key reference to `this` object. This method must never return `null`.
  Throws:
    `M4Exception`
  See Also:
    `M4Data.getDependentObjects()`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005