sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [09/13] SQOOP-1498: Sqoop2: Repository Object refactoring (objects prefixed with M)
Date Fri, 03 Oct 2014 06:53:23 GMT
http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/common/src/test/java/org/apache/sqoop/model/TestMJob.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/org/apache/sqoop/model/TestMJob.java b/common/src/test/java/org/apache/sqoop/model/TestMJob.java
index 8f2943e..848c2cc 100644
--- a/common/src/test/java/org/apache/sqoop/model/TestMJob.java
+++ b/common/src/test/java/org/apache/sqoop/model/TestMJob.java
@@ -17,17 +17,15 @@
  */
 package org.apache.sqoop.model;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
 import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.sqoop.common.Direction;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
-
-/**
- * Test class for org.apache.sqoop.model.MJob
- */
 public class TestMJob {
   /**
    * Test class for initialization
@@ -40,9 +38,9 @@ public class TestMJob {
     assertEquals(456l, job.getConnectorId(Direction.TO));
     assertEquals("Buffy", job.getCreationUser());
     assertEquals("Vampire", job.getName());
-    assertEquals(fromForms(), job.getConnectorPart(Direction.FROM));
-    assertEquals(toForms(), job.getConnectorPart(Direction.TO));
-    assertEquals(frameworkForms(), job.getFrameworkPart());
+    assertEquals(fromConfig(), job.getJobConfig(Direction.FROM));
+    assertEquals(toConfig(), job.getJobConfig(Direction.TO));
+    assertEquals(driverConfig(), job.getDriverConfig());
 
     // Test copy constructor
     MJob copy = new MJob(job);
@@ -50,19 +48,19 @@ public class TestMJob {
     assertEquals(456l, copy.getConnectorId(Direction.TO));
     assertEquals("Buffy", copy.getCreationUser());
     assertEquals("Vampire", copy.getName());
-    assertEquals(fromForms(), copy.getConnectorPart(Direction.FROM));
-    assertEquals(toForms(), copy.getConnectorPart(Direction.TO));
-    assertEquals(frameworkForms(), copy.getFrameworkPart());
+    assertEquals(fromConfig(), copy.getJobConfig(Direction.FROM));
+    assertEquals(toConfig(), copy.getJobConfig(Direction.TO));
+    assertEquals(driverConfig(), copy.getDriverConfig());
 
-    // Test constructor for metadata upgrade (the order of forms is different)
-    MJob upgradeCopy = new MJob(job, fromForms(), toForms(), frameworkForms());
+    // Test constructor for metadata upgrade (the order of configs is different)
+    MJob upgradeCopy = new MJob(job, fromConfig(), toConfig(), driverConfig());
     assertEquals(123l, upgradeCopy.getConnectorId(Direction.FROM));
     assertEquals(456l, upgradeCopy.getConnectorId(Direction.TO));
     assertEquals("Buffy", upgradeCopy.getCreationUser());
     assertEquals("Vampire", upgradeCopy.getName());
-    assertEquals(fromForms(), upgradeCopy.getConnectorPart(Direction.FROM));
-    assertEquals(toForms(), upgradeCopy.getConnectorPart(Direction.TO));
-    assertEquals(frameworkForms(), upgradeCopy.getFrameworkPart());
+    assertEquals(fromConfig(), upgradeCopy.getJobConfig(Direction.FROM));
+    assertEquals(toConfig(), upgradeCopy.getJobConfig(Direction.TO));
+    assertEquals(driverConfig(), upgradeCopy.getDriverConfig());
   }
 
   @Test
@@ -70,42 +68,42 @@ public class TestMJob {
     MJob job = job();
 
     // Clone without value
-    MJob withoutValue = job.clone(false);
-    assertEquals(job, withoutValue);
-    assertEquals(MPersistableEntity.PERSISTANCE_ID_DEFAULT, withoutValue.getPersistenceId());
-    assertNull(withoutValue.getName());
-    assertNull(withoutValue.getCreationUser());
-    assertEquals(fromForms(), withoutValue.getConnectorPart(Direction.FROM));
-    assertEquals(toForms(), withoutValue.getConnectorPart(Direction.TO));
-    assertEquals(frameworkForms(), withoutValue.getFrameworkPart());
-    assertNull(withoutValue.getConnectorPart(Direction.FROM)
-        .getForm("FORMNAME").getInput("INTEGER-INPUT").getValue());
-    assertNull(withoutValue.getConnectorPart(Direction.FROM)
-        .getForm("FORMNAME").getInput("STRING-INPUT").getValue());
+    MJob withoutJobValue = job.clone(false);
+    assertEquals(job, withoutJobValue);
+    assertEquals(MPersistableEntity.PERSISTANCE_ID_DEFAULT, withoutJobValue.getPersistenceId());
+    assertNull(withoutJobValue.getName());
+    assertNull(withoutJobValue.getCreationUser());
+    assertEquals(fromConfig(), withoutJobValue.getJobConfig(Direction.FROM));
+    assertEquals(toConfig(), withoutJobValue.getJobConfig(Direction.TO));
+    assertEquals(driverConfig(), withoutJobValue.getDriverConfig());
+    assertNull(withoutJobValue.getJobConfig(Direction.FROM)
+        .getConfig("CONFIGFROMNAME").getInput("INTEGER-INPUT").getValue());
+    assertNull(withoutJobValue.getJobConfig(Direction.FROM)
+        .getConfig("CONFIGFROMNAME").getInput("STRING-INPUT").getValue());
 
     // Clone with value
-    MJob withValue = job.clone(true);
-    assertEquals(job, withValue);
-    assertEquals(job.getPersistenceId(), withValue.getPersistenceId());
-    assertEquals(job.getName(), withValue.getName());
-    assertEquals(job.getCreationUser(), withValue.getCreationUser());
-    assertEquals(fromForms(), withValue.getConnectorPart(Direction.FROM));
-    assertEquals(toForms(), withValue.getConnectorPart(Direction.TO));
-    assertEquals(frameworkForms(), withValue.getFrameworkPart());
-    assertEquals(100, withValue.getConnectorPart(Direction.FROM)
-        .getForm("FORMNAME").getInput("INTEGER-INPUT").getValue());
-    assertEquals("TEST-VALUE", withValue.getConnectorPart(Direction.FROM)
-        .getForm("FORMNAME").getInput("STRING-INPUT").getValue());  }
+    MJob withJobValue = job.clone(true);
+    assertEquals(job, withJobValue);
+    assertEquals(job.getPersistenceId(), withJobValue.getPersistenceId());
+    assertEquals(job.getName(), withJobValue.getName());
+    assertEquals(job.getCreationUser(), withJobValue.getCreationUser());
+    assertEquals(fromConfig(), withJobValue.getJobConfig(Direction.FROM));
+    assertEquals(toConfig(), withJobValue.getJobConfig(Direction.TO));
+    assertEquals(driverConfig(), withJobValue.getDriverConfig());
+    assertEquals(100, withJobValue.getJobConfig(Direction.FROM)
+        .getConfig("CONFIGFROMNAME").getInput("INTEGER-INPUT").getValue());
+    assertEquals("TEST-VALUE", withJobValue.getJobConfig(Direction.FROM)
+        .getConfig("CONFIGFROMNAME").getInput("STRING-INPUT").getValue());  }
 
   private MJob job() {
-    MJob job = new MJob(123l, 456l, 1L, 2L, fromForms(), toForms(), frameworkForms());
+    MJob job = new MJob(123l, 456l, 1L, 2L, fromConfig(), toConfig(), driverConfig());
     job.setName("Vampire");
     job.setCreationUser("Buffy");
     return job;
   }
 
-  private MJobForms fromForms() {
-    List<MForm> forms = new ArrayList<MForm>();
+  private MFromConfig fromConfig() {
+    List<MConfig> configs = new ArrayList<MConfig>();
     MIntegerInput input = new MIntegerInput("INTEGER-INPUT", false);
     input.setValue(100);
     MStringInput strInput = new MStringInput("STRING-INPUT",false,(short)20);
@@ -113,28 +111,28 @@ public class TestMJob {
     List<MInput<?>> list = new ArrayList<MInput<?>>();
     list.add(input);
     list.add(strInput);
-    MForm form = new MForm("FORMNAME", list);
-    forms.add(form);
-    return new MJobForms(forms);
+    MConfig config = new MConfig("CONFIGFROMNAME", list);
+    configs.add(config);
+    return new MFromConfig(configs);
   }
 
-  private MJobForms toForms() {
-    List<MForm> forms = new ArrayList<MForm>();
+  private MToConfig toConfig() {
+    List<MConfig> configs = new ArrayList<MConfig>();
     MMapInput input = new MMapInput("MAP-INPUT", false);
     List<MInput<?>> list = new ArrayList<MInput<?>>();
     list.add(input);
-    MForm form = new MForm("form", list);
-    forms.add(form);
-    return new MJobForms(forms);
+    MConfig config = new MConfig("CONFIGTONAME", list);
+    configs.add(config);
+    return new MToConfig(configs);
   }
 
-  private MJobForms frameworkForms() {
-    List<MForm> forms = new ArrayList<MForm>();
+  private MDriverConfig driverConfig() {
+    List<MConfig> configs = new ArrayList<MConfig>();
     MMapInput input = new MMapInput("MAP-INPUT", false);
     List<MInput<?>> list = new ArrayList<MInput<?>>();
     list.add(input);
-    MForm form = new MForm("form", list);
-    forms.add(form);
-    return new MJobForms(forms);
+    MConfig config = new MConfig("CONFIGDRIVERNAME", list);
+    configs.add(config);
+    return new MDriverConfig(configs);
   }
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/common/src/test/java/org/apache/sqoop/model/TestMJobConfig.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/org/apache/sqoop/model/TestMJobConfig.java b/common/src/test/java/org/apache/sqoop/model/TestMJobConfig.java
new file mode 100644
index 0000000..7d0641e
--- /dev/null
+++ b/common/src/test/java/org/apache/sqoop/model/TestMJobConfig.java
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sqoop.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class TestMJobConfig {
+  /**
+   * Test for class initialization and values
+   */
+  @Test
+  public void testInitialization() {
+    List<MConfig> configs = new ArrayList<MConfig>();
+    MFromConfig fromJobConfig = new MFromConfig(configs);
+    List<MConfig> configs2 = new ArrayList<MConfig>();
+    MFromConfig fromJobConfig2 = new MFromConfig(configs2);
+    assertEquals(fromJobConfig2, fromJobConfig);
+    MConfig c = new MConfig("test", null);
+    configs2.add(c);
+    assertFalse(fromJobConfig.equals(fromJobConfig2));
+  }
+}

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/common/src/test/java/org/apache/sqoop/model/TestMJobForms.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/org/apache/sqoop/model/TestMJobForms.java b/common/src/test/java/org/apache/sqoop/model/TestMJobForms.java
deleted file mode 100644
index e59b282..0000000
--- a/common/src/test/java/org/apache/sqoop/model/TestMJobForms.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.sqoop.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Test class for org.apache.sqoop.model.MJobForms
- */
-public class TestMJobForms {
-  /**
-   * Test for class initialization and values
-   */
-  @Test
-  public void testInitialization() {
-    List<MForm> forms = new ArrayList<MForm>();
-    MJobForms jobform1 = new MJobForms(forms);
-    List<MForm> forms2 = new ArrayList<MForm>();
-    MJobForms jobform2 = new MJobForms(forms2);
-    assertEquals(jobform2, jobform1);
-    // Add a form to list for checking not equals
-    MForm m = new MForm("test", null);
-    forms2.add(m);
-    assertFalse(jobform1.equals(jobform2));
-  }
-}

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/common/src/test/java/org/apache/sqoop/model/TestMLink.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/org/apache/sqoop/model/TestMLink.java b/common/src/test/java/org/apache/sqoop/model/TestMLink.java
index 77fa2a9..9ad8954 100644
--- a/common/src/test/java/org/apache/sqoop/model/TestMLink.java
+++ b/common/src/test/java/org/apache/sqoop/model/TestMLink.java
@@ -24,9 +24,6 @@ import org.junit.Test;
 
 import static org.junit.Assert.*;
 
-/**
- * Test class for org.apache.sqoop.model.MConnection
- */
 public class TestMLink {
 
   /**
@@ -39,8 +36,7 @@ public class TestMLink {
     assertEquals(123l, link.getConnectorId());
     assertEquals("Vampire", link.getName());
     assertEquals("Buffy", link.getCreationUser());
-    assertEquals(forms1(), link.getConnectorPart());
-    assertEquals(forms2(), link.getFrameworkPart());
+    assertEquals(linkConfig(), link.getConnectorLinkConfig());
 
     // Test copy constructor
     MLink copy = new MLink(link);
@@ -48,17 +44,7 @@ public class TestMLink {
     assertEquals("Vampire", copy.getName());
     assertEquals("Buffy", copy.getCreationUser());
     assertEquals(link.getCreationDate(), copy.getCreationDate());
-    assertEquals(forms1(), copy.getConnectorPart());
-    assertEquals(forms2(), copy.getFrameworkPart());
-
-    // Test constructor for metadata upgrade (the order of forms is different)
-    MLink upgradeCopy = new MLink(link, forms2(), forms1());
-    assertEquals(123l, upgradeCopy.getConnectorId());
-    assertEquals("Vampire", upgradeCopy.getName());
-    assertEquals("Buffy", upgradeCopy.getCreationUser());
-    assertEquals(link.getCreationDate(), upgradeCopy.getCreationDate());
-    assertEquals(forms2(), upgradeCopy.getConnectorPart());
-    assertEquals(forms1(), upgradeCopy.getFrameworkPart());
+    assertEquals(linkConfig(), copy.getConnectorLinkConfig());
   }
 
   @Test
@@ -66,37 +52,35 @@ public class TestMLink {
     MLink link = link();
 
     // Clone without value
-    MLink withoutValue = link.clone(false);
-    assertEquals(link, withoutValue);
-    assertEquals(MPersistableEntity.PERSISTANCE_ID_DEFAULT, withoutValue.getPersistenceId());
-    assertNull(withoutValue.getName());
-    assertNull(withoutValue.getCreationUser());
-    assertEquals(forms1(), withoutValue.getConnectorPart());
-    assertEquals(forms2(), withoutValue.getFrameworkPart());
-    assertNull(withoutValue.getConnectorPart().getForm("FORMNAME").getInput("INTEGER-INPUT").getValue());
-    assertNull(withoutValue.getConnectorPart().getForm("FORMNAME").getInput("STRING-INPUT").getValue());
+    MLink withoutLinkValue = link.clone(false);
+    assertEquals(link, withoutLinkValue);
+    assertEquals(MPersistableEntity.PERSISTANCE_ID_DEFAULT, withoutLinkValue.getPersistenceId());
+    assertNull(withoutLinkValue.getName());
+    assertNull(withoutLinkValue.getCreationUser());
+    assertEquals(linkConfig(), withoutLinkValue.getConnectorLinkConfig());
+    assertNull(withoutLinkValue.getConnectorLinkConfig().getConfig("CONFIGNAME").getInput("INTEGER-INPUT").getValue());
+    assertNull(withoutLinkValue.getConnectorLinkConfig().getConfig("CONFIGNAME").getInput("STRING-INPUT").getValue());
 
     // Clone with value
-    MLink withValue = link.clone(true);
-    assertEquals(link, withValue);
-    assertEquals(link.getPersistenceId(), withValue.getPersistenceId());
-    assertEquals(link.getName(), withValue.getName());
-    assertEquals(link.getCreationUser(), withValue.getCreationUser());
-    assertEquals(forms1(), withValue.getConnectorPart());
-    assertEquals(forms2(), withValue.getFrameworkPart());
-    assertEquals(100, withValue.getConnectorPart().getForm("FORMNAME").getInput("INTEGER-INPUT").getValue());
-    assertEquals("TEST-VALUE", withValue.getConnectorPart().getForm("FORMNAME").getInput("STRING-INPUT").getValue());
+    MLink withLinkValue = link.clone(true);
+    assertEquals(link, withLinkValue);
+    assertEquals(link.getPersistenceId(), withLinkValue.getPersistenceId());
+    assertEquals(link.getName(), withLinkValue.getName());
+    assertEquals(link.getCreationUser(), withLinkValue.getCreationUser());
+    assertEquals(linkConfig(), withLinkValue.getConnectorLinkConfig());
+    assertEquals(100, withLinkValue.getConnectorLinkConfig().getConfig("CONFIGNAME").getInput("INTEGER-INPUT").getValue());
+    assertEquals("TEST-VALUE", withLinkValue.getConnectorLinkConfig().getConfig("CONFIGNAME").getInput("STRING-INPUT").getValue());
   }
 
   private MLink link() {
-    MLink link = new MLink(123l, forms1(), forms2());
+    MLink link = new MLink(123l, linkConfig());
     link.setName("Vampire");
     link.setCreationUser("Buffy");
     return link;
   }
 
-  private MConnectionForms forms1() {
-    List<MForm> forms = new ArrayList<MForm>();
+  private MLinkConfig linkConfig() {
+    List<MConfig> configs = new ArrayList<MConfig>();
     MIntegerInput input = new MIntegerInput("INTEGER-INPUT", false);
     input.setValue(100);
     MStringInput strInput = new MStringInput("STRING-INPUT",false,(short)20);
@@ -104,19 +88,9 @@ public class TestMLink {
     List<MInput<?>> list = new ArrayList<MInput<?>>();
     list.add(input);
     list.add(strInput);
-    MForm form = new MForm("FORMNAME", list);
-    forms.add(form);
-    return new MConnectionForms(forms);
-  }
-
-  private MConnectionForms forms2() {
-    List<MForm> forms = new ArrayList<MForm>();
-    MMapInput input = new MMapInput("MAP-INPUT", false);
-    List<MInput<?>> list = new ArrayList<MInput<?>>();
-    list.add(input);
-    MForm form = new MForm("form", list);
-    forms.add(form);
-    return new MConnectionForms(forms);
+    MConfig config = new MConfig("CONFIGNAME", list);
+    configs.add(config);
+    return new MLinkConfig(configs);
   }
 
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/common/src/test/java/org/apache/sqoop/model/TestMLinkConfig.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/org/apache/sqoop/model/TestMLinkConfig.java b/common/src/test/java/org/apache/sqoop/model/TestMLinkConfig.java
new file mode 100644
index 0000000..62f61a6
--- /dev/null
+++ b/common/src/test/java/org/apache/sqoop/model/TestMLinkConfig.java
@@ -0,0 +1,45 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sqoop.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class TestMLinkConfig {
+
+  /**
+   * Test for class initialization and values
+   */
+  @Test
+  public void testInitialization() {
+    List<MConfig> configs = new ArrayList<MConfig>();
+    MLinkConfig linkConfig = new MLinkConfig(configs);
+    List<MConfig> testConfig = new ArrayList<MConfig>();
+    assertEquals(testConfig, linkConfig.getConfigs());
+    MLinkConfig linkConfig2 = new MLinkConfig(testConfig);
+    assertEquals(linkConfig2, linkConfig);
+    // Add a config to list for checking not equals
+    MConfig c = new MConfig("test", null);
+    testConfig.add(c);
+    assertFalse(linkConfig.equals(linkConfig2));
+  }
+}

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/common/src/test/java/org/apache/sqoop/validation/TestValidation.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/org/apache/sqoop/validation/TestValidation.java b/common/src/test/java/org/apache/sqoop/validation/TestValidation.java
index 85e9e1c..16a8bbe 100644
--- a/common/src/test/java/org/apache/sqoop/validation/TestValidation.java
+++ b/common/src/test/java/org/apache/sqoop/validation/TestValidation.java
@@ -17,16 +17,20 @@
  */
 package org.apache.sqoop.validation;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.sqoop.common.SqoopException;
-import org.apache.sqoop.validation.Validation.FormInput;
-import org.apache.sqoop.validation.Validation.Message;
+import org.apache.sqoop.validation.ConfigValidator.ConfigInput;
+import org.apache.sqoop.validation.ConfigValidator.Message;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
-
 /**
  * Test class for org.apache.sqoop.validation.Validation
  */
@@ -38,42 +42,42 @@ public class TestValidation {
   @Test
   public void testInitialization() {
     /* Check initialization with class */
-    Validation validation = new Validation(Class.class);
+    ConfigValidator validation = new ConfigValidator(Class.class);
     assertNotNull(validation);
     assertEquals(Status.FINE, validation.getStatus());
     assertEquals(0, validation.getMessages().size());
 
     /* Check initialization with status and message as null */
-    Validation validationNull = new Validation(null, null);
+    ConfigValidator validationNull = new ConfigValidator(null, null);
     assertNotNull(validationNull);
     assertNull(validationNull.getStatus());
     assertNull(validationNull.getMessages());
 
     /* Check initialization with status and message with values */
     Status s1 = Status.FINE;
-    Map<FormInput, Message> msg1 = new HashMap<Validation.FormInput, Validation.Message>();
-    Validation validation1 = new Validation(s1, msg1);
+    Map<ConfigInput, Message> msg1 = new HashMap<ConfigValidator.ConfigInput, ConfigValidator.Message>();
+    ConfigValidator validation1 = new ConfigValidator(s1, msg1);
     assertNotNull(validation1);
     assertEquals(Status.FINE, validation1.getStatus());
     assertEquals(0, validation1.getMessages().size());
 
     /* Check initialization with status and message with values */
     Status s2 = Status.ACCEPTABLE;
-    Map<FormInput, Message> msg2 = new HashMap<Validation.FormInput, Validation.Message>();
-    Validation validation2 = new Validation(s2, msg2);
+    Map<ConfigInput, Message> msg2 = new HashMap<ConfigValidator.ConfigInput, ConfigValidator.Message>();
+    ConfigValidator validation2 = new ConfigValidator(s2, msg2);
     assertNotNull(validation2);
     assertEquals(Status.ACCEPTABLE, validation2.getStatus());
     assertEquals(0, validation2.getMessages().size());
 
     /* Check initialization with status and message with values */
     Status s3 = Status.ACCEPTABLE;
-    Map<FormInput, Message> msg3 = new HashMap<Validation.FormInput, Validation.Message>();
-    Validation.FormInput fi = new Validation.FormInput("form\\.input");
-    Validation.Message message = new Validation.Message(Status.FINE, "sqoop");
+    Map<ConfigInput, Message> msg3 = new HashMap<ConfigValidator.ConfigInput, ConfigValidator.Message>();
+    ConfigValidator.ConfigInput fi = new ConfigValidator.ConfigInput("config\\.input");
+    ConfigValidator.Message message = new ConfigValidator.Message(Status.FINE, "sqoop");
     msg3.put(fi, message);
-    Validation validation3 = new Validation(s3, msg3);
-    Validation.FormInput fiTest = new Validation.FormInput("form\\.input");
-    Validation.Message messageTest = new Validation.Message(Status.FINE,
+    ConfigValidator validation3 = new ConfigValidator(s3, msg3);
+    ConfigValidator.ConfigInput fiTest = new ConfigValidator.ConfigInput("config\\.input");
+    ConfigValidator.Message messageTest = new ConfigValidator.Message(Status.FINE,
         "sqoop");
     assertEquals(messageTest, validation3.getMessages().get(fiTest));
     assertEquals(Status.ACCEPTABLE, validation3.getStatus());
@@ -82,13 +86,13 @@ public class TestValidation {
   /**
    * Test for Validation.ForInput
    */
-  public void testFormInput() {
-    Validation.FormInput fi = new Validation.FormInput("test\\.test");
+  public void testConfigInput() {
+    ConfigValidator.ConfigInput fi = new ConfigValidator.ConfigInput("test\\.test");
     assertNotNull(fi);
 
     /* Passing null */
     try {
-      new Validation.FormInput(null);
+      new ConfigValidator.ConfigInput(null);
       fail("Assert error is expected");
     } catch (AssertionError e) {
       assertTrue(true);
@@ -96,31 +100,31 @@ public class TestValidation {
 
     /* Passing empty and check exception messages */
     try {
-      new Validation.FormInput("");
+      new ConfigValidator.ConfigInput("");
       fail("SqoopException is expected");
     } catch (SqoopException e) {
-      assertEquals(ValidationError.VALIDATION_0003.getMessage(), e
+      assertEquals(ConfigValidationError.VALIDATION_0003.getMessage(), e
           .getErrorCode().getMessage());
     }
 
     /* Passing value and check */
-    Validation.FormInput fi2 = new Validation.FormInput("form\\.input");
-    assertEquals("form\\", fi2.getForm());
+    ConfigValidator.ConfigInput fi2 = new ConfigValidator.ConfigInput("config\\.input");
+    assertEquals("config\\", fi2.getConfig());
     assertEquals("input", fi2.getInput());
 
     /* Check equals */
-    Validation.FormInput fiOne = new Validation.FormInput("form\\.input");
-    Validation.FormInput fiTwo = new Validation.FormInput("form\\.input");
+    ConfigValidator.ConfigInput fiOne = new ConfigValidator.ConfigInput("config\\.input");
+    ConfigValidator.ConfigInput fiTwo = new ConfigValidator.ConfigInput("config\\.input");
     assertEquals(fiOne, fiTwo);
 
     /* toString() method check */
-    assertEquals("form\\.input", fiOne.toString());
+    assertEquals("config\\.input", fiOne.toString());
 
-    // Checking null as input field (form validation)
-    Validation.FormInput fi3 = new FormInput("form");
-    assertEquals("form", fi3.getForm());
+    // Checking null as input field (config validation)
+    ConfigValidator.ConfigInput fi3 = new ConfigInput("config");
+    assertEquals("config", fi3.getConfig());
     assertNull(fi3.getInput());
-    assertEquals("form", fi3.toString());
+    assertEquals("config", fi3.toString());
 
   }
 
@@ -129,17 +133,17 @@ public class TestValidation {
    */
   public void testMessage() {
     /* Passing null */
-    Validation.Message msg1 = new Validation.Message(null, null);
+    ConfigValidator.Message msg1 = new ConfigValidator.Message(null, null);
     assertNull(msg1.getStatus());
     assertNull(msg1.getMessage());
 
     /* Passing values */
-    Validation.Message msg2 = new Validation.Message(Status.FINE, "sqoop");
+    ConfigValidator.Message msg2 = new ConfigValidator.Message(Status.FINE, "sqoop");
     assertEquals(Status.FINE, msg2.getStatus());
     assertEquals("sqoop", msg2.getMessage());
 
     /* Check for equal */
-    Validation.Message msg3 = new Validation.Message(Status.FINE, "sqoop");
+    ConfigValidator.Message msg3 = new ConfigValidator.Message(Status.FINE, "sqoop");
     assertEquals(msg2, msg3);
   }
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/common/src/test/java/org/apache/sqoop/validation/TestValidationRunner.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/org/apache/sqoop/validation/TestValidationRunner.java b/common/src/test/java/org/apache/sqoop/validation/TestValidationRunner.java
index 647abe0..579d1c5 100644
--- a/common/src/test/java/org/apache/sqoop/validation/TestValidationRunner.java
+++ b/common/src/test/java/org/apache/sqoop/validation/TestValidationRunner.java
@@ -18,8 +18,8 @@
 package org.apache.sqoop.validation;
 
 import org.apache.sqoop.model.ConfigurationClass;
-import org.apache.sqoop.model.Form;
-import org.apache.sqoop.model.FormClass;
+import org.apache.sqoop.model.Config;
+import org.apache.sqoop.model.ConfigClass;
 import org.apache.sqoop.model.Input;
 import org.apache.sqoop.model.Validator;
 import org.apache.sqoop.validation.validators.Contains;
@@ -35,18 +35,18 @@ import static org.junit.Assert.assertTrue;
  */
 public class TestValidationRunner {
 
-  @FormClass(validators = {@Validator(FormA.FormValidator.class)})
-  public static class FormA {
+  @ConfigClass(validators = {@Validator(ConfigA.ConfigValidator.class)})
+  public static class ConfigA {
     @Input(validators = {@Validator(NotNull.class)})
     String notNull;
 
-    public static class FormValidator extends AbstractValidator<FormA> {
+    public static class ConfigValidator extends AbstractValidator<ConfigA> {
       @Override
-      public void validate(FormA form) {
-        if(form.notNull == null) {
+      public void validate(ConfigA config) {
+        if(config.notNull == null) {
           addMessage(Status.UNACCEPTABLE, "null");
         }
-        if("error".equals(form.notNull)) {
+        if("error".equals(config.notNull)) {
           addMessage(Status.UNACCEPTABLE, "error");
         }
       }
@@ -54,83 +54,83 @@ public class TestValidationRunner {
   }
 
   @Test
-  public void testValidateForm() {
-    FormA form = new FormA();
-    ValidationRunner runner = new ValidationRunner();
-    ValidationResult result;
-
-    // Null string should fail on Input level and should not call form level validators
-    form.notNull = null;
-    result = runner.validateForm("formName", form);
+  public void testValidateConfig() {
+    ConfigA config = new ConfigA();
+    ConfigValidationRunner runner = new ConfigValidationRunner();
+    ConfigValidationResult result;
+
+    // Null string should fail on Input level and should not call config level validators
+    config.notNull = null;
+    result = runner.validateConfig("configName", config);
     assertEquals(Status.UNACCEPTABLE, result.getStatus());
     assertEquals(1, result.getMessages().size());
-    assertTrue(result.getMessages().containsKey("formName.notNull"));
+    assertTrue(result.getMessages().containsKey("configName.notNull"));
 
-    // String "error" should trigger form level error, but not Input level
-    form.notNull = "error";
-    result = runner.validateForm("formName", form);
+    // String "error" should trigger config level error, but not Input level
+    config.notNull = "error";
+    result = runner.validateConfig("configName", config);
     assertEquals(Status.UNACCEPTABLE, result.getStatus());
     assertEquals(1, result.getMessages().size());
-    assertTrue(result.getMessages().containsKey("formName"));
+    assertTrue(result.getMessages().containsKey("configName"));
 
     // Acceptable state
-    form.notNull = "This is truly random string";
-    result = runner.validateForm("formName", form);
+    config.notNull = "This is truly random string";
+    result = runner.validateConfig("configName", config);
     assertEquals(Status.FINE, result.getStatus());
     assertEquals(0, result.getMessages().size());
   }
 
-  @FormClass
-  public static class FormB {
+  @ConfigClass
+  public static class ConfigB {
     @Input(validators = {@Validator(NotNull.class), @Validator(NotEmpty.class)})
     String str;
   }
 
-  @FormClass
-  public static class FormC {
+  @ConfigClass
+  public static class ConfigC {
     @Input(validators = {@Validator(value = Contains.class, strArg = "findme")})
     String str;
   }
 
   @Test
   public void testMultipleValidatorsOnSingleInput() {
-    FormB form = new FormB();
-    ValidationRunner runner = new ValidationRunner();
-    ValidationResult result;
+    ConfigB config = new ConfigB();
+    ConfigValidationRunner runner = new ConfigValidationRunner();
+    ConfigValidationResult result;
 
-    form.str = null;
-    result = runner.validateForm("formName", form);
+    config.str = null;
+    result = runner.validateConfig("configName", config);
     assertEquals(Status.UNACCEPTABLE, result.getStatus());
     assertEquals(1, result.getMessages().size());
-    assertTrue(result.getMessages().containsKey("formName.str"));
-    assertEquals(2, result.getMessages().get("formName.str").size());
+    assertTrue(result.getMessages().containsKey("configName.str"));
+    assertEquals(2, result.getMessages().get("configName.str").size());
   }
 
   @Test
   public void testValidatorWithParameters() {
-    FormC form = new FormC();
-    ValidationRunner runner = new ValidationRunner();
-    ValidationResult result;
+    ConfigC config = new ConfigC();
+    ConfigValidationRunner runner = new ConfigValidationRunner();
+    ConfigValidationResult result;
 
     // Sub string not found
-    form.str = "Mordor";
-    result = runner.validateForm("formName", form);
+    config.str = "Mordor";
+    result = runner.validateConfig("configName", config);
     assertEquals(Status.UNACCEPTABLE, result.getStatus());
     assertEquals(1, result.getMessages().size());
-    assertTrue(result.getMessages().containsKey("formName.str"));
+    assertTrue(result.getMessages().containsKey("configName.str"));
 
     // Sub string found
-    form.str = "Morfindmedor";
-    result = runner.validateForm("formName", form);
+    config.str = "Morfindmedor";
+    result = runner.validateConfig("configName", config);
     assertEquals(Status.FINE, result.getStatus());
     assertEquals(0, result.getMessages().size());
   }
 
   @ConfigurationClass(validators = {@Validator(ConfigurationA.ClassValidator.class)})
   public static class ConfigurationA {
-    @Form FormA formA;
+    @Config ConfigA formA;
     public ConfigurationA() {
-      formA = new FormA();
+      formA = new ConfigA();
     }
 
     public static class ClassValidator extends AbstractValidator<ConfigurationA> {
@@ -149,24 +149,24 @@ public class TestValidationRunner {
   @Test
   public void testValidate() {
     ConfigurationA conf = new ConfigurationA();
-    ValidationRunner runner = new ValidationRunner();
-    ValidationResult result;
+    ConfigValidationRunner runner = new ConfigValidationRunner();
+    ConfigValidationResult result;
 
-    // Null string should fail on Input level and should not call form nor class level validators
+    // Null string should fail on Input level and should not call config nor class level validators
     conf.formA.notNull = null;
     result = runner.validate(conf);
     assertEquals(Status.UNACCEPTABLE, result.getStatus());
     assertEquals(1, result.getMessages().size());
     assertTrue(result.getMessages().containsKey("formA.notNull"));
 
-    // String "error" should trigger form level error, but not Input nor class level
+    // String "error" should trigger config level error, but not Input nor class level
     conf.formA.notNull = "error";
     result = runner.validate(conf);
     assertEquals(Status.UNACCEPTABLE, result.getStatus());
     assertEquals(1, result.getMessages().size());
     assertTrue(result.getMessages().containsKey("formA"));
 
-    // String "conf-error" should trigger class level error, but not Input nor Form level
+    // String "conf-error" should trigger class level error, but not Input nor Config level
     conf.formA.notNull = "conf-error";
     result = runner.validate(conf);
     assertEquals(Status.UNACCEPTABLE, result.getStatus());

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/common/src/test/java/org/apache/sqoop/validation/validators/TestClassAvailable.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/org/apache/sqoop/validation/validators/TestClassAvailable.java b/common/src/test/java/org/apache/sqoop/validation/validators/TestClassAvailable.java
index 62b2e0a..3a15274 100644
--- a/common/src/test/java/org/apache/sqoop/validation/validators/TestClassAvailable.java
+++ b/common/src/test/java/org/apache/sqoop/validation/validators/TestClassAvailable.java
@@ -17,19 +17,17 @@
  */
 package org.apache.sqoop.validation.validators;
 
-import org.apache.sqoop.validation.Message;
-import org.apache.sqoop.validation.Status;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 import java.util.List;
 
-import static org.junit.Assert.assertEquals;
+import org.apache.sqoop.validation.Message;
+import org.apache.sqoop.validation.Status;
+import org.junit.Test;
 
-/**
- */
 public class TestClassAvailable {
 
-  AbstractValidator validator = new ClassAvailable();
+  AbstractValidator<String> validator = new ClassAvailable();
 
   @Test
   public void test() {

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnector.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnector.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnector.java
index b4b6966..87ac2af 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnector.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnector.java
@@ -92,7 +92,7 @@ public class GenericJdbcConnector extends SqoopConnector {
   }
 
   @Override
-  public Validator getValidator() {
+  public Validator getConfigValidator() {
     return genericJdbcValidator;
   }
 

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnectorUpgrader.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnectorUpgrader.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnectorUpgrader.java
index 8deddb0..a069b3e 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnectorUpgrader.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcConnectorUpgrader.java
@@ -18,21 +18,20 @@
  */
 package org.apache.sqoop.connector.jdbc;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 import org.apache.log4j.Logger;
 import org.apache.sqoop.common.SqoopException;
 import org.apache.sqoop.connector.spi.RepositoryUpgrader;
-import org.apache.sqoop.model.MConnectionForms;
-import org.apache.sqoop.model.MForm;
+import org.apache.sqoop.model.MConfigList;
+import org.apache.sqoop.model.MConfig;
 import org.apache.sqoop.model.MInput;
-import org.apache.sqoop.model.MJobForms;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import org.apache.sqoop.model.MLinkConfig;
 
 public class GenericJdbcConnectorUpgrader extends RepositoryUpgrader {
-  private static final Logger LOG =
-    Logger.getLogger(GenericJdbcConnectorUpgrader.class);
+  private static final Logger LOG = Logger.getLogger(GenericJdbcConnectorUpgrader.class);
 
   /*
    * For now, there is no real upgrade. So copy all data over,
@@ -41,41 +40,40 @@ public class GenericJdbcConnectorUpgrader extends RepositoryUpgrader {
    */
 
   @Override
-  public void upgrade(MConnectionForms original,
-    MConnectionForms upgradeTarget) {
-    doUpgrade(original.getForms(), upgradeTarget.getForms());
+  public void upgrade(MLinkConfig original, MLinkConfig upgradeTarget) {
+    doUpgrade(original.getConfigs(), upgradeTarget.getConfigs());
   }
 
   @Override
-  public void upgrade(MJobForms original, MJobForms upgradeTarget) {
-    doUpgrade(original.getForms(), upgradeTarget.getForms());
+  public void upgrade(MConfigList original, MConfigList upgradeTarget) {
+    doUpgrade(original.getConfigs(), upgradeTarget.getConfigs());
   }
 
   @SuppressWarnings("unchecked")
-  private void doUpgrade(List<MForm> original, List<MForm> target) {
-    // Easier to find the form in the original forms list if we use a map.
-    // Since the constructor of MJobForms takes a list,
+  private void doUpgrade(List<MConfig> original, List<MConfig> target) {
+    // Easier to find the config in the original list if we use a map.
+    // Since the constructor takes a list,
     // index is not guaranteed to be the same, so we need to look for
     // equivalence
-    Map<String, MForm> formMap = new HashMap<String, MForm>();
-    for (MForm form : original) {
-      formMap.put(form.getName(), form);
+    Map<String, MConfig> configMap = new HashMap<String, MConfig>();
+    for (MConfig config : original) {
+      configMap.put(config.getName(), config);
     }
-    for (MForm form : target) {
-      List<MInput<?>> inputs = form.getInputs();
-      MForm originalForm = formMap.get(form.getName());
-      if (originalForm == null) {
-        LOG.warn("Form: '" + form.getName() + "' not present in old " +
-            "connector. So it and its inputs will not be transferred by the upgrader.");
+    for (MConfig config : target) {
+      List<MInput<?>> inputs = config.getInputs();
+      MConfig orginalConfig = configMap.get(config.getName());
+      if (orginalConfig == null) {
+        LOG.warn("Config: '" + config.getName() + "' not present in old " +
+            "generic JDBC connector. So it and its inputs will not be transferred by the upgrader.");
         continue;
       }
       for (MInput input : inputs) {
         try {
-          MInput originalInput = originalForm.getInput(input.getName());
+          MInput originalInput = orginalConfig.getInput(input.getName());
           input.setValue(originalInput.getValue());
         } catch (SqoopException ex) {
           LOG.warn("Input: '" + input.getName() + "' not present in old " +
-            "connector. So it will not be transferred by the upgrader.");
+            "generic JDBC connector. So it will not be transferred by the upgrader.");
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExtractor.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExtractor.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExtractor.java
index e52610a..af9320b 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExtractor.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExtractor.java
@@ -34,12 +34,12 @@ public class GenericJdbcExtractor extends Extractor<LinkConfiguration, FromJobCo
 
  private long rowsRead = 0;
   @Override
-  public void extract(ExtractorContext context, LinkConfiguration linkConf,
-      FromJobConfiguration fromJobConf, GenericJdbcPartition partition) {
-    String driver = linkConf.link.jdbcDriver;
-    String url = linkConf.link.connectionString;
-    String username = linkConf.link.username;
-    String password = linkConf.link.password;
+  public void extract(ExtractorContext context, LinkConfiguration linkConfig,
+      FromJobConfiguration fromJobConfig, GenericJdbcPartition partition) {
+    String driver = linkConfig.linkConfig.jdbcDriver;
+    String url = linkConfig.linkConfig.connectionString;
+    String username = linkConfig.linkConfig.username;
+    String password = linkConfig.linkConfig.password;
     GenericJdbcExecutor executor = new GenericJdbcExecutor(driver, url, username, password);
 
     String query = context.getString(GenericJdbcConnectorConstants.CONNECTOR_JDBC_FROM_DATA_SQL);

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcFromDestroyer.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcFromDestroyer.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcFromDestroyer.java
index d3a893f..3a783be 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcFromDestroyer.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcFromDestroyer.java
@@ -29,7 +29,7 @@ public class GenericJdbcFromDestroyer extends Destroyer<LinkConfiguration, FromJ
     Logger.getLogger(GenericJdbcFromDestroyer.class);
 
   @Override
-  public void destroy(DestroyerContext context, LinkConfiguration linkConf, FromJobConfiguration fromJobConf) {
+  public void destroy(DestroyerContext context, LinkConfiguration linkConfig, FromJobConfiguration fromJobConfig) {
     LOG.info("Running generic JDBC connector destroyer");
   }
 

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcFromInitializer.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcFromInitializer.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcFromInitializer.java
index 9d0c178..ef4ecc4 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcFromInitializer.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcFromInitializer.java
@@ -45,34 +45,34 @@ public class GenericJdbcFromInitializer extends Initializer<LinkConfiguration, F
   private GenericJdbcExecutor executor;
 
   @Override
-  public void initialize(InitializerContext context, LinkConfiguration linkConf, FromJobConfiguration fromJobConf) {
-    configureJdbcProperties(context.getContext(), linkConf, fromJobConf);
+  public void initialize(InitializerContext context, LinkConfiguration linkConfig, FromJobConfiguration fromJobConfig) {
+    configureJdbcProperties(context.getContext(), linkConfig, fromJobConfig);
     try {
-      configurePartitionProperties(context.getContext(), linkConf, fromJobConf);
-      configureTableProperties(context.getContext(), linkConf, fromJobConf);
+      configurePartitionProperties(context.getContext(), linkConfig, fromJobConfig);
+      configureTableProperties(context.getContext(), linkConfig, fromJobConfig);
     } finally {
       executor.close();
     }
   }
 
   @Override
-  public List<String> getJars(InitializerContext context, LinkConfiguration linkConf, FromJobConfiguration fromJobConf) {
+  public List<String> getJars(InitializerContext context, LinkConfiguration linkConfig, FromJobConfiguration fromJobConfig) {
     List<String> jars = new LinkedList<String>();
 
-    jars.add(ClassUtils.jarForClass(linkConf.link.jdbcDriver));
+    jars.add(ClassUtils.jarForClass(linkConfig.linkConfig.jdbcDriver));
 
     return jars;
   }
 
   @Override
-  public Schema getSchema(InitializerContext context, LinkConfiguration linkConf, FromJobConfiguration fromJobConf) {
-    configureJdbcProperties(context.getContext(), linkConf, fromJobConf);
+  public Schema getSchema(InitializerContext context, LinkConfiguration linkConfig, FromJobConfiguration fromJobConfig) {
+    configureJdbcProperties(context.getContext(), linkConfig, fromJobConfig);
 
-    String schemaName = fromJobConf.fromJobConfig.tableName;
+    String schemaName = fromJobConfig.fromJobConfig.tableName;
     if(schemaName == null) {
       schemaName = "Query";
-    } else if(fromJobConf.fromJobConfig.schemaName != null) {
-      schemaName = fromJobConf.fromJobConfig.schemaName + "." + schemaName;
+    } else if(fromJobConfig.fromJobConfig.schemaName != null) {
+      schemaName = fromJobConfig.fromJobConfig.schemaName + "." + schemaName;
     }
 
     Schema schema = new Schema(schemaName);
@@ -117,11 +117,11 @@ public class GenericJdbcFromInitializer extends Initializer<LinkConfiguration, F
     }
   }
 
-  private void configureJdbcProperties(MutableContext context, LinkConfiguration connectionConfig, FromJobConfiguration fromJobConfig) {
-    String driver = connectionConfig.link.jdbcDriver;
-    String url = connectionConfig.link.connectionString;
-    String username = connectionConfig.link.username;
-    String password = connectionConfig.link.password;
+  private void configureJdbcProperties(MutableContext context, LinkConfiguration linkConfig, FromJobConfiguration fromJobConfig) {
+    String driver = linkConfig.linkConfig.jdbcDriver;
+    String url = linkConfig.linkConfig.connectionString;
+    String username = linkConfig.linkConfig.username;
+    String password = linkConfig.linkConfig.password;
 
     assert driver != null;
     assert url != null;
@@ -129,7 +129,7 @@ public class GenericJdbcFromInitializer extends Initializer<LinkConfiguration, F
     executor = new GenericJdbcExecutor(driver, url, username, password);
   }
 
-  private void configurePartitionProperties(MutableContext context, LinkConfiguration connectionConfig, FromJobConfiguration fromJobConfig) {
+  private void configurePartitionProperties(MutableContext context, LinkConfiguration linkConfig, FromJobConfiguration fromJobConfig) {
     // ----- configure column name -----
 
     String partitionColumnName = fromJobConfig.fromJobConfig.partitionColumn;
@@ -234,7 +234,7 @@ public class GenericJdbcFromInitializer extends Initializer<LinkConfiguration, F
     }
   }
 
-  private void configureTableProperties(MutableContext context, LinkConfiguration connectionConfig, FromJobConfiguration fromJobConfig) {
+  private void configureTableProperties(MutableContext context, LinkConfiguration linkConfig, FromJobConfiguration fromJobConfig) {
     String dataSql;
     String fieldNames;
 

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcLoader.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcLoader.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcLoader.java
index 991e686..6340a70 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcLoader.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcLoader.java
@@ -30,11 +30,11 @@ public class GenericJdbcLoader extends Loader<LinkConfiguration, ToJobConfigurat
   private int batchesPerTransaction = DEFAULT_BATCHES_PER_TRANSACTION;
 
   @Override
-  public void load(LoaderContext context, LinkConfiguration linkConf, ToJobConfiguration toJobConf) throws Exception{
-    String driver = linkConf.link.jdbcDriver;
-    String url = linkConf.link.connectionString;
-    String username = linkConf.link.username;
-    String password = linkConf.link.password;
+  public void load(LoaderContext context, LinkConfiguration linkConfig, ToJobConfiguration toJobConfig) throws Exception{
+    String driver = linkConfig.linkConfig.jdbcDriver;
+    String url = linkConfig.linkConfig.connectionString;
+    String username = linkConfig.linkConfig.username;
+    String password = linkConfig.linkConfig.password;
     GenericJdbcExecutor executor = new GenericJdbcExecutor(driver, url, username, password);
     executor.setAutoCommit(false);
 

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcPartitioner.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcPartitioner.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcPartitioner.java
index 6b11228..2411169 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcPartitioner.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcPartitioner.java
@@ -47,7 +47,8 @@ public class GenericJdbcPartitioner extends Partitioner<LinkConfiguration, FromJ
   private Boolean partitionColumnNull;
 
   @Override
-  public List<Partition> getPartitions(PartitionerContext context,LinkConfiguration linkConf, FromJobConfiguration fromJobConf) {
+  public List<Partition> getPartitions(PartitionerContext context, LinkConfiguration linkConfig,
+      FromJobConfiguration fromJobConfig) {
     List<Partition> partitions = new LinkedList<Partition>();
 
     numberPartitions = context.getMaxPartitions();
@@ -56,7 +57,7 @@ public class GenericJdbcPartitioner extends Partitioner<LinkConfiguration, FromJ
     partitionMinValue = context.getString(GenericJdbcConnectorConstants.CONNECTOR_JDBC_PARTITION_MINVALUE);
     partitionMaxValue = context.getString(GenericJdbcConnectorConstants.CONNECTOR_JDBC_PARTITION_MAXVALUE);
 
-    partitionColumnNull = fromJobConf.fromJobConfig.partitionColumnNull;
+    partitionColumnNull = fromJobConfig.fromJobConfig.partitionColumnNull;
     if (partitionColumnNull == null) {
       partitionColumnNull = false;
     }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcToDestroyer.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcToDestroyer.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcToDestroyer.java
index 7bed1d9..e381651 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcToDestroyer.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcToDestroyer.java
@@ -28,26 +28,26 @@ public class GenericJdbcToDestroyer extends Destroyer<LinkConfiguration, ToJobCo
   private static final Logger LOG = Logger.getLogger(GenericJdbcToDestroyer.class);
 
   @Override
-  public void destroy(DestroyerContext context, LinkConfiguration linkConf, ToJobConfiguration toJobConf) {
+  public void destroy(DestroyerContext context, LinkConfiguration linkConfig, ToJobConfiguration toJobConfig) {
     LOG.info("Running generic JDBC connector destroyer");
 
-    final String tableName = toJobConf.toJobConfig.tableName;
-    final String stageTableName = toJobConf.toJobConfig.stageTableName;
+    final String tableName = toJobConfig.toJobConfig.tableName;
+    final String stageTableName = toJobConfig.toJobConfig.stageTableName;
     final boolean stageEnabled = stageTableName != null &&
       stageTableName.length() > 0;
     if(stageEnabled) {
-      moveDataToDestinationTable(linkConf,
+      moveDataToDestinationTable(linkConfig,
         context.isSuccess(), stageTableName, tableName);
     }
   }
 
-  private void moveDataToDestinationTable(LinkConfiguration linkConf,
+  private void moveDataToDestinationTable(LinkConfiguration linkConfig,
     boolean success, String stageTableName, String tableName) {
     GenericJdbcExecutor executor =
-      new GenericJdbcExecutor(linkConf.link.jdbcDriver,
-        linkConf.link.connectionString,
-        linkConf.link.username,
-        linkConf.link.password);
+      new GenericJdbcExecutor(linkConfig.linkConfig.jdbcDriver,
+        linkConfig.linkConfig.connectionString,
+        linkConfig.linkConfig.username,
+        linkConfig.linkConfig.password);
     try {
       if(success) {
         LOG.info("Job completed, transferring data from stage fromTable to " +

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcToInitializer.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcToInitializer.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcToInitializer.java
index 5d0ec93..1747347 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcToInitializer.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcToInitializer.java
@@ -43,35 +43,35 @@ public class GenericJdbcToInitializer extends Initializer<LinkConfiguration, ToJ
     Logger.getLogger(GenericJdbcToInitializer.class);
 
   @Override
-  public void initialize(InitializerContext context, LinkConfiguration linkConf, ToJobConfiguration toJobConf) {
-    configureJdbcProperties(context.getContext(), linkConf, toJobConf);
+  public void initialize(InitializerContext context, LinkConfiguration linkConfig, ToJobConfiguration toJobConfig) {
+    configureJdbcProperties(context.getContext(), linkConfig, toJobConfig);
     try {
-      configureTableProperties(context.getContext(), linkConf, toJobConf);
+      configureTableProperties(context.getContext(), linkConfig, toJobConfig);
     } finally {
       executor.close();
     }
   }
 
   @Override
-  public List<String> getJars(InitializerContext context, LinkConfiguration linkConf, ToJobConfiguration toJobConf) {
+  public List<String> getJars(InitializerContext context, LinkConfiguration linkConfig, ToJobConfiguration toJobConfig) {
     List<String> jars = new LinkedList<String>();
-    jars.add(ClassUtils.jarForClass(linkConf.link.jdbcDriver));
+    jars.add(ClassUtils.jarForClass(linkConfig.linkConfig.jdbcDriver));
     return jars;
   }
 
   @Override
-  public Schema getSchema(InitializerContext context, LinkConfiguration linkConf, ToJobConfiguration toJobConf) {
-    configureJdbcProperties(context.getContext(), linkConf, toJobConf);
+  public Schema getSchema(InitializerContext context, LinkConfiguration linkConfig, ToJobConfiguration toJobConfig) {
+    configureJdbcProperties(context.getContext(), linkConfig, toJobConfig);
 
-    String schemaName = toJobConf.toJobConfig.tableName;
+    String schemaName = toJobConfig.toJobConfig.tableName;
 
     if (schemaName == null) {
       throw new SqoopException(GenericJdbcConnectorError.GENERIC_JDBC_CONNECTOR_0019,
           "Table name extraction not supported yet.");
     }
 
-    if(toJobConf.toJobConfig.schemaName != null) {
-      schemaName = toJobConf.toJobConfig.schemaName + "." + schemaName;
+    if(toJobConfig.toJobConfig.schemaName != null) {
+      schemaName = toJobConfig.toJobConfig.schemaName + "." + schemaName;
     }
 
     Schema schema = new Schema(schemaName);
@@ -110,11 +110,11 @@ public class GenericJdbcToInitializer extends Initializer<LinkConfiguration, ToJ
     }
   }
 
-  private void configureJdbcProperties(MutableContext context, LinkConfiguration linkConf, ToJobConfiguration toJobConf) {
-    String driver = linkConf.link.jdbcDriver;
-    String url = linkConf.link.connectionString;
-    String username = linkConf.link.username;
-    String password = linkConf.link.password;
+  private void configureJdbcProperties(MutableContext context, LinkConfiguration linkConfig, ToJobConfiguration toJobConfig) {
+    String driver = linkConfig.linkConfig.jdbcDriver;
+    String url = linkConfig.linkConfig.connectionString;
+    String username = linkConfig.linkConfig.username;
+    String password = linkConfig.linkConfig.password;
 
     assert driver != null;
     assert url != null;
@@ -122,7 +122,7 @@ public class GenericJdbcToInitializer extends Initializer<LinkConfiguration, ToJ
     executor = new GenericJdbcExecutor(driver, url, username, password);
   }
 
-  private void configureTableProperties(MutableContext context, LinkConfiguration linkConf, ToJobConfiguration toJobConfig) {
+  private void configureTableProperties(MutableContext context, LinkConfiguration linkConfig, ToJobConfiguration toJobConfig) {
     String dataSql;
 
     String schemaName = toJobConfig.toJobConfig.schemaName;

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcValidator.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcValidator.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcValidator.java
index ad1ee5c..93989a4 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcValidator.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcValidator.java
@@ -22,7 +22,7 @@ import org.apache.sqoop.connector.jdbc.configuration.LinkConfiguration;
 import org.apache.sqoop.connector.jdbc.configuration.FromJobConfiguration;
 import org.apache.sqoop.connector.jdbc.configuration.ToJobConfiguration;
 import org.apache.sqoop.validation.Status;
-import org.apache.sqoop.validation.Validation;
+import org.apache.sqoop.validation.ConfigValidator;
 import org.apache.sqoop.validation.Validator;
 
 import java.sql.DriverManager;
@@ -34,30 +34,30 @@ import java.sql.SQLException;
 public class GenericJdbcValidator extends Validator {
 
   @Override
-  public Validation validateLink(Object configuration) {
-    Validation validation = new Validation(LinkConfiguration.class);
-    LinkConfiguration linkConf = (LinkConfiguration)configuration;
+  public ConfigValidator validateConfigForLink(Object configuration) {
+    ConfigValidator validation = new ConfigValidator(LinkConfiguration.class);
+    LinkConfiguration linkConfig = (LinkConfiguration)configuration;
 
-    if(linkConf.link.jdbcDriver == null) {
+    if(linkConfig.linkConfig.jdbcDriver == null) {
       validation.addMessage(Status.UNACCEPTABLE, "link", "jdbcDriver", "Driver can't be empty");
     } else {
       try {
-        Class.forName(linkConf.link.jdbcDriver);
+        Class.forName(linkConfig.linkConfig.jdbcDriver);
       } catch (ClassNotFoundException e) {
         validation.addMessage(Status.UNACCEPTABLE, "link", "jdbcDriver", "Can't load specified driver");
       }
     }
 
-    if(linkConf.link.connectionString == null) {
+    if(linkConfig.linkConfig.connectionString == null) {
       validation.addMessage(Status.UNACCEPTABLE, "link", "connectionString", "JDBC URL can't be empty");
-    } else if(!linkConf.link.connectionString.startsWith("jdbc:")) {
+    } else if(!linkConfig.linkConfig.connectionString.startsWith("jdbc:")) {
       validation.addMessage(Status.UNACCEPTABLE, "link", "connectionString", "This do not seem as a valid JDBC URL");
     }
 
     // See if we can connect to the database
     try {
-      DriverManager.getConnection(linkConf.link.connectionString,
-        linkConf.link.username, linkConf.link.password);
+      DriverManager.getConnection(linkConfig.linkConfig.connectionString,
+        linkConfig.linkConfig.username, linkConfig.linkConfig.password);
     } catch (SQLException e) {
       validation.addMessage(Status.ACCEPTABLE, "link", "Can't connect to the database with given credentials: " + e.getMessage());
     }
@@ -67,7 +67,7 @@ public class GenericJdbcValidator extends Validator {
   }
 
   @Override
-  public Validation validateJob(Object jobConfiguration) {
+  public ConfigValidator validateConfigForJob(Object jobConfiguration) {
     if (jobConfiguration instanceof FromJobConfiguration) {
       return validateFromJobConfiguration((FromJobConfiguration)jobConfiguration);
     } else if (jobConfiguration instanceof ToJobConfiguration) {
@@ -78,8 +78,8 @@ public class GenericJdbcValidator extends Validator {
     }
   }
 
-  private Validation validateToJobConfiguration(ToJobConfiguration configuration) {
-    Validation validation = new Validation(FromJobConfiguration.class);
+  private ConfigValidator validateToJobConfiguration(ToJobConfiguration configuration) {
+    ConfigValidator validation = new ConfigValidator(FromJobConfiguration.class);
 
     if(configuration.toJobConfig.tableName == null && configuration.toJobConfig.sql == null) {
       validation.addMessage(Status.UNACCEPTABLE, "toJobConfig", "Either table name or SQL must be specified");
@@ -102,8 +102,8 @@ public class GenericJdbcValidator extends Validator {
     return validation;
   }
 
-  private Validation validateFromJobConfiguration(FromJobConfiguration configuration) {
-    Validation validation = new Validation(FromJobConfiguration.class);
+  private ConfigValidator validateFromJobConfiguration(FromJobConfiguration configuration) {
+    ConfigValidator validation = new ConfigValidator(FromJobConfiguration.class);
 
     if(configuration.fromJobConfig.tableName == null && configuration.fromJobConfig.sql == null) {
       validation.addMessage(Status.UNACCEPTABLE, "fromJobConfig", "Either table name or SQL must be specified");

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfig.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfig.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfig.java
index 8b23144..12ceb21 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfig.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfig.java
@@ -18,7 +18,7 @@
 package org.apache.sqoop.connector.jdbc.configuration;
 
 import org.apache.sqoop.connector.jdbc.GenericJdbcConnectorConstants;
-import org.apache.sqoop.model.FormClass;
+import org.apache.sqoop.model.ConfigClass;
 import org.apache.sqoop.model.Input;
 import org.apache.sqoop.model.Validator;
 import org.apache.sqoop.validation.Status;
@@ -28,7 +28,7 @@ import org.apache.sqoop.validation.validators.NullOrContains;
 /**
  *
  */
-@FormClass( validators = {@Validator(FromJobConfig.FormValidator.class)})
+@ConfigClass( validators = {@Validator(FromJobConfig.ConfigValidator.class)})
 public class FromJobConfig {
   @Input(size = 50)
   public String schemaName;
@@ -51,16 +51,16 @@ public class FromJobConfig {
   @Input(size = 50)
   public String boundaryQuery;
 
-  public static class FormValidator extends AbstractValidator<FromJobConfig> {
+  public static class ConfigValidator extends AbstractValidator<FromJobConfig> {
     @Override
-    public void validate(FromJobConfig form) {
-      if(form.tableName == null && form.sql == null) {
+    public void validate(FromJobConfig config) {
+      if(config.tableName == null && config.sql == null) {
         addMessage(Status.UNACCEPTABLE, "Either table name or SQL must be specified");
       }
-      if(form.tableName != null && form.sql != null) {
+      if(config.tableName != null && config.sql != null) {
         addMessage(Status.UNACCEPTABLE, "Both table name and SQL cannot be specified");
       }
-      if(form.schemaName != null && form.sql != null) {
+      if(config.schemaName != null && config.sql != null) {
         addMessage(Status.UNACCEPTABLE, "Both schema name and SQL cannot be specified");
       }
     }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfiguration.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfiguration.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfiguration.java
index b036421..39e8edd 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfiguration.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/FromJobConfiguration.java
@@ -18,14 +18,14 @@
 package org.apache.sqoop.connector.jdbc.configuration;
 
 import org.apache.sqoop.model.ConfigurationClass;
-import org.apache.sqoop.model.Form;
+import org.apache.sqoop.model.Config;
 
 /**
  *
  */
 @ConfigurationClass
 public class FromJobConfiguration {
-  @Form public FromJobConfig fromJobConfig;
+  @Config public FromJobConfig fromJobConfig;
 
   public FromJobConfiguration() {
     fromJobConfig = new FromJobConfig();

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/LinkConfig.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/LinkConfig.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/LinkConfig.java
index 7b76eeb..be86855 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/LinkConfig.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/LinkConfig.java
@@ -17,7 +17,7 @@
  */
 package org.apache.sqoop.connector.jdbc.configuration;
 
-import org.apache.sqoop.model.FormClass;
+import org.apache.sqoop.model.ConfigClass;
 import org.apache.sqoop.model.Input;
 import org.apache.sqoop.model.Validator;
 import org.apache.sqoop.validation.Status;
@@ -33,7 +33,7 @@ import java.util.Map;
 /**
  *
  */
-@FormClass(validators = {@Validator(LinkConfig.FormValidator.class)})
+@ConfigClass(validators = {@Validator(LinkConfig.ConfigValidator.class)})
 public class LinkConfig {
   @Input(size = 128, validators = {@Validator(NotEmpty.class), @Validator(ClassAvailable.class)} )
   public String jdbcDriver;
@@ -50,7 +50,7 @@ public class LinkConfig {
   @Input
   public Map<String, String> jdbcProperties;
 
-  public static class FormValidator extends AbstractValidator<LinkConfig> {
+  public static class ConfigValidator extends AbstractValidator<LinkConfig> {
     @Override
     public void validate(LinkConfig linkConfig) {
       // See if we can connect to the database

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/LinkConfiguration.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/LinkConfiguration.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/LinkConfiguration.java
index 7d614f7..ed55bff 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/LinkConfiguration.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/LinkConfiguration.java
@@ -18,7 +18,7 @@
 package org.apache.sqoop.connector.jdbc.configuration;
 
 import org.apache.sqoop.model.ConfigurationClass;
-import org.apache.sqoop.model.Form;
+import org.apache.sqoop.model.Config;
 
 /**
  *
@@ -26,9 +26,9 @@ import org.apache.sqoop.model.Form;
 @ConfigurationClass
 public class LinkConfiguration {
 
-  @Form public LinkConfig link;
+  @Config public LinkConfig linkConfig;
 
   public LinkConfiguration() {
-    link = new LinkConfig();
+    linkConfig = new LinkConfig();
   }
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/ToJobConfig.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/ToJobConfig.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/ToJobConfig.java
index a42a6ec..2428601 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/ToJobConfig.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/ToJobConfig.java
@@ -17,7 +17,7 @@
  */
 package org.apache.sqoop.connector.jdbc.configuration;
 
-import org.apache.sqoop.model.FormClass;
+import org.apache.sqoop.model.ConfigClass;
 import org.apache.sqoop.model.Input;
 import org.apache.sqoop.model.Validator;
 import org.apache.sqoop.validation.Status;
@@ -26,7 +26,7 @@ import org.apache.sqoop.validation.validators.AbstractValidator;
 /**
  *
  */
-@FormClass(validators = {@Validator(ToJobConfig.FormValidator.class)})
+@ConfigClass(validators = {@Validator(ToJobConfig.ConfigValidator.class)})
 public class ToJobConfig {
   @Input(size = 50)   public String schemaName;
   @Input(size = 2000) public String tableName;
@@ -35,19 +35,19 @@ public class ToJobConfig {
   @Input(size = 2000) public String stageTableName;
   @Input              public Boolean clearStageTable;
 
-  public static class FormValidator extends AbstractValidator<ToJobConfig> {
+  public static class ConfigValidator extends AbstractValidator<ToJobConfig> {
     @Override
-    public void validate(ToJobConfig form) {
-      if(form.tableName == null && form.sql == null) {
+    public void validate(ToJobConfig config) {
+      if(config.tableName == null && config.sql == null) {
         addMessage(Status.UNACCEPTABLE, "Either table name or SQL must be specified");
       }
-      if(form.tableName != null && form.sql != null) {
+      if(config.tableName != null && config.sql != null) {
         addMessage(Status.UNACCEPTABLE, "Both table name and SQL cannot be specified");
       }
-      if(form.tableName == null && form.stageTableName != null) {
+      if(config.tableName == null && config.stageTableName != null) {
         addMessage(Status.UNACCEPTABLE, "Stage table name cannot be specified without specifying table name");
       }
-      if(form.stageTableName == null && form.clearStageTable != null) {
+      if(config.stageTableName == null && config.clearStageTable != null) {
         addMessage(Status.UNACCEPTABLE, "Clear stage table cannot be specified without specifying name of the stage table.");
       }
     }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/ToJobConfiguration.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/ToJobConfiguration.java b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/ToJobConfiguration.java
index ad68681..fd5d54b 100644
--- a/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/ToJobConfiguration.java
+++ b/connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/configuration/ToJobConfiguration.java
@@ -18,14 +18,14 @@
 package org.apache.sqoop.connector.jdbc.configuration;
 
 import org.apache.sqoop.model.ConfigurationClass;
-import org.apache.sqoop.model.Form;
+import org.apache.sqoop.model.Config;
 
 /**
  *
  */
 @ConfigurationClass
 public class ToJobConfiguration {
-  @Form public ToJobConfig toJobConfig;
+  @Config public ToJobConfig toJobConfig;
 
   public ToJobConfiguration() {
     toJobConfig = new ToJobConfig();

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/main/resources/generic-jdbc-connector-config.properties
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/main/resources/generic-jdbc-connector-config.properties b/connector/connector-generic-jdbc/src/main/resources/generic-jdbc-connector-config.properties
index 921ac28..c535e9b 100644
--- a/connector/connector-generic-jdbc/src/main/resources/generic-jdbc-connector-config.properties
+++ b/connector/connector-generic-jdbc/src/main/resources/generic-jdbc-connector-config.properties
@@ -18,33 +18,33 @@
 ############################
 # Link Config
 #
-link.label = Link configuration
-link.help = You must supply the information requested in order to \
+linkConfig.label = Link configuration
+linkConfig.help = You must supply the information requested in order to \
                    create a connection object.
 
 # jdbc driver
-link.jdbcDriver.label = JDBC Driver Class
-link.jdbcDriver.help = Enter the fully qualified class name of the JDBC \
+linkConfig.jdbcDriver.label = JDBC Driver Class
+linkConfig.jdbcDriver.help = Enter the fully qualified class name of the JDBC \
                    driver that will be used for establishing this connection.
 
 # connect string
-link.connectionString.label = JDBC Connection String
-link.connectionString.help = Enter the value of JDBC connection string to be \
+linkConfig.connectionString.label = JDBC Connection String
+linkConfig.connectionString.help = Enter the value of JDBC connection string to be \
                    used by this connector for creating connections.
 
 # username string
-link.username.label = Username
-link.username.help = Enter the username to be used for connecting to the \
+linkConfig.username.label = Username
+linkConfig.username.help = Enter the username to be used for connecting to the \
                    database.
 
 # password string
-link.password.label = Password
-link.password.help = Enter the password to be used for connecting to the \
+linkConfig.password.label = Password
+linkConfig.password.help = Enter the password to be used for connecting to the \
                    database.
 
 # jdbc properties
-link.jdbcProperties.label = JDBC Connection Properties
-link.jdbcProperties.help = Enter any JDBC properties that should be \
+linkConfig.jdbcProperties.label = JDBC Connection Properties
+linkConfig.jdbcProperties.help = Enter any JDBC properties that should be \
                    supplied during the creation of connection.
 
 # From Job Config

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/test/java/org/apache/sqoop/connector/jdbc/GenericJdbcExecutorTest.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/test/java/org/apache/sqoop/connector/jdbc/GenericJdbcExecutorTest.java b/connector/connector-generic-jdbc/src/test/java/org/apache/sqoop/connector/jdbc/GenericJdbcExecutorTest.java
index 1022370..61846b7 100644
--- a/connector/connector-generic-jdbc/src/test/java/org/apache/sqoop/connector/jdbc/GenericJdbcExecutorTest.java
+++ b/connector/connector-generic-jdbc/src/test/java/org/apache/sqoop/connector/jdbc/GenericJdbcExecutorTest.java
@@ -60,7 +60,6 @@ public class GenericJdbcExecutorTest {
   }
 
   @Test
-  @SuppressWarnings("unchecked")
   public void testDeleteTableData() throws Exception {
     executor.deleteTableData(table);
     assertEquals("Table " + table + " is expected to be empty.",
@@ -68,7 +67,6 @@ public class GenericJdbcExecutorTest {
   }
 
   @Test
-  @SuppressWarnings("unchecked")
   public void testMigrateData() throws Exception {
     assertEquals("Table " + emptyTable + " is expected to be empty.",
       0, executor.getTableRowCount(emptyTable));
@@ -86,7 +84,6 @@ public class GenericJdbcExecutorTest {
   }
 
   @Test
-  @SuppressWarnings("unchecked")
   public void testGetTableRowCount() throws Exception {
     assertEquals("Table " + table + " is expected to be empty.",
       NUMBER_OF_ROWS, executor.getTableRowCount(table));

http://git-wip-us.apache.org/repos/asf/sqoop/blob/f63c080d/connector/connector-generic-jdbc/src/test/java/org/apache/sqoop/connector/jdbc/TestExtractor.java
----------------------------------------------------------------------
diff --git a/connector/connector-generic-jdbc/src/test/java/org/apache/sqoop/connector/jdbc/TestExtractor.java b/connector/connector-generic-jdbc/src/test/java/org/apache/sqoop/connector/jdbc/TestExtractor.java
index fbdf9c6..d1e6805 100644
--- a/connector/connector-generic-jdbc/src/test/java/org/apache/sqoop/connector/jdbc/TestExtractor.java
+++ b/connector/connector-generic-jdbc/src/test/java/org/apache/sqoop/connector/jdbc/TestExtractor.java
@@ -74,10 +74,10 @@ public class TestExtractor {
   public void testQuery() throws Exception {
     MutableContext context = new MutableMapContext();
 
-    LinkConfiguration connectionConfig = new LinkConfiguration();
+    LinkConfiguration linkConfig = new LinkConfiguration();
 
-    connectionConfig.link.jdbcDriver = GenericJdbcTestConstants.DRIVER;
-    connectionConfig.link.connectionString = GenericJdbcTestConstants.URL;
+    linkConfig.linkConfig.jdbcDriver = GenericJdbcTestConstants.DRIVER;
+    linkConfig.linkConfig.connectionString = GenericJdbcTestConstants.URL;
 
     FromJobConfiguration jobConfig = new FromJobConfiguration();
 
@@ -92,25 +92,25 @@ public class TestExtractor {
 
     partition = new GenericJdbcPartition();
     partition.setConditions("-50.0 <= DCOL AND DCOL < -16.6666666666666665");
-    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);
+    extractor.extract(extractorContext, linkConfig, jobConfig, partition);
 
     partition = new GenericJdbcPartition();
     partition.setConditions("-16.6666666666666665 <= DCOL AND DCOL < 16.666666666666667");
-    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);
+    extractor.extract(extractorContext, linkConfig, jobConfig, partition);
 
     partition = new GenericJdbcPartition();
     partition.setConditions("16.666666666666667 <= DCOL AND DCOL <= 50.0");
-    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);
+    extractor.extract(extractorContext, linkConfig, jobConfig, partition);
   }
 
   @Test
   public void testSubquery() throws Exception {
     MutableContext context = new MutableMapContext();
 
-    LinkConfiguration connectionConfig = new LinkConfiguration();
+    LinkConfiguration linkConfig = new LinkConfiguration();
 
-    connectionConfig.link.jdbcDriver = GenericJdbcTestConstants.DRIVER;
-    connectionConfig.link.connectionString = GenericJdbcTestConstants.URL;
+    linkConfig.linkConfig.jdbcDriver = GenericJdbcTestConstants.DRIVER;
+    linkConfig.linkConfig.connectionString = GenericJdbcTestConstants.URL;
 
     FromJobConfiguration jobConfig = new FromJobConfiguration();
 
@@ -127,15 +127,15 @@ public class TestExtractor {
 
     partition = new GenericJdbcPartition();
     partition.setConditions("-50 <= ICOL AND ICOL < -16");
-    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);
+    extractor.extract(extractorContext, linkConfig, jobConfig, partition);
 
     partition = new GenericJdbcPartition();
     partition.setConditions("-16 <= ICOL AND ICOL < 17");
-    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);
+    extractor.extract(extractorContext, linkConfig, jobConfig, partition);
 
     partition = new GenericJdbcPartition();
     partition.setConditions("17 <= ICOL AND ICOL < 50");
-    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);
+    extractor.extract(extractorContext, linkConfig, jobConfig, partition);
   }
 
   public class DummyWriter extends DataWriter {


Mime
View raw message