use of liquibase.exception.ValidationErrors in project opennms by OpenNMS.
the class SetSequenceGenerator method validate.
@Override
public ValidationErrors validate(final SetSequenceStatement statement, final Database database, final SqlGeneratorChain sqlGeneratorChain) {
ValidationErrors validationErrors = new ValidationErrors();
validationErrors.checkRequiredField("sequenceName", statement.getSequenceName());
if (statement.getValue() == null) {
validationErrors.checkRequiredField("tables", statement.getTables());
} else {
if (statement.getTables().size() > 0) {
LogFactory.getLogger().warning("You have set the sequence to a specific value, but have also provided tables to use for inferring the value. Using the specific value.");
}
}
return validationErrors;
}
use of liquibase.exception.ValidationErrors in project opennms by OpenNMS.
the class CreateTypeGenerator method validate.
@Override
public ValidationErrors validate(final CreateTypeStatement statement, final Database database, final SqlGeneratorChain sqlGeneratorChain) {
ValidationErrors errors = new ValidationErrors();
errors.checkRequiredField("name", statement);
errors.checkRequiredField("columns", statement);
return errors;
}
use of liquibase.exception.ValidationErrors in project liquibase by liquibase.
the class FindForeignKeyConstraintsGeneratorMSSQL method validate.
@Override
public ValidationErrors validate(FindForeignKeyConstraintsStatement findForeignKeyConstraintsStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {
ValidationErrors validationErrors = new ValidationErrors();
validationErrors.checkRequiredField("baseTableName", findForeignKeyConstraintsStatement.getBaseTableName());
return validationErrors;
}
use of liquibase.exception.ValidationErrors in project liquibase by liquibase.
the class FindForeignKeyConstraintsGeneratorPostgres method validate.
@Override
public ValidationErrors validate(FindForeignKeyConstraintsStatement findForeignKeyConstraintsStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {
ValidationErrors validationErrors = new ValidationErrors();
validationErrors.checkRequiredField("baseTableName", findForeignKeyConstraintsStatement.getBaseTableName());
return validationErrors;
}
use of liquibase.exception.ValidationErrors in project liquibase by liquibase.
the class FindForeignKeyConstraintsGeneratorDB2 method validate.
@Override
public ValidationErrors validate(FindForeignKeyConstraintsStatement findForeignKeyConstraintsStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {
ValidationErrors validationErrors = new ValidationErrors();
validationErrors.checkRequiredField("baseTableName", findForeignKeyConstraintsStatement.getBaseTableName());
return validationErrors;
}
Aggregations