Search in sources :

Example 1 with UpdateConstraint

use of org.obeonetwork.dsl.database.dbevolution.UpdateConstraint in project InformationSystem by ObeoNetwork.

the class ConstraintChangeBuilder method createUpdateConstraint.

protected UpdateConstraint createUpdateConstraint(Match change) {
    UpdateConstraint updateConstraint = DbevolutionFactory.eINSTANCE.createUpdateConstraint();
    Constraint constraint = (Constraint) change.getRight();
    updateConstraint.setConstraint(constraint);
    Object leftElement = change.getLeft();
    updateConstraint.setNewConstraint((Constraint) leftElement);
    fillDBDiff(updateConstraint, change);
    return updateConstraint;
}
Also used : UpdateConstraint(org.obeonetwork.dsl.database.dbevolution.UpdateConstraint) Constraint(org.obeonetwork.dsl.database.Constraint) AddConstraint(org.obeonetwork.dsl.database.dbevolution.AddConstraint) UpdateConstraint(org.obeonetwork.dsl.database.dbevolution.UpdateConstraint) RemoveConstraint(org.obeonetwork.dsl.database.dbevolution.RemoveConstraint)

Example 2 with UpdateConstraint

use of org.obeonetwork.dsl.database.dbevolution.UpdateConstraint in project InformationSystem by ObeoNetwork.

the class UpdateConstraintItemProvider method getText.

/**
 * This returns the label text for the adapted class.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
@Override
public String getText(Object object) {
    UpdateConstraint updateConstraint = (UpdateConstraint) object;
    Constraint constraint = updateConstraint.getConstraint();
    return getString("_UI_UpdateConstraint_type") + " " + constraint.getName();
}
Also used : UpdateConstraint(org.obeonetwork.dsl.database.dbevolution.UpdateConstraint) Constraint(org.obeonetwork.dsl.database.Constraint) UpdateConstraint(org.obeonetwork.dsl.database.dbevolution.UpdateConstraint)

Aggregations

Constraint (org.obeonetwork.dsl.database.Constraint)2 UpdateConstraint (org.obeonetwork.dsl.database.dbevolution.UpdateConstraint)2 AddConstraint (org.obeonetwork.dsl.database.dbevolution.AddConstraint)1 RemoveConstraint (org.obeonetwork.dsl.database.dbevolution.RemoveConstraint)1