tudresden.ocl.sql.orstrategy
Class ClassSplitter
java.lang.Object
tudresden.ocl.sql.orstrategy.ClassSplitter
- All Implemented Interfaces:
- ClassStrategy
- public class ClassSplitter
- extends Object
- implements ClassStrategy
An object-relational mapping strategy to Map a modeled class to a number of Tables each table
containing some of the class's attributes
Method Summary |
void |
map(ru.novosoft.uml.foundation.core.MClassifier classifier,
Map classToTables,
Map classViews)
maps the given class to more than one relational table
Structure of classToTables: MClassifier -> List of Table
the first table in a class's list is the most important one,
the one containing the primary key, other class tables will
refer to
Although the class will be split into a number of Tables the
ObjectView will always contain all class attributes |
String |
toString()
describes the strategy |
parts
private List parts
names
private List names
ClassSplitter
public ClassSplitter(List names,
List parts)
- Parameters:
names
- a List of String, containing the table names for the different partsparts
- a List of List of MAttribute, representing the different
Tables the class shall be mapped to
map
public void map(ru.novosoft.uml.foundation.core.MClassifier classifier,
Map classToTables,
Map classViews)
- maps the given class to more than one relational table
Structure of classToTables: MClassifier -> List of Table
the first table in a class's list is the most important one,
the one containing the primary key, other class tables will
refer to
Although the class will be split into a number of Tables the
ObjectView will always contain all class attributes
- Specified by:
map
in interface ClassStrategy
- Parameters:
classifier
- the class to mapclassToTables
- a Map containing all MClassifieres mapped so far to a List of TablesclassViews
- a Map containing ObjectViews for all MCClassifiers
toString
public String toString()
- describes the strategy
Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.