Dresden OCL Toolkit

tudresden.ocl.sql.orstrategy
Class OIDKeyMapping

java.lang.Object
  extended bytudresden.ocl.sql.orstrategy.OIDKeyMapping
All Implemented Interfaces:
KeyStrategy

public class OIDKeyMapping
extends Object
implements KeyStrategy

Inserts an additional object identity column (oid) as primary key into the tables a class was mapped to

Author:
Andrea Kling

Field Summary
private static OIDKeyMapping myInstance
           
 
Constructor Summary
private OIDKeyMapping()
           
 
Method Summary
static OIDKeyMapping getInstance()
           
 void map(ru.novosoft.uml.foundation.core.MClassifier classifier, Map classToTables, Map classViews)
          Assumes that MClassifier classifier has been mappped to tables, but has no primary key yet.
 String toString()
          a short description of the strategy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myInstance

private static OIDKeyMapping myInstance
Constructor Detail

OIDKeyMapping

private OIDKeyMapping()
Method Detail

getInstance

public static OIDKeyMapping getInstance()

map

public void map(ru.novosoft.uml.foundation.core.MClassifier classifier,
                Map classToTables,
                Map classViews)
Assumes that MClassifier classifier has been mappped to tables, but has no primary key yet. An oid column is added to the classifiers main table (first table in classtoTable list). All other tables of classifier get a foreign key reference to that primary key. If a primary key is found in a table, no key will be set for this table.

Specified by:
map in interface KeyStrategy
Parameters:
classifier - the class that need a primary key for its tables
classToTables - a List of Table for every MClassifier
classViews - contains an ObjectView for every MClassifier
See Also:
Table, ObjectView

toString

public String toString()
a short description of the strategy


Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.