// Path: src/main/java/liquibase/ext/ora/check/CheckAttribute.java
// public abstract class CheckAttribute extends AbstractChange {
// 
//     private String tableName;
//     private String tablespace;
//     private String schemaName;
//     private String constraintName;
//     private String condition;
//     private Boolean disable;
//     private Boolean deferrable;
//     private Boolean initiallyDeferred;
//     private Boolean rely;
//     private Boolean validate;
// 
//     public void setTableName(String tableName) {
//         this.tableName = tableName;
//     }
// 
//     public String getTableName() {
//         return tableName;
//     }
// 
//     public void setTablespace(String tablespace) {
//         this.tablespace = tablespace;
//     }
// 
//     public String getTablespace() {
//         return tablespace;
//     }
// 
//     public String getSchemaName() {
//         return schemaName;
//     }
// 
//     public void setSchemaName(String schemaName) {
//         this.schemaName = StringUtil.trimToNull(schemaName);
//     }
// 
//     public void setConstraintName(String constraintName) {
//         this.constraintName = constraintName;
//     }
// 
//     public String getConstraintName() {
//         return constraintName;
//     }
// 
//     public String getCondition() {
//         return condition;
//     }
// 
//     public void setCondition(String condition) {
//         this.condition = condition;
//     }
// 
//     public Boolean getDisable() {
//         return disable;
//     }
// 
//     public void setDisable(Boolean disable) {
//         this.disable = disable;
//     }
// 
//     public Boolean getDeferrable() {
//         return deferrable;
//     }
// 
//     public void setDeferrable(Boolean deferrable) {
//         this.deferrable = deferrable;
//     }
// 
//     public Boolean getInitiallyDeferred() {
//         return initiallyDeferred;
//     }
// 
//     public void setInitiallyDeferred(Boolean initiallyDeferred) {
//         this.initiallyDeferred = initiallyDeferred;
//     }
// 
//     public Boolean getValidate() {
//         return validate;
//     }
// 
//     public void setValidate(Boolean validate) {
//         this.validate = validate;
//     }
// 
//     public Boolean getRely() {
//         return rely;
//     }
// 
//     public void setRely(Boolean rely) {
//         this.rely = rely;
//     }
// 
//     public SqlStatement[] generateStatements(Database database) {
// 
//         return null;
//     }
// 
//     public String getConfirmationMessage() {
//         return null;
//     }
// 
// }
// 
// Path: src/main/java/liquibase/ext/ora/dropcheck/DropCheckChange.java
// @DatabaseChange(name="dropCheck", description = "Drop check", priority = ChangeMetaData.PRIORITY_DEFAULT + 200)
// public class DropCheckChange extends CheckAttribute {
// 
//     public DropCheckChange() {
//     }
// 
// 
//     public SqlStatement[] generateStatements(Database database) {
// 
//         String schemaname = getSchemaName() == null ? database.getDefaultSchemaName() : getSchemaName();
// 
//         DropCheckStatement statement = new DropCheckStatement(schemaname, getTableName(), getConstraintName());
// 
//         return new SqlStatement[]
//                 {
//                         statement
//                 };
//     }
// 
//     public String getConfirmationMessage() {
//         return getConstraintName() + " check DROPPED from " + getTableName();
//     }
// 
// }


import liquibase.change.DatabaseChange;
import liquibase.database.Database;
import liquibase.ext.ora.check.CheckAttribute;
import liquibase.ext.ora.dropcheck.DropCheckChange;
import liquibase.statement.SqlStatement;
import liquibase.change.Change;
import liquibase.change.ChangeMetaData;
package liquibase.ext.ora.addcheck;




@DatabaseChange(name="addCheck", description = "Add Check", priority = ChangeMetaData.PRIORITY_DEFAULT + 200)
public class AddCheckChange extends CheckAttribute {


    public AddCheckChange() {
    }


    public SqlStatement[] generateStatements(Database database) {

        String schemaName = getSchemaName() == null ? database.getDefaultSchemaName() : getSchemaName();

        AddCheckStatement statement = new AddCheckStatement(schemaName, getTableName(), getConstraintName(), getCondition());
        statement.setTablespace(getTablespace());
        statement.setDisable(getDisable());
        statement.setDeferrable(getDeferrable());
        statement.setInitiallyDeferred(getInitiallyDeferred());
        statement.setRely(getRely());
        statement.setValidate(getValidate());

        return new SqlStatement[]{statement};
    }

    public String getConfirmationMessage() {
        return "Constraint check " + getConstraintName() + " has been added to " + getTableName();
    }

    protected Change[] createInverses() {
        if (getConstraintName() == null) {
            return null;
        }

// Path: src/main/java/liquibase/ext/ora/check/CheckAttribute.java
// public abstract class CheckAttribute extends AbstractChange {
// 
//     private String tableName;
//     private String tablespace;
//     private String schemaName;
//     private String constraintName;
//     private String condition;
//     private Boolean disable;
//     private Boolean deferrable;
//     private Boolean initiallyDeferred;
//     private Boolean rely;
//     private Boolean validate;
// 
//     public void setTableName(String tableName) {
//         this.tableName = tableName;
//     }
// 
//     public String getTableName() {
//         return tableName;
//     }
// 
//     public void setTablespace(String tablespace) {
//         this.tablespace = tablespace;
//     }
// 
//     public String getTablespace() {
//         return tablespace;
//     }
// 
//     public String getSchemaName() {
//         return schemaName;
//     }
// 
//     public void setSchemaName(String schemaName) {
//         this.schemaName = StringUtil.trimToNull(schemaName);
//     }
// 
//     public void setConstraintName(String constraintName) {
//         this.constraintName = constraintName;
//     }
// 
//     public String getConstraintName() {
//         return constraintName;
//     }
// 
//     public String getCondition() {
//         return condition;
//     }
// 
//     public void setCondition(String condition) {
//         this.condition = condition;
//     }
// 
//     public Boolean getDisable() {
//         return disable;
//     }
// 
//     public void setDisable(Boolean disable) {
//         this.disable = disable;
//     }
// 
//     public Boolean getDeferrable() {
//         return deferrable;
//     }
// 
//     public void setDeferrable(Boolean deferrable) {
//         this.deferrable = deferrable;
//     }
// 
//     public Boolean getInitiallyDeferred() {
//         return initiallyDeferred;
//     }
// 
//     public void setInitiallyDeferred(Boolean initiallyDeferred) {
//         this.initiallyDeferred = initiallyDeferred;
//     }
// 
//     public Boolean getValidate() {
//         return validate;
//     }
// 
//     public void setValidate(Boolean validate) {
//         this.validate = validate;
//     }
// 
//     public Boolean getRely() {
//         return rely;
//     }
// 
//     public void setRely(Boolean rely) {
//         this.rely = rely;
//     }
// 
//     public SqlStatement[] generateStatements(Database database) {
// 
//         return null;
//     }
// 
//     public String getConfirmationMessage() {
//         return null;
//     }
// 
// }
// 
// Path: src/main/java/liquibase/ext/ora/dropcheck/DropCheckChange.java
// @DatabaseChange(name="dropCheck", description = "Drop check", priority = ChangeMetaData.PRIORITY_DEFAULT + 200)
// public class DropCheckChange extends CheckAttribute {
// 
//     public DropCheckChange() {
//     }
// 
// 
//     public SqlStatement[] generateStatements(Database database) {
// 
//         String schemaname = getSchemaName() == null ? database.getDefaultSchemaName() : getSchemaName();
// 
//         DropCheckStatement statement = new DropCheckStatement(schemaname, getTableName(), getConstraintName());
// 
//         return new SqlStatement[]
//                 {
//                         statement
//                 };
//     }
// 
//     public String getConfirmationMessage() {
//         return getConstraintName() + " check DROPPED from " + getTableName();
//     }
// 
// }


// Path: src/main/java/liquibase/ext/ora/addcheck/AddCheckChange.java
import liquibase.change.DatabaseChange;
import liquibase.database.Database;
import liquibase.ext.ora.check.CheckAttribute;
import liquibase.ext.ora.dropcheck.DropCheckChange;
import liquibase.statement.SqlStatement;
import liquibase.change.Change;
import liquibase.change.ChangeMetaData;

package liquibase.ext.ora.addcheck;




@DatabaseChange(name="addCheck", description = "Add Check", priority = ChangeMetaData.PRIORITY_DEFAULT + 200)
public class AddCheckChange extends CheckAttribute {


    public AddCheckChange() {
    }


    public SqlStatement[] generateStatements(Database database) {

        String schemaName = getSchemaName() == null ? database.getDefaultSchemaName() : getSchemaName();

        AddCheckStatement statement = new AddCheckStatement(schemaName, getTableName(), getConstraintName(), getCondition());
        statement.setTablespace(getTablespace());
        statement.setDisable(getDisable());
        statement.setDeferrable(getDeferrable());
        statement.setInitiallyDeferred(getInitiallyDeferred());
        statement.setRely(getRely());
        statement.setValidate(getValidate());

        return new SqlStatement[]{statement};
    }

    public String getConfirmationMessage() {
        return "Constraint check " + getConstraintName() + " has been added to " + getTableName();
    }

    protected Change[] createInverses() {
        if (getConstraintName() == null) {
            return null;
        }

        DropCheckChange inverse = new DropCheckChange();