use of org.jkiss.dbeaver.model.virtual.DBVEntityAttribute in project dbeaver by dbeaver.
the class TransformerSettingsDialog method detectTransformers.
private void detectTransformers() {
final DBPDataSource dataSource = viewer.getDataSource();
DBVEntityAttribute vAttr = vEntity.getVirtualAttribute(currentAttribute, false);
DBVTransformSettings settings = vAttr == null ? null : DBVUtils.getTransformSettings(vAttr, false);
if (dataSource != null && settings != null && !CommonUtils.isEmpty(settings.getCustomTransformer())) {
transformer = dataSource.getContainer().getPlatform().getValueHandlerRegistry().getTransformer(settings.getCustomTransformer());
} else {
transformer = null;
}
transformerList = DBWorkbench.getPlatform().getValueHandlerRegistry().findTransformers(currentAttribute.getDataSource(), currentAttribute, null);
}
use of org.jkiss.dbeaver.model.virtual.DBVEntityAttribute in project dbeaver by dbeaver.
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();
}
}
Aggregations