tudresden.ocl.sql.orstrategy
Class OIDKeyMapping
java.lang.Object
tudresden.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
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 |
myInstance
private static OIDKeyMapping myInstance
OIDKeyMapping
private OIDKeyMapping()
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 tablesclassToTables
- a List of Table for every MClassifierclassViews
- contains an ObjectView for every MClassifier- See Also:
Table
,
ObjectView
toString
public String toString()
- a short description of the strategy
Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.