Dresden OCL Toolkit

tudresden.ocl.sql
Class ORMappingSchemeImp

java.lang.Object
  extended bytudresden.ocl.sql.ORMappingSchemeImp
All Implemented Interfaces:
ORMappingScheme

public class ORMappingSchemeImp
extends Object
implements ORMappingScheme

An implementation of the ORMappingScheme interface. It uses an implementation of the ORMapping interface to query object relational mapping information and provides these information to the SQLCodegenerator with help of the appropriate structures.

Author:
Sten Loecher
See Also:
ORMappingScheme, SQLCodeGenerator, MappedClass, ORMapping

Field Summary
(package private)  Map classifiersToMappedClasses
          Maps classifiers to MappedClass objects.
(package private)  ORMapping theORM
           
 
Constructor Summary
ORMappingSchemeImp(ORMapping orm)
          Call this constructor to create an instance of ORMappingSchemeImp.
 
Method Summary
private  void createMappedClasses()
          Creates a MappedClass object for each classifier and fills it with the according tables that already contain the attribute information.
private  void createMappedClassLinks()
          Creates all necessary links between MappedClass objects.
 MappedClass getMappedClass(String name)
           
private  void insertQueryMethodes()
          Inserts information about query methodes contained by the classes in the class model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theORM

ORMapping theORM

classifiersToMappedClasses

Map classifiersToMappedClasses
Maps classifiers to MappedClass objects.

Constructor Detail

ORMappingSchemeImp

public ORMappingSchemeImp(ORMapping orm)
                   throws IllegalArgumentException
Call this constructor to create an instance of ORMappingSchemeImp.

Parameters:
orm - an implementation of the ORMapping interface
Throws:
IllegalArgumentException - if orm is null
Method Detail

getMappedClass

public MappedClass getMappedClass(String name)
Specified by:
getMappedClass in interface ORMappingScheme
Parameters:
name - the name of an application type
Returns:
a MappedObject containing all necessary information to generate SQL code

createMappedClasses

private void createMappedClasses()
Creates a MappedClass object for each classifier and fills it with the according tables that already contain the attribute information. As far as associations are mapped to foreign key references with the help of attributes, they are already contained within that tables too.


createMappedClassLinks

private void createMappedClassLinks()
Creates all necessary links between MappedClass objects. These links result from association ends and generalization relationships. Futhermore, the according guides will be inserted.


insertQueryMethodes

private void insertQueryMethodes()
Inserts information about query methodes contained by the classes in the class model.


Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.