Dresden OCL Toolkit

tudresden.ocl.sql.orstrategy
Class CollectionMapper

java.lang.Object
  extended bytudresden.ocl.sql.orstrategy.CollectionMapper
All Implemented Interfaces:
DatatypeStrategy

public class CollectionMapper
extends Object
implements DatatypeStrategy

a DatatypeStrategy for mapping unknown datatypes representing any kind of ordered or unordered collection to it's own table in the database schema

Author:
Andrea Kling

Field Summary
private  List attributeNames
           
private  Map classViews
           
private  List dataTypes
           
 
Constructor Summary
CollectionMapper(List attributeNames, List dataTypes)
           
 
Method Summary
 void map(ru.novosoft.uml.foundation.core.MAttribute attribute, Map classToTables, Map classViews)
          Maps attribute to its own collection table.
private  void removeFromOV(ru.novosoft.uml.foundation.core.MClassifier owner, String attribute)
          removes the attribute from ObjectViews
 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

dataTypes

private List dataTypes

attributeNames

private List attributeNames

classViews

private Map classViews
Constructor Detail

CollectionMapper

public CollectionMapper(List attributeNames,
                        List dataTypes)
Parameters:
attributeNames - a List of String containing column names for the collection table
dataTypes - a List of String containing the column datatypes corresponding attributeNames
Method Detail

map

public void map(ru.novosoft.uml.foundation.core.MAttribute attribute,
                Map classToTables,
                Map classViews)
Maps attribute to its own collection table. the attribute is removed from the ObjectView of it's classifier and of all ObjectViews of this classifiers subclasses

Specified by:
map in interface DatatypeStrategy
Parameters:
attribute - an Attribute having an collection datatype
classToTables - a Map containing for every MClassifier a List of Table
classViews - contains an ObjectView for every MClassifier
See Also:
ObjectView

removeFromOV

private void removeFromOV(ru.novosoft.uml.foundation.core.MClassifier owner,
                          String attribute)
removes the attribute from ObjectViews


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.