use of org.jkiss.dbeaver.ext.oracle.model.OracleTableConstraintColumn in project dbeaver by serge-rider.
the class OracleConstraintConfigurator method configureObject.
@Override
public OracleTableConstraint configureObject(DBRProgressMonitor monitor, Object parent, OracleTableConstraint constraint) {
return UITask.run(() -> {
EditConstraintPage editPage = new EditConstraintPage(OracleUIMessages.edit_oracle_constraint_manager_dialog_title, constraint, new DBSEntityConstraintType[] { DBSEntityConstraintType.PRIMARY_KEY, DBSEntityConstraintType.UNIQUE_KEY, DBSEntityConstraintType.CHECK });
if (!editPage.edit()) {
return null;
}
constraint.setName(editPage.getConstraintName());
constraint.setConstraintType(editPage.getConstraintType());
constraint.setSearchCondition(editPage.getConstraintExpression());
int colIndex = 1;
for (DBSEntityAttribute tableColumn : editPage.getSelectedAttributes()) {
constraint.addColumn(new OracleTableConstraintColumn(constraint, (OracleTableColumn) tableColumn, colIndex++));
}
return constraint;
});
}
Aggregations