use of org.jkiss.dbeaver.model.data.DBDAttributeBindingCustom in project dbeaver by serge-rider.
the class VirtualAttributeEditAction method run.
@Override
public void run() {
if (attr == null) {
return;
}
DBVEntityAttribute vAttr = ((DBDAttributeBindingCustom) attr).getEntityAttribute();
DBVEntity vEntity = resultSetViewer.getModel().getVirtualEntity(false);
if (new EditVirtualAttributePage(resultSetViewer, vAttr).edit(resultSetViewer.getControl().getShell())) {
vEntity.persistConfiguration();
resultSetViewer.refreshMetaData();
}
}
use of org.jkiss.dbeaver.model.data.DBDAttributeBindingCustom in project dbeaver by serge-rider.
the class VirtualAttributeDeleteAction method run.
@Override
public void run() {
if (!(attr instanceof DBDAttributeBindingCustom)) {
return;
}
DBVEntityAttribute vAttr = ((DBDAttributeBindingCustom) attr).getEntityAttribute();
if (!UIUtils.confirmAction(resultSetViewer.getControl().getShell(), "Delete column '" + vAttr.getName() + "'", "Are you sure you want to delete virtual column '" + vAttr.getName() + "'?")) {
return;
}
DBVEntity vEntity = resultSetViewer.getModel().getVirtualEntity(false);
vEntity.removeVirtualAttribute(vAttr);
vEntity.persistConfiguration();
resultSetViewer.refreshMetaData();
}
Aggregations