// Path: src/main/java/liquibase/ext/ora/grant/addgrant/GrantObjectPermissionChange.java
// @DatabaseChange(name="grantObjectPermission", description = "Grant Schema Object Permission", priority = ChangeMetaData.PRIORITY_DEFAULT + 200)
// public class GrantObjectPermissionChange extends AbstractObjectPermissionChange {
// 
//     private Boolean grantOption = Boolean.FALSE;
// 
//     public GrantObjectPermissionChange() {}
// 
//     public GrantObjectPermissionChange( AbstractObjectPermissionChange other ) {
//     	super(other);
//     }
// 
//     public Boolean getGrantOption() {
//         return grantOption;
//     }
// 
//     public void setGrantOption(final Boolean grantOption) {
//         this.grantOption = grantOption;
//     }
//     @Override
// 	public SqlStatement[] generateStatements(Database database) {
//       String schemaName = getSchemaName() == null ? database.getDefaultSchemaName() : getSchemaName();
// 
//       GrantObjectPermissionStatement statement = new GrantObjectPermissionStatement(schemaName, getObjectName(), getRecipientList());
//       statement.setSelect(getSelect());
//       statement.setUpdate(getUpdate());
//       statement.setInsert(getInsert());
//       statement.setDelete(getDelete());
//       statement.setExecute(getExecute());
//       statement.setReferences(getReferences());
//       statement.setIndex(getIndex());
//       statement.setGrantOption(getGrantOption());
// 
//       return new SqlStatement[]{statement};
//     }
// 
// 	@Override
// 	public String getConfirmationMessage() {
//         return "Grants on " + getObjectName() + " have been given to " + getRecipientList();
//     }
// 
//     @Override
// 	protected Change[] createInverses() {
//     	RevokeObjectPermissionChange inverse = new RevokeObjectPermissionChange(this);
//         return new Change[]{inverse};
//     }
// 
// }


import liquibase.change.Change;
import liquibase.change.ChangeMetaData;
import liquibase.change.DatabaseChange;
import liquibase.database.Database;
import liquibase.ext.ora.grant.AbstractObjectPermissionChange;
import liquibase.ext.ora.grant.addgrant.GrantObjectPermissionChange;
import liquibase.statement.SqlStatement;
package liquibase.ext.ora.grant.revokegrant;



@DatabaseChange(name="revokeObjectPermission", description = "Revoke Schema Object Permission", priority = ChangeMetaData.PRIORITY_DEFAULT + 200)
public class RevokeObjectPermissionChange extends AbstractObjectPermissionChange {

    public RevokeObjectPermissionChange() {}


    public RevokeObjectPermissionChange( AbstractObjectPermissionChange other ) {
    	super(other);
    }

    @Override
	public SqlStatement[] generateStatements(Database database) {

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

      RevokeObjectPermissionStatement statement = new RevokeObjectPermissionStatement(schemaName, getObjectName(), getRecipientList());
      statement.setSelect(getSelect());
      statement.setUpdate(getUpdate());
      statement.setInsert(getInsert());
      statement.setDelete(getDelete());
      statement.setExecute(getExecute());
      statement.setIndex(getIndex());
      statement.setReferences(getReferences());

      return new SqlStatement[]{statement};
    }

    @Override
	public String getConfirmationMessage() {
        return "Revoking grants on " + getObjectName() + " that had been given to " + getRecipientList();
    }

    @Override
	protected Change[] createInverses() {
// Path: src/main/java/liquibase/ext/ora/grant/addgrant/GrantObjectPermissionChange.java
// @DatabaseChange(name="grantObjectPermission", description = "Grant Schema Object Permission", priority = ChangeMetaData.PRIORITY_DEFAULT + 200)
// public class GrantObjectPermissionChange extends AbstractObjectPermissionChange {
// 
//     private Boolean grantOption = Boolean.FALSE;
// 
//     public GrantObjectPermissionChange() {}
// 
//     public GrantObjectPermissionChange( AbstractObjectPermissionChange other ) {
//     	super(other);
//     }
// 
//     public Boolean getGrantOption() {
//         return grantOption;
//     }
// 
//     public void setGrantOption(final Boolean grantOption) {
//         this.grantOption = grantOption;
//     }
//     @Override
// 	public SqlStatement[] generateStatements(Database database) {
//       String schemaName = getSchemaName() == null ? database.getDefaultSchemaName() : getSchemaName();
// 
//       GrantObjectPermissionStatement statement = new GrantObjectPermissionStatement(schemaName, getObjectName(), getRecipientList());
//       statement.setSelect(getSelect());
//       statement.setUpdate(getUpdate());
//       statement.setInsert(getInsert());
//       statement.setDelete(getDelete());
//       statement.setExecute(getExecute());
//       statement.setReferences(getReferences());
//       statement.setIndex(getIndex());
//       statement.setGrantOption(getGrantOption());
// 
//       return new SqlStatement[]{statement};
//     }
// 
// 	@Override
// 	public String getConfirmationMessage() {
//         return "Grants on " + getObjectName() + " have been given to " + getRecipientList();
//     }
// 
//     @Override
// 	protected Change[] createInverses() {
//     	RevokeObjectPermissionChange inverse = new RevokeObjectPermissionChange(this);
//         return new Change[]{inverse};
//     }
// 
// }


// Path: src/main/java/liquibase/ext/ora/grant/revokegrant/RevokeObjectPermissionChange.java
import liquibase.change.Change;
import liquibase.change.ChangeMetaData;
import liquibase.change.DatabaseChange;
import liquibase.database.Database;
import liquibase.ext.ora.grant.AbstractObjectPermissionChange;
import liquibase.ext.ora.grant.addgrant.GrantObjectPermissionChange;
import liquibase.statement.SqlStatement;

package liquibase.ext.ora.grant.revokegrant;



@DatabaseChange(name="revokeObjectPermission", description = "Revoke Schema Object Permission", priority = ChangeMetaData.PRIORITY_DEFAULT + 200)
public class RevokeObjectPermissionChange extends AbstractObjectPermissionChange {

    public RevokeObjectPermissionChange() {}


    public RevokeObjectPermissionChange( AbstractObjectPermissionChange other ) {
    	super(other);
    }

    @Override
	public SqlStatement[] generateStatements(Database database) {

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

      RevokeObjectPermissionStatement statement = new RevokeObjectPermissionStatement(schemaName, getObjectName(), getRecipientList());
      statement.setSelect(getSelect());
      statement.setUpdate(getUpdate());
      statement.setInsert(getInsert());
      statement.setDelete(getDelete());
      statement.setExecute(getExecute());
      statement.setIndex(getIndex());
      statement.setReferences(getReferences());

      return new SqlStatement[]{statement};
    }

    @Override
	public String getConfirmationMessage() {
        return "Revoking grants on " + getObjectName() + " that had been given to " + getRecipientList();
    }

    @Override
	protected Change[] createInverses() {
    	GrantObjectPermissionChange inverse = new GrantObjectPermissionChange(this);