Java Reference
In-Depth Information
mapping UML::Class::persistentClass2table() : RDB::Table
when { self .isPersistent() }
{
name := self .name;
columns := self .class2columns( self )-> sortedBy (name);
primaryKey := self . map class2primaryKey();
foreignKeys := self .class2foreignKeys();
}
The class2columns() query combines the results of the
dataType2columns() and generalizations2columns() for the class
passed as a parameter, returning the union as an ordered set.
query UML::Class::class2columns(targetClass: UML::Class) :
OrderedSet (RDB::TableColumn) {
self .dataType2columns(targetClass)->
union( self .generalizations2columns(targetClass))
->asOrderedSet()
}
The dataType2columns() query combines the results of queries that create
columns from primitive, enumeration, relationship, and association attributes,
rejecting those that are undefined.
query UML::DataType::dataType2columns( in targetType : UML::DataType) :
OrderedSet (RDB::TableColumn) {
self .primitiveAttributes2columns(targetType)->
union( self .enumerationAttributes2columns(targetType))->
union( self .relationshipAttributes2columns(targetType))->
union( self .assosiationAttributes2columns(targetType))
-> reject (c|c. oclIsUndefined ())->asOrderedSet()
}
The generalizations2columns() query uses the class2columns()
query on the general class, rejects those undefined, and returns an ordered set.
query UML::Class::generalizations2columns(targetClass : UML::Class) :
OrderedSet (RDB::TableColumn) {
self .generalizations-> collect (g |
g.general.class2columns(targetClass))
-> reject (c|c. oclIsUndefined ())->asOrderedSet()
}
Search WWH ::




Custom Search