use of org.jkiss.dbeaver.ext.erd.command.AssociationCreateCommand in project dbeaver by serge-rider.
the class EntityNodeEditPolicy method getConnectionCreateCommand.
/**
* @see GraphicalNodeEditPolicy#getConnectionCreateCommand(CreateConnectionRequest)
*/
@Override
protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
AssociationCreateCommand cmd = new AssociationCreateCommand();
EntityPart part = (EntityPart) getHost();
cmd.setForeignEntity(part.getTable());
request.setStartCommand(cmd);
return cmd;
}
use of org.jkiss.dbeaver.ext.erd.command.AssociationCreateCommand in project dbeaver by serge-rider.
the class EntityNodeEditPolicy method getConnectionCompleteCommand.
/**
* @see GraphicalNodeEditPolicy#getConnectionCompleteCommand(CreateConnectionRequest)
*/
@Override
protected Command getConnectionCompleteCommand(CreateConnectionRequest request) {
AssociationCreateCommand cmd = (AssociationCreateCommand) request.getStartCommand();
EntityPart part = (EntityPart) request.getTargetEditPart();
cmd.setPrimaryEntity(part.getTable());
return cmd;
}
Aggregations