Search in sources :

Example 1 with AssociationDeleteCommand

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

the class AssociationEditPolicy method createDeleteCommand.

@Override
protected Command createDeleteCommand(GroupRequest request) {
    ERDAssociation relationship = (ERDAssociation) getHost().getModel();
    ERDEntity primaryKeyTarget = relationship.getPrimaryKeyEntity();
    ERDEntity foreignKeySource = relationship.getForeignKeyEntity();
    AssociationDeleteCommand deleteCmd = new AssociationDeleteCommand(foreignKeySource, primaryKeyTarget, relationship);
    return deleteCmd;
}
Also used : AssociationDeleteCommand(org.jkiss.dbeaver.ext.erd.command.AssociationDeleteCommand) ERDEntity(org.jkiss.dbeaver.ext.erd.model.ERDEntity) ERDAssociation(org.jkiss.dbeaver.ext.erd.model.ERDAssociation)

Aggregations

AssociationDeleteCommand (org.jkiss.dbeaver.ext.erd.command.AssociationDeleteCommand)1 ERDAssociation (org.jkiss.dbeaver.ext.erd.model.ERDAssociation)1 ERDEntity (org.jkiss.dbeaver.ext.erd.model.ERDEntity)1