Search in sources :

Example 1 with CreateRelationshipCommand

use of com.cubrid.common.ui.er.commands.CreateRelationshipCommand in project cubrid-manager by CUBRID.

the class TableNodeEditPolicy method getConnectionCreateCommand.

/**
	 * @see GraphicalNodeEditPolicy#getConnectionCreateCommand(CreateConnectionRequest)
	 */
@Override
protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
    CreateRelationshipCommand cmd = new CreateRelationshipCommand();
    TablePart part = (TablePart) getHost();
    cmd.setForeignTable(part.getTable());
    request.setStartCommand(cmd);
    return cmd;
}
Also used : TablePart(com.cubrid.common.ui.er.part.TablePart) CreateRelationshipCommand(com.cubrid.common.ui.er.commands.CreateRelationshipCommand)

Example 2 with CreateRelationshipCommand

use of com.cubrid.common.ui.er.commands.CreateRelationshipCommand in project cubrid-manager by CUBRID.

the class TableNodeEditPolicy method getConnectionCompleteCommand.

/**
	 * @see GraphicalNodeEditPolicy#getConnectionCompleteCommand(CreateConnectionRequest)
	 */
@Override
protected Command getConnectionCompleteCommand(CreateConnectionRequest request) {
    CreateRelationshipCommand cmd = (CreateRelationshipCommand) request.getStartCommand();
    TablePart part = (TablePart) request.getTargetEditPart();
    cmd.setPrimaryTable(part.getTable());
    return cmd;
}
Also used : TablePart(com.cubrid.common.ui.er.part.TablePart) CreateRelationshipCommand(com.cubrid.common.ui.er.commands.CreateRelationshipCommand)

Aggregations

CreateRelationshipCommand (com.cubrid.common.ui.er.commands.CreateRelationshipCommand)2 TablePart (com.cubrid.common.ui.er.part.TablePart)2