Package org.apache.sqoop.validation

Examples of org.apache.sqoop.validation.Validation.addMessage()


    if(configuration.table.tableName == null && configuration.table.sql == null) {
      validation.addMessage(Status.UNACCEPTABLE, "table", "Either table name or SQL must be specified");
    }
    if(configuration.table.tableName != null && configuration.table.sql != null) {
      validation.addMessage(Status.UNACCEPTABLE, "table", "Both table name and SQL cannot be specified");
    }

    return validation;
  }
View Full Code Here


  private Validation validateImportJob(Object jobConfiguration) {
    Validation validation = new Validation(ImportJobConfiguration.class);
    ImportJobConfiguration configuration = (ImportJobConfiguration)jobConfiguration;

    if(configuration.table.tableName == null && configuration.table.sql == null) {
      validation.addMessage(Status.UNACCEPTABLE, "table", "Either table name or SQL must be specified");
    }
    if(configuration.table.tableName != null && configuration.table.sql != null) {
      validation.addMessage(Status.UNACCEPTABLE, "table", "Both table name and SQL cannot be specified");
    }
    if(configuration.table.schemaName != null && configuration.table.sql != null) {
View Full Code Here

    if(configuration.table.tableName == null && configuration.table.sql == null) {
      validation.addMessage(Status.UNACCEPTABLE, "table", "Either table name or SQL must be specified");
    }
    if(configuration.table.tableName != null && configuration.table.sql != null) {
      validation.addMessage(Status.UNACCEPTABLE, "table", "Both table name and SQL cannot be specified");
    }
    if(configuration.table.schemaName != null && configuration.table.sql != null) {
      validation.addMessage(Status.UNACCEPTABLE, "table", "Both schema name and SQL cannot be specified");
    }
View Full Code Here

    }
    if(configuration.table.tableName != null && configuration.table.sql != null) {
      validation.addMessage(Status.UNACCEPTABLE, "table", "Both table name and SQL cannot be specified");
    }
    if(configuration.table.schemaName != null && configuration.table.sql != null) {
      validation.addMessage(Status.UNACCEPTABLE, "table", "Both schema name and SQL cannot be specified");
    }

    if(configuration.table.sql != null && !configuration.table.sql.contains(GenericJdbcConnectorConstants.SQL_CONDITIONS_TOKEN)) {
      validation.addMessage(Status.UNACCEPTABLE, "table", "sql", "SQL statement must contain placeholder for auto generated "
        + "conditions - " + GenericJdbcConnectorConstants.SQL_CONDITIONS_TOKEN);
View Full Code Here

    if(configuration.table.schemaName != null && configuration.table.sql != null) {
      validation.addMessage(Status.UNACCEPTABLE, "table", "Both schema name and SQL cannot be specified");
    }

    if(configuration.table.sql != null && !configuration.table.sql.contains(GenericJdbcConnectorConstants.SQL_CONDITIONS_TOKEN)) {
      validation.addMessage(Status.UNACCEPTABLE, "table", "sql", "SQL statement must contain placeholder for auto generated "
        + "conditions - " + GenericJdbcConnectorConstants.SQL_CONDITIONS_TOKEN);
    }

    return validation;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.