tudresden.ocl.sql.orstrategy
Class ClassTypeMapping
java.lang.Object
tudresden.ocl.sql.orstrategy.ClassTypeMapping
- All Implemented Interfaces:
- DatatypeStrategy
- public class ClassTypeMapping
- extends Object
- implements DatatypeStrategy
an 'object-relational mapping strategy' for attributes containing
modeled classes as type
Constructor Summary |
ClassTypeMapping(ru.novosoft.uml.foundation.core.MClassifier type)
|
Method Summary |
private void |
fillObjectViews(ru.novosoft.uml.foundation.core.MClassifier owner)
adds references to ObjectViews of subclasses of the attribute's class |
void |
map(ru.novosoft.uml.foundation.core.MAttribute attribute,
Map classToTables,
Map classViews)
Adds the primary key of the type's main table as foreign key
to the table containing the attribute and to the ObjectView of
the attribute's class. |
String |
toString()
|
type
private ru.novosoft.uml.foundation.core.MClassifier type
objectViews
private Vector objectViews
attributeName
private String attributeName
ownerTable
private Table ownerTable
classViews
private Map classViews
ClassTypeMapping
public ClassTypeMapping(ru.novosoft.uml.foundation.core.MClassifier type)
- Parameters:
type
- the MClassifier representing an Attributes type
map
public void map(ru.novosoft.uml.foundation.core.MAttribute attribute,
Map classToTables,
Map classViews)
- Adds the primary key of the type's main table as foreign key
to the table containing the attribute and to the ObjectView of
the attribute's class. If other classes inherit attribute the
reference is added to their ObjectViews, too.
The main table is the first Table contained in a classifiers list of table
in classToTables.
- Specified by:
map
in interface DatatypeStrategy
- Parameters:
attribute
- the attribute having a modeled classifier as typeclassToTables
- a Map of MClassifier -> (List of Table)classViews
- a Map of MClassifier -> ObjectView- See Also:
Table
fillObjectViews
private void fillObjectViews(ru.novosoft.uml.foundation.core.MClassifier owner)
- adds references to ObjectViews of subclasses of the attribute's class
toString
public String toString()
- Returns:
- the classifier that is the attribute's type
Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.