class SQLDataSetDefValidator extends AbstractDataSetDefValidator<SQLDataSetDef> {

    @Override
    public Iterable<ConstraintViolation<?>> validate( SQLDataSetDef dataSetDef,
                                                      boolean isCacheEnabled,
                                                      boolean isPushEnabled,
                                                      boolean isRefreshEnabled,
                                                      Object... params ) {
        assert params != null && params.length == 1;
        final Boolean isQuery = (Boolean) params[0];
        Set<ConstraintViolation<SQLDataSetDef>> _violations = validator.validate( dataSetDef,
                                                                                  getValidationGroups( isCacheEnabled,
                                                                                                       isPushEnabled,
                                                                                                       isRefreshEnabled,
                                                                                                       SQLDataSetDefValidation.class,
                                                                                                       isQuery ? SQLDataSetDefDbSQLValidation.class : SQLDataSetDefDbTableValidation.class ) );
        return toIterable( _violations );
    }

    @Inject public  SQLDataSetDefValidator( Validator validator );

}