Search in sources :

Example 1 with AssociationReconnectTargetCommand

use of org.jkiss.dbeaver.ext.erd.command.AssociationReconnectTargetCommand in project dbeaver by serge-rider.

the class EntityNodeEditPolicy method getReconnectTargetCommand.

/**
	 * @see GraphicalNodeEditPolicy#getReconnectTargetCommand(ReconnectRequest)
	 */
@Override
protected Command getReconnectTargetCommand(ReconnectRequest request) {
    AssociationReconnectTargetCommand cmd = new AssociationReconnectTargetCommand();
    cmd.setRelationship((ERDAssociation) request.getConnectionEditPart().getModel());
    EntityPart entityPart = (EntityPart) getHost();
    cmd.setTargetPrimaryKey(entityPart.getTable());
    return cmd;
}
Also used : AssociationReconnectTargetCommand(org.jkiss.dbeaver.ext.erd.command.AssociationReconnectTargetCommand) EntityPart(org.jkiss.dbeaver.ext.erd.part.EntityPart)

Aggregations

AssociationReconnectTargetCommand (org.jkiss.dbeaver.ext.erd.command.AssociationReconnectTargetCommand)1 EntityPart (org.jkiss.dbeaver.ext.erd.part.EntityPart)1