tudresden.ocl.sql.orstrategy
Class KeyChooser
java.lang.Object
tudresden.ocl.sql.orstrategy.KeyChooser
- All Implemented Interfaces:
- KeyStrategy
- public class KeyChooser
- extends Object
- implements KeyStrategy
allows the user to choose one or more attributes as primary key
these primary key column are added to every Table the classifier
is directly mapped to
- Author:
- Andrea Kling
- See Also:
Table
Constructor Summary |
KeyChooser(List pk)
the primary Key may contain several attributes. |
Method Summary |
void |
map(ru.novosoft.uml.foundation.core.MClassifier classifier,
Map classToTables,
Map classViews)
Defines the primary key for all tables this classifier was
mapped to. |
String |
toString()
a short descrption of the strategy |
pk
private List pk
KeyChooser
public KeyChooser(List pk)
- the primary Key may contain several attributes. none of these
attributes should have another than a simple datatype as
for example defined in TypeManager
- Parameters:
pk
- a List of MAttribute of all attributes that are to be
used as primary key columns- See Also:
TypeManager
map
public void map(ru.novosoft.uml.foundation.core.MClassifier classifier,
Map classToTables,
Map classViews)
- Defines the primary key for all tables this classifier was
mapped to.
Structure of classToTables: MClassifier -> List of Table
the first Table listed gets the primary key other class tables
refer to
the primary key chosen will be used to identify rows in the
Classifiers ObjectView
- Specified by:
map
in interface KeyStrategy
- Parameters:
classifier
- the class, whose primary key shall be setclassToTables
- a List of Table for each class mapped.classViews
- contains an ObjectView for every MClassifier- See Also:
ObjectView
,
Table
toString
public String toString()
- a short descrption of the strategy
Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.