Dresden OCL Toolkit

tudresden.ocl.sql.orstrategy
Class ClassSplitter

java.lang.Object
  extended bytudresden.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


Field Summary
private  List names
           
private  List parts
           
 
Constructor Summary
ClassSplitter(List names, List parts)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parts

private List parts

names

private List names
Constructor Detail

ClassSplitter

public ClassSplitter(List names,
                     List parts)
Parameters:
names - a List of String, containing the table names for the different parts
parts - a List of List of MAttribute, representing the different Tables the class shall be mapped to
Method Detail

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 map
classToTables - a Map containing all MClassifieres mapped so far to a List of Tables
classViews - a Map containing ObjectViews for all MCClassifiers

toString

public String toString()
describes 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.