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
Source File: AddGeometryColumnGeneratorGeoDB.java    From liquibase-spatial with Apache License 2.0 6 votes vote down vote up
@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
Source File: AbstractSpatialUpdateGenerator.java    From liquibase-spatial with Apache License 2.0 4 votes vote down vote up
@Override
public ValidationErrors validate(final UpdateStatement statement, final Database database,
      final SqlGeneratorChain sqlGeneratorChain) {
   return sqlGeneratorChain.validate(statement, database);
}
 
Example 3
Source File: AbstractSpatialInsertGenerator.java    From liquibase-spatial with Apache License 2.0 4 votes vote down vote up
@Override
public ValidationErrors validate(final InsertStatement statement, final Database database,
      final SqlGeneratorChain sqlGeneratorChain) {
   return sqlGeneratorChain.validate(statement, database);
}
 
Example 4
Source File: DropSpatialTableGeneratorOracle.java    From liquibase-spatial with Apache License 2.0 4 votes vote down vote up
@Override
public ValidationErrors validate(final DropTableStatement statement, final Database database,
      final SqlGeneratorChain sqlGeneratorChain) {
   return sqlGeneratorChain.validate(statement, database);
}
 
Example 5
Source File: DropGeometryColumnGeneratorGeoDB.java    From liquibase-spatial with Apache License 2.0 4 votes vote down vote up
@Override
public ValidationErrors validate(final DropColumnStatement statement, final Database database,
      final SqlGeneratorChain sqlGeneratorChain) {
   return sqlGeneratorChain.validate(statement, database);
}
 
Example 6
Source File: DropSpatialTableGeneratorGeoDB.java    From liquibase-spatial with Apache License 2.0 4 votes vote down vote up
@Override
public ValidationErrors validate(final DropTableStatement statement, final Database database,
      final SqlGeneratorChain sqlGeneratorChain) {
   return sqlGeneratorChain.validate(statement, database);
}
 
Example 7
Source File: InsertGenerator.java    From liquibase-mssql with 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
Source File: InsertSetGenerator.java    From liquibase-mssql with Apache License 2.0 4 votes vote down vote up
public ValidationErrors validate(InsertSetStatement statement, Database database,
                SqlGeneratorChain sqlGeneratorChain) {
    return sqlGeneratorChain.validate(statement, database);
}
 
Example 9
Source File: DropStoredProcedureGeneratorMSSQL.java    From liquibase-mssql with Apache License 2.0 4 votes vote down vote up
public ValidationErrors validate(DropStoredProcedureStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) {
    return sqlGeneratorChain.validate(statement, database);
}