A Data Mediator Service (DMS) is the Service Data Object (SDO) component that connects to the back end database. It is created with back end specific metadata. The metadata defines the structure of the DataGraph that is produced by the DMS as well as the query to be used against the back end.
Metadata is composed of the following components:
Key pk = MetadataFactory.eINSTANCE.createKey(); pk.getColumns().add(xColumn); pk.getColumns().add(yColumn); coordinateTable.setPrimaryKey(pk);If a table is related to this one and is the child table, it uses the same method to create the foreign key to point to this coordinate table.
Key fk = MetadataFactory.eINSTANCE.createKey(); fk.getColumns().add(xColumn); fk.getColumns().add(yColumn); coordinateTable.getForeignKeys().add(fk);If a table is related to this one and is the child table, it uses the same method to create the foreign key to point to this coordinate table.