Java Code Examples for liquibase.sqlgenerator.SqlGeneratorChain#validate()

The following examples show how to use liquibase.sqlgenerator.SqlGeneratorChain#validate() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Override
public ValidationErrors validate(final AddColumnStatement statement,
      final Database database, final SqlGeneratorChain sqlGeneratorChain) {
   final ValidationErrors errors = new ValidationErrors();
   final LiquibaseDataType dataType = DataTypeFactory.getInstance()
         .fromDescription(statement.getColumnType(), database);

   // Ensure that the SRID parameter is provided.
   if (dataType instanceof GeometryType) {
      final GeometryType geometryType = (GeometryType) dataType;
      if (geometryType.getSRID() == null) {
         errors.addError("The SRID parameter is required on the geometry type");
      }
   }
   final ValidationErrors chainErrors = sqlGeneratorChain.validate(
         statement, database);
   if (chainErrors != null) {
      errors.addAll(chainErrors);
   }
   return errors;
}
 
Example 2
@Override
public ValidationErrors validate(final UpdateStatement statement, final Database database,
      final SqlGeneratorChain sqlGeneratorChain) {
   return sqlGeneratorChain.validate(statement, database);
}
 
Example 3
@Override
public ValidationErrors validate(final InsertStatement statement, final Database database,
      final SqlGeneratorChain sqlGeneratorChain) {
   return sqlGeneratorChain.validate(statement, database);
}
 
Example 4
@Override
public ValidationErrors validate(final DropTableStatement statement, final Database database,
      final SqlGeneratorChain sqlGeneratorChain) {
   return sqlGeneratorChain.validate(statement, database);
}
 
Example 5
@Override
public ValidationErrors validate(final DropColumnStatement statement, final Database database,
      final SqlGeneratorChain sqlGeneratorChain) {
   return sqlGeneratorChain.validate(statement, database);
}
 
Example 6
@Override
public ValidationErrors validate(final DropTableStatement statement, final Database database,
      final SqlGeneratorChain sqlGeneratorChain) {
   return sqlGeneratorChain.validate(statement, database);
}
 
Example 7
Source Project: liquibase-mssql   File: InsertGenerator.java    License: Apache License 2.0 4 votes vote down vote up
public ValidationErrors validate(InsertStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) {
    return sqlGeneratorChain.validate(statement, database);
}
 
Example 8
public ValidationErrors validate(InsertSetStatement statement, Database database,
                SqlGeneratorChain sqlGeneratorChain) {
    return sqlGeneratorChain.validate(statement, database);
}
 
Example 9
public ValidationErrors validate(DropStoredProcedureStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) {
    return sqlGeneratorChain.validate(statement, database);
}