sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [39/52] [abbrv] SQOOP-1498: Sqoop2: Repository Object refactoring (objects prefixed with M)
Date Fri, 10 Oct 2014 02:52:08 GMT
http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java
----------------------------------------------------------------------
diff --git a/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java b/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java
index ad42901..951d9b4 100644
--- a/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java
+++ b/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java
@@ -48,17 +48,17 @@ import static org.apache.sqoop.repository.derby.DerbySchemaConstants.*;
  * </pre>
  * </p>
  * <p>
- * <strong>SQ_FORM</strong>: Form details.
+ * <strong>SQ_CONFIG</strong>: Config details.
  * <pre>
  *    +----------------------------------+
- *    | SQ_FORM                          |
+ *    | SQ_CONFIG                          |
  *    +----------------------------------+
- *    | SQF_ID: BIGINT PK AUTO-GEN       |
- *    | SQF_CONNECTOR: BIGINT            | FK SQ_CONNECTOR(SQC_ID),NULL for framework
- *    | SQF_DIRECTION: VARCHAR(32)       | "FROM"|"TO"|NULL
- *    | SQF_NAME: VARCHAR(64)            |
- *    | SQF_TYPE: VARCHAR(32)            | "CONNECTION"|"JOB"
- *    | SQF_INDEX: SMALLINT              |
+ *    | SQ_CFG_ID: BIGINT PK AUTO-GEN       |
+ *    | SQ_CFG_OWNER: BIGINT                | FK SQ_CFG_OWNER(SQC_ID),NULL for driver
+ *    | SQ_CFG_DIRECTION: VARCHAR(32)       | "FROM"|"TO"|NULL
+ *    | SQ_CFG_NAME: VARCHAR(64)            |
+ *    | SQ_CFG_TYPE: VARCHAR(32)            | "LINK"|"JOB"
+ *    | SQ_CFG_INDEX: SMALLINT              |
  *    +----------------------------------+
  * </pre>
  * </p>
@@ -70,7 +70,7 @@ import static org.apache.sqoop.repository.derby.DerbySchemaConstants.*;
  *    +----------------------------+
  *    | SQI_ID: BIGINT PK AUTO-GEN |
  *    | SQI_NAME: VARCHAR(64)      |
- *    | SQI_FORM: BIGINT           | FK SQ_FORM(SQF_ID)
+ *    | SQI_CONFIG: BIGINT           | FK SQ_CONFIG(SQ_CFG_ID)
  *    | SQI_INDEX: SMALLINT        |
  *    | SQI_TYPE: VARCHAR(32)      | "STRING"|"MAP"
  *    | SQI_STRMASK: BOOLEAN       |
@@ -80,19 +80,19 @@ import static org.apache.sqoop.repository.derby.DerbySchemaConstants.*;
  * </pre>
  * </p>
  * <p>
- * <strong>SQ_CONNECTION</strong>: Stored connections
+ * <strong>SQ_LINK</strong>: Stored connections
  * <pre>
  *    +--------------------------------+
- *    | SQ_CONNECTION                  |
+ *    | SQ_LINK                  |
  *    +--------------------------------+
- *    | SQN_ID: BIGINT PK AUTO-GEN     |
- *    | SQN_NAME: VARCHAR(64)          |
- *    | SQN_CONNECTOR: BIGINT          | FK SQ_CONNECTOR(SQC_ID)
- *    | SQN_CREATION_USER: VARCHAR(32) |
- *    | SQN_CREATION_DATE: TIMESTAMP   |
- *    | SQN_UPDATE_USER: VARCHAR(32)   |
- *    | SQN_UPDATE_DATE: TIMESTAMP     |
- *    | SQN_ENABLED: BOOLEAN           |
+ *    | SQ_LNK_ID: BIGINT PK AUTO-GEN     |
+ *    | SQ_LNK_NAME: VARCHAR(64)          |
+ *    | SQ_LNK_CONNECTOR: BIGINT          | FK SQ_CONNECTOR(SQC_ID)
+ *    | SQ_LNK_CREATION_USER: VARCHAR(32) |
+ *    | SQ_LNK_CREATION_DATE: TIMESTAMP   |
+ *    | SQ_LNK_UPDATE_USER: VARCHAR(32)   |
+ *    | SQ_LNK_UPDATE_DATE: TIMESTAMP     |
+ *    | SQ_LNK_ENABLED: BOOLEAN           |
  *    +--------------------------------+
  * </pre>
  * </p>
@@ -104,8 +104,8 @@ import static org.apache.sqoop.repository.derby.DerbySchemaConstants.*;
  *    +--------------------------------+
  *    | SQB_ID: BIGINT PK AUTO-GEN     |
  *    | SQB_NAME: VARCHAR(64)          |
- *    | SQB_FROM_CONNECTION: BIGINT    | FK SQ_CONNECTION(SQN_ID)
- *    | SQB_TO_CONNECTION: BIGINT      | FK SQ_CONNECTION(SQN_ID)
+ *    | SQB_FROM_LINK: BIGINT    | FK SQ_LINK(SQ_LNK_ID)
+ *    | SQB_TO_LINK: BIGINT      | FK SQ_LINK(SQ_LNK_ID)
  *    | SQB_CREATION_USER: VARCHAR(32) |
  *    | SQB_CREATION_DATE: TIMESTAMP   |
  *    | SQB_UPDATE_USER: VARCHAR(32)   |
@@ -115,14 +115,14 @@ import static org.apache.sqoop.repository.derby.DerbySchemaConstants.*;
  * </pre>
  * </p>
  * <p>
- * <strong>SQ_CONNECTION_INPUT</strong>: N:M relationship connection and input
+ * <strong>SQ_LINK_INPUT</strong>: N:M relationship link and input
  * <pre>
  *    +----------------------------+
- *    | SQ_CONNECTION_INPUT        |
+ *    | SQ_LINK_INPUT        |
  *    +----------------------------+
- *    | SQNI_CONNECTION: BIGINT PK | FK SQ_CONNECTION(SQN_ID)
- *    | SQNI_INPUT: BIGINT PK      | FK SQ_INPUT(SQI_ID)
- *    | SQNI_VALUE: LONG VARCHAR   |
+ *    | SQ_LNKI_LINK: BIGINT PK | FK SQ_LINK(SQ_LNK_ID)
+ *    | SQ_LNKI_INPUT: BIGINT PK      | FK SQ_INPUT(SQI_ID)
+ *    | SQ_LNKI_VALUE: LONG VARCHAR   |
  *    +----------------------------+
  * </pre>
  * </p>
@@ -221,17 +221,17 @@ public final class DerbySchemaQuery {
       + COLUMN_SQC_VERSION + " VARCHAR(64) "
       + ")";
 
-  // DDL: Create table SQ_FORM
-  public static final String QUERY_CREATE_TABLE_SQ_FORM =
-      "CREATE TABLE " + TABLE_SQ_FORM + " ("
-      + COLUMN_SQF_ID + " BIGINT GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY, "
-      + COLUMN_SQF_CONNECTOR + " BIGINT, "
-      + COLUMN_SQF_OPERATION + " VARCHAR(32), "
-      + COLUMN_SQF_NAME + " VARCHAR(64), "
-      + COLUMN_SQF_TYPE + " VARCHAR(32), "
-      + COLUMN_SQF_INDEX + " SMALLINT, "
-      + "CONSTRAINT " + CONSTRAINT_SQF_SQC + " "
-        + "FOREIGN KEY (" + COLUMN_SQF_CONNECTOR + ") "
+  // DDL: Create table SQ_CONFIG ( It stores the configs defined by every connector), if connector is null then it is driver config
+  public static final String QUERY_CREATE_TABLE_SQ_CONFIG =
+      "CREATE TABLE " + TABLE_SQ_CONFIG + " ("
+      + COLUMN_SQ_CFG_ID + " BIGINT GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY, "
+      + COLUMN_SQ_CFG_OWNER + " BIGINT, "
+      + COLUMN_SQ_CFG_OPERATION + " VARCHAR(32), "
+      + COLUMN_SQ_CFG_NAME + " VARCHAR(64), "
+      + COLUMN_SQ_CFG_TYPE + " VARCHAR(32), "
+      + COLUMN_SQ_CFG_INDEX + " SMALLINT, "
+      + "CONSTRAINT " + CONSTRAINT_SQ_CFG_SQC + " "
+        + "FOREIGN KEY (" + COLUMN_SQ_CFG_OWNER + ") "
           + "REFERENCES " + TABLE_SQ_CONNECTOR + " (" + COLUMN_SQC_ID + ")"
       + ")";
 
@@ -240,60 +240,60 @@ public final class DerbySchemaQuery {
       "CREATE TABLE " + TABLE_SQ_INPUT + " ("
       + COLUMN_SQI_ID + " BIGINT GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY, "
       + COLUMN_SQI_NAME + " VARCHAR(64), "
-      + COLUMN_SQI_FORM + " BIGINT, "
+      + COLUMN_SQI_CONFIG + " BIGINT, "
       + COLUMN_SQI_INDEX + " SMALLINT, "
       + COLUMN_SQI_TYPE + " VARCHAR(32), "
       + COLUMN_SQI_STRMASK + " BOOLEAN, "
       + COLUMN_SQI_STRLENGTH + " SMALLINT, "
       + COLUMN_SQI_ENUMVALS + " VARCHAR(100),"
-      + "CONSTRAINT " + CONSTRAINT_SQI_SQF + " "
-        + "FOREIGN KEY (" + COLUMN_SQI_FORM + ") "
-          + "REFERENCES " + TABLE_SQ_FORM + " (" + COLUMN_SQF_ID + ")"
+      + "CONSTRAINT " + CONSTRAINT_SQI_SQ_CFG + " "
+        + "FOREIGN KEY (" + COLUMN_SQI_CONFIG + ") "
+          + "REFERENCES " + TABLE_SQ_CONFIG + " (" + COLUMN_SQ_CFG_ID + ")"
       + ")";
 
-  // DDL: Create table SQ_CONNECTION
-  public static final String QUERY_CREATE_TABLE_SQ_CONNECTION =
-      "CREATE TABLE " + TABLE_SQ_CONNECTION + " ("
-      + COLUMN_SQN_ID + " BIGINT GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY, "
-      + COLUMN_SQN_CONNECTOR + " BIGINT, "
-      + COLUMN_SQN_NAME  + " VARCHAR(32),"
-      + COLUMN_SQN_CREATION_DATE + " TIMESTAMP,"
-      + COLUMN_SQN_UPDATE_DATE + " TIMESTAMP,"
-      + "CONSTRAINT " + CONSTRAINT_SQN_SQC + " "
-        + "FOREIGN KEY(" + COLUMN_SQN_CONNECTOR + ") "
+  // DDL: Create table SQ_LINK
+  public static final String QUERY_CREATE_TABLE_SQ_LINK =
+      "CREATE TABLE " + TABLE_SQ_LINK + " ("
+      + COLUMN_SQ_LNK_ID + " BIGINT GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY, "
+      + COLUMN_SQ_LNK_CONNECTOR + " BIGINT, "
+      + COLUMN_SQ_LNK_NAME  + " VARCHAR(32),"
+      + COLUMN_SQ_LNK_CREATION_DATE + " TIMESTAMP,"
+      + COLUMN_SQ_LNK_UPDATE_DATE + " TIMESTAMP,"
+      + "CONSTRAINT " + CONSTRAINT_SQ_LNK_SQC + " "
+        + "FOREIGN KEY(" + COLUMN_SQ_LNK_CONNECTOR + ") "
           + " REFERENCES " + TABLE_SQ_CONNECTOR + " (" + COLUMN_SQC_ID + ")"
       + ")";
 
-  // DDL: Add enabled column to table SQ_CONNECTION
-  public static final String QUERY_UPGRADE_TABLE_SQ_CONNECTION_ADD_COLUMN_ENABLED =
-      "ALTER TABLE " + TABLE_SQ_CONNECTION + " ADD "
-      + COLUMN_SQN_ENABLED + " BOOLEAN "
+  // DDL: Add enabled column to table SQ_LINK
+  public static final String QUERY_UPGRADE_TABLE_SQ_LINK_ADD_COLUMN_ENABLED =
+      "ALTER TABLE " + TABLE_SQ_LINK + " ADD "
+      + COLUMN_SQ_LNK_ENABLED + " BOOLEAN "
       + "DEFAULT TRUE";
 
-  // DDL: Add creation_user column to table SQ_CONNECTION
-  public static final String QUERY_UPGRADE_TABLE_SQ_CONNECTION_ADD_COLUMN_CREATION_USER =
-      "ALTER TABLE " + TABLE_SQ_CONNECTION + " ADD "
-      + COLUMN_SQN_CREATION_USER + " VARCHAR(32) "
+  // DDL: Add creation_user column to table SQ_LINK
+  public static final String QUERY_UPGRADE_TABLE_SQ_LINK_ADD_COLUMN_CREATION_USER =
+      "ALTER TABLE " + TABLE_SQ_LINK + " ADD "
+      + COLUMN_SQ_LNK_CREATION_USER + " VARCHAR(32) "
       + "DEFAULT NULL";
 
-  // DDL: Add update_user column to table SQ_CONNECTION
-  public static final String QUERY_UPGRADE_TABLE_SQ_CONNECTION_ADD_COLUMN_UPDATE_USER =
-      "ALTER TABLE " + TABLE_SQ_CONNECTION + " ADD "
-      + COLUMN_SQN_UPDATE_USER + " VARCHAR(32) "
+  // DDL: Add update_user column to table SQ_LINK
+  public static final String QUERY_UPGRADE_TABLE_SQ_LINK_ADD_COLUMN_UPDATE_USER =
+      "ALTER TABLE " + TABLE_SQ_LINK + " ADD "
+      + COLUMN_SQ_LNK_UPDATE_USER + " VARCHAR(32) "
       + "DEFAULT NULL";
 
   // DDL: Create table SQ_JOB
   public static final String QUERY_CREATE_TABLE_SQ_JOB =
       "CREATE TABLE " + TABLE_SQ_JOB + " ("
       + COLUMN_SQB_ID + " BIGINT GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY, "
-      + COLUMN_SQB_CONNECTION + " BIGINT, "
+      + COLUMN_SQB_LINK + " BIGINT, "
       + COLUMN_SQB_NAME + " VARCHAR(64), "
       + COLUMN_SQB_TYPE + " VARCHAR(64),"
       + COLUMN_SQB_CREATION_DATE + " TIMESTAMP,"
       + COLUMN_SQB_UPDATE_DATE + " TIMESTAMP,"
-      + "CONSTRAINT " + CONSTRAINT_SQB_SQN + " "
-        + "FOREIGN KEY(" + COLUMN_SQB_CONNECTION + ") "
-          + "REFERENCES " + TABLE_SQ_CONNECTION + " (" + COLUMN_SQN_ID + ")"
+      + "CONSTRAINT " + CONSTRAINT_SQB_SQ_LNK + " "
+        + "FOREIGN KEY(" + COLUMN_SQB_LINK + ") "
+          + "REFERENCES " + TABLE_SQ_LINK + " (" + COLUMN_SQ_LNK_ID + ")"
       + ")";
 
   // DDL: Add enabled column to table SQ_JOB
@@ -314,18 +314,18 @@ public final class DerbySchemaQuery {
       + COLUMN_SQB_UPDATE_USER + " VARCHAR(32) "
       + "DEFAULT NULL";
 
-  // DDL: Create table SQ_CONNECTION_INPUT
-  public static final String QUERY_CREATE_TABLE_SQ_CONNECTION_INPUT =
-      "CREATE TABLE " + TABLE_SQ_CONNECTION_INPUT + " ("
-      + COLUMN_SQNI_CONNECTION + " BIGINT, "
-      + COLUMN_SQNI_INPUT + " BIGINT, "
-      + COLUMN_SQNI_VALUE + " LONG VARCHAR,"
-      + "PRIMARY KEY (" + COLUMN_SQNI_CONNECTION + ", " + COLUMN_SQNI_INPUT + "), "
-      + "CONSTRAINT " + CONSTRAINT_SQNI_SQN + " "
-        + "FOREIGN KEY (" + COLUMN_SQNI_CONNECTION + ") "
-          + "REFERENCES " + TABLE_SQ_CONNECTION + " (" + COLUMN_SQN_ID + "),"
-      + "CONSTRAINT " + CONSTRAINT_SQNI_SQI + " "
-        + "FOREIGN KEY (" + COLUMN_SQNI_INPUT + ") "
+  // DDL: Create table SQ_LINK_INPUT
+  public static final String QUERY_CREATE_TABLE_SQ_LINK_INPUT =
+      "CREATE TABLE " + TABLE_SQ_LINK_INPUT + " ("
+      + COLUMN_SQ_LNKI_LINK + " BIGINT, "
+      + COLUMN_SQ_LNKI_INPUT + " BIGINT, "
+      + COLUMN_SQ_LNKI_VALUE + " LONG VARCHAR,"
+      + "PRIMARY KEY (" + COLUMN_SQ_LNKI_LINK + ", " + COLUMN_SQ_LNKI_INPUT + "), "
+      + "CONSTRAINT " + CONSTRAINT_SQ_LNKI_SQ_LNK + " "
+        + "FOREIGN KEY (" + COLUMN_SQ_LNKI_LINK + ") "
+          + "REFERENCES " + TABLE_SQ_LINK + " (" + COLUMN_SQ_LNK_ID + "),"
+      + "CONSTRAINT " + CONSTRAINT_SQ_LNKI_SQI + " "
+        + "FOREIGN KEY (" + COLUMN_SQ_LNKI_INPUT + ") "
           + "REFERENCES " + TABLE_SQ_INPUT + " (" + COLUMN_SQI_ID + ")"
       + ")";
 
@@ -454,38 +454,38 @@ public final class DerbySchemaQuery {
     + COLUMN_SQC_VERSION
     + " FROM " + TABLE_SQ_CONNECTOR;
 
-  // DML: Fetch all forms for a given connector
-  public static final String STMT_FETCH_FORM_CONNECTOR =
+  // DML: Fetch all configs for a given connector
+  public static final String STMT_FETCH_CONFIG_CONNECTOR =
       "SELECT "
-      + COLUMN_SQF_ID + ", "
-      + COLUMN_SQF_CONNECTOR + ", "
-      + COLUMN_SQF_DIRECTION + ", "
-      + COLUMN_SQF_NAME + ", "
-      + COLUMN_SQF_TYPE + ", "
-      + COLUMN_SQF_INDEX
-      + " FROM " + TABLE_SQ_FORM
-      + " WHERE " + COLUMN_SQF_CONNECTOR + " = ? "
-      + " ORDER BY " + COLUMN_SQF_INDEX;
-
-  // DML: Fetch all framework forms
-  public static final String STMT_FETCH_FORM_FRAMEWORK =
+      + COLUMN_SQ_CFG_ID + ", "
+      + COLUMN_SQ_CFG_OWNER + ", "
+      + COLUMN_SQ_CFG_DIRECTION + ", "
+      + COLUMN_SQ_CFG_NAME + ", "
+      + COLUMN_SQ_CFG_TYPE + ", "
+      + COLUMN_SQ_CFG_INDEX
+      + " FROM " + TABLE_SQ_CONFIG
+      + " WHERE " + COLUMN_SQ_CFG_OWNER + " = ? "
+      + " ORDER BY " + COLUMN_SQ_CFG_INDEX;
+
+  // DML: Fetch all driver configs
+  public static final String STMT_FETCH_CONFIG_DRIVER =
       "SELECT "
-      + COLUMN_SQF_ID + ", "
-      + COLUMN_SQF_CONNECTOR + ", "
-      + COLUMN_SQF_DIRECTION + ", "
-      + COLUMN_SQF_NAME + ", "
-      + COLUMN_SQF_TYPE + ", "
-      + COLUMN_SQF_INDEX
-      + " FROM " + TABLE_SQ_FORM
-      + " WHERE " + COLUMN_SQF_CONNECTOR + " IS NULL "
-      + " ORDER BY " + COLUMN_SQF_TYPE + ", " + COLUMN_SQF_DIRECTION  + ", " + COLUMN_SQF_INDEX;
-
-  // DML: Fetch inputs for a given form
+      + COLUMN_SQ_CFG_ID + ", "
+      + COLUMN_SQ_CFG_OWNER + ", "
+      + COLUMN_SQ_CFG_DIRECTION + ", "
+      + COLUMN_SQ_CFG_NAME + ", "
+      + COLUMN_SQ_CFG_TYPE + ", "
+      + COLUMN_SQ_CFG_INDEX
+      + " FROM " + TABLE_SQ_CONFIG
+      + " WHERE " + COLUMN_SQ_CFG_OWNER + " IS NULL "
+      + " ORDER BY " + COLUMN_SQ_CFG_TYPE + ", " + COLUMN_SQ_CFG_DIRECTION  + ", " + COLUMN_SQ_CFG_INDEX;
+
+  // DML: Fetch inputs for a given config
   public static final String STMT_FETCH_INPUT =
       "SELECT "
       + COLUMN_SQI_ID + ", "
       + COLUMN_SQI_NAME + ", "
-      + COLUMN_SQI_FORM + ", "
+      + COLUMN_SQI_CONFIG + ", "
       + COLUMN_SQI_INDEX + ", "
       + COLUMN_SQI_TYPE + ", "
       + COLUMN_SQI_STRMASK + ", "
@@ -493,27 +493,27 @@ public final class DerbySchemaQuery {
       + COLUMN_SQI_ENUMVALS + ", "
       + "cast(null as varchar(100))"
       + " FROM " + TABLE_SQ_INPUT
-      + " WHERE " + COLUMN_SQI_FORM + " = ?"
+      + " WHERE " + COLUMN_SQI_CONFIG + " = ?"
       + " ORDER BY " + COLUMN_SQI_INDEX;
 
-  // DML: Fetch inputs and values for a given connection
-  public static final String STMT_FETCH_CONNECTION_INPUT =
+  // DML: Fetch inputs and values for a given link
+  public static final String STMT_FETCH_LINK_INPUT =
       "SELECT "
       + COLUMN_SQI_ID + ", "
       + COLUMN_SQI_NAME + ", "
-      + COLUMN_SQI_FORM + ", "
+      + COLUMN_SQI_CONFIG + ", "
       + COLUMN_SQI_INDEX + ", "
       + COLUMN_SQI_TYPE + ", "
       + COLUMN_SQI_STRMASK + ", "
       + COLUMN_SQI_STRLENGTH + ","
       + COLUMN_SQI_ENUMVALS + ", "
-      + COLUMN_SQNI_VALUE
+      + COLUMN_SQ_LNKI_VALUE
       + " FROM " + TABLE_SQ_INPUT
-      + " LEFT OUTER JOIN " + TABLE_SQ_CONNECTION_INPUT
-        + " ON " + COLUMN_SQNI_INPUT + " = " + COLUMN_SQI_ID
-        + " AND " + COLUMN_SQNI_CONNECTION + " = ?"
-      + " WHERE " + COLUMN_SQI_FORM + " = ?"
-        + " AND (" + COLUMN_SQNI_CONNECTION + " = ?" + " OR " + COLUMN_SQNI_CONNECTION + " IS NULL)"
+      + " LEFT OUTER JOIN " + TABLE_SQ_LINK_INPUT
+        + " ON " + COLUMN_SQ_LNKI_INPUT + " = " + COLUMN_SQI_ID
+        + " AND " + COLUMN_SQ_LNKI_LINK + " = ?"
+      + " WHERE " + COLUMN_SQI_CONFIG + " = ?"
+        + " AND (" + COLUMN_SQ_LNKI_LINK + " = ?" + " OR " + COLUMN_SQ_LNKI_LINK + " IS NULL)"
       + " ORDER BY " + COLUMN_SQI_INDEX;
 
   // DML: Fetch inputs and values for a given job
@@ -521,7 +521,7 @@ public final class DerbySchemaQuery {
       "SELECT "
       + COLUMN_SQI_ID + ", "
       + COLUMN_SQI_NAME + ", "
-      + COLUMN_SQI_FORM + ", "
+      + COLUMN_SQI_CONFIG + ", "
       + COLUMN_SQI_INDEX + ", "
       + COLUMN_SQI_TYPE + ", "
       + COLUMN_SQI_STRMASK + ", "
@@ -532,7 +532,7 @@ public final class DerbySchemaQuery {
       + " LEFT OUTER JOIN " + TABLE_SQ_JOB_INPUT
       + " ON " + COLUMN_SQBI_INPUT + " = " + COLUMN_SQI_ID
       + " AND  " + COLUMN_SQBI_JOB + " = ?"
-      + " WHERE " + COLUMN_SQI_FORM + " = ?"
+      + " WHERE " + COLUMN_SQI_CONFIG + " = ?"
       + " AND (" + COLUMN_SQBI_JOB + " = ? OR " + COLUMN_SQBI_JOB + " IS NULL)"
       + " ORDER BY " + COLUMN_SQI_INDEX;
 
@@ -544,21 +544,21 @@ public final class DerbySchemaQuery {
       + COLUMN_SQC_VERSION
       + ") VALUES (?, ?, ?)";
 
-  // DML: Insert form base
-  public static final String STMT_INSERT_FORM_BASE =
-      "INSERT INTO " + TABLE_SQ_FORM + " ("
-      + COLUMN_SQF_CONNECTOR + ", "
-      + COLUMN_SQF_DIRECTION + ", "
-      + COLUMN_SQF_NAME + ", "
-      + COLUMN_SQF_TYPE + ", "
-      + COLUMN_SQF_INDEX
+  // DML: Insert config base
+  public static final String STMT_INSERT_CONFIG_BASE =
+      "INSERT INTO " + TABLE_SQ_CONFIG + " ("
+      + COLUMN_SQ_CFG_OWNER + ", "
+      + COLUMN_SQ_CFG_DIRECTION + ", "
+      + COLUMN_SQ_CFG_NAME + ", "
+      + COLUMN_SQ_CFG_TYPE + ", "
+      + COLUMN_SQ_CFG_INDEX
       + ") VALUES ( ?, ?, ?, ?, ?)";
 
-  // DML: Insert form input
+  // DML: Insert config input
   public static final String STMT_INSERT_INPUT_BASE =
       "INSERT INTO " + TABLE_SQ_INPUT + " ("
       + COLUMN_SQI_NAME + ", "
-      + COLUMN_SQI_FORM + ", "
+      + COLUMN_SQI_CONFIG + ", "
       + COLUMN_SQI_INDEX + ", "
       + COLUMN_SQI_TYPE + ", "
       + COLUMN_SQI_STRMASK + ", "
@@ -566,37 +566,37 @@ public final class DerbySchemaQuery {
       + COLUMN_SQI_ENUMVALS
       + ") VALUES (?, ?, ?, ?, ?, ?, ?)";
 
-  // Delete all forms for a given connector
-  public static final String STMT_DELETE_FORMS_FOR_CONNECTOR =
-    "DELETE FROM " + TABLE_SQ_FORM
-    + " WHERE " + COLUMN_SQF_CONNECTOR + " = ?";
+  // Delete all configs for a given connector
+  public static final String STMT_DELETE_CONFIGS_FOR_CONNECTOR =
+    "DELETE FROM " + TABLE_SQ_CONFIG
+    + " WHERE " + COLUMN_SQ_CFG_OWNER + " = ?";
 
   // Delete all inputs for a given connector
   public static final String STMT_DELETE_INPUTS_FOR_CONNECTOR =
     "DELETE FROM " + TABLE_SQ_INPUT
     + " WHERE "
-    + COLUMN_SQI_FORM
+    + COLUMN_SQI_CONFIG
     + " IN (SELECT "
-    + COLUMN_SQF_ID
-    + " FROM " + TABLE_SQ_FORM
+    + COLUMN_SQ_CFG_ID
+    + " FROM " + TABLE_SQ_CONFIG
     + " WHERE "
-    + COLUMN_SQF_CONNECTOR + " = ?)";
+    + COLUMN_SQ_CFG_OWNER + " = ?)";
 
-  // Delete all framework inputs
-  public static final String STMT_DELETE_FRAMEWORK_INPUTS =
+  // Delete all driver inputs
+  public static final String STMT_DELETE_DRIVER_INPUTS =
     "DELETE FROM " + TABLE_SQ_INPUT
     + " WHERE "
-    + COLUMN_SQI_FORM
+    + COLUMN_SQI_CONFIG
     + " IN (SELECT "
-    + COLUMN_SQF_ID
-    + " FROM " + TABLE_SQ_FORM
+    + COLUMN_SQ_CFG_ID
+    + " FROM " + TABLE_SQ_CONFIG
     + " WHERE "
-    + COLUMN_SQF_CONNECTOR + " IS NULL)";
+    + COLUMN_SQ_CFG_OWNER + " IS NULL)";
 
-  // Delete all framework forms
-  public static final String STMT_DELETE_FRAMEWORK_FORMS =
-    "DELETE FROM " + TABLE_SQ_FORM
-    + " WHERE " + COLUMN_SQF_CONNECTOR + " IS NULL";
+  // Delete all driver configs
+  public static final String STMT_DELETE_DRIVER_CONFIGS =
+    "DELETE FROM " + TABLE_SQ_CONFIG
+    + " WHERE " + COLUMN_SQ_CFG_OWNER + " IS NULL";
 
 
 
@@ -608,102 +608,102 @@ public final class DerbySchemaQuery {
     + COLUMN_SQC_VERSION + " = ? "
     + " WHERE " + COLUMN_SQC_ID + " = ?";
 
-  // DML: Insert new connection
-  public static final String STMT_INSERT_CONNECTION =
-    "INSERT INTO " + TABLE_SQ_CONNECTION + " ("
-    + COLUMN_SQN_NAME + ", "
-    + COLUMN_SQN_CONNECTOR + ", "
-    + COLUMN_SQN_ENABLED + ", "
-    + COLUMN_SQN_CREATION_USER + ", "
-    + COLUMN_SQN_CREATION_DATE + ", "
-    + COLUMN_SQN_UPDATE_USER + ", "
-    + COLUMN_SQN_UPDATE_DATE
+  // DML: Insert new link
+  public static final String STMT_INSERT_LINK =
+    "INSERT INTO " + TABLE_SQ_LINK + " ("
+    + COLUMN_SQ_LNK_NAME + ", "
+    + COLUMN_SQ_LNK_CONNECTOR + ", "
+    + COLUMN_SQ_LNK_ENABLED + ", "
+    + COLUMN_SQ_LNK_CREATION_USER + ", "
+    + COLUMN_SQ_LNK_CREATION_DATE + ", "
+    + COLUMN_SQ_LNK_UPDATE_USER + ", "
+    + COLUMN_SQ_LNK_UPDATE_DATE
     + ") VALUES (?, ?, ?, ?, ?, ?, ?)";
 
-  // DML: Insert new connection inputs
-  public static final String STMT_INSERT_CONNECTION_INPUT =
-    "INSERT INTO " + TABLE_SQ_CONNECTION_INPUT + " ("
-    + COLUMN_SQNI_CONNECTION + ", "
-    + COLUMN_SQNI_INPUT + ", "
-    + COLUMN_SQNI_VALUE
+  // DML: Insert new link inputs
+  public static final String STMT_INSERT_LINK_INPUT =
+    "INSERT INTO " + TABLE_SQ_LINK_INPUT + " ("
+    + COLUMN_SQ_LNKI_LINK + ", "
+    + COLUMN_SQ_LNKI_INPUT + ", "
+    + COLUMN_SQ_LNKI_VALUE
     + ") VALUES (?, ?, ?)";
 
-  // DML: Update connection
-  public static final String STMT_UPDATE_CONNECTION =
-    "UPDATE " + TABLE_SQ_CONNECTION + " SET "
-    + COLUMN_SQN_NAME + " = ?, "
-    + COLUMN_SQN_UPDATE_USER + " = ?, "
-    + COLUMN_SQN_UPDATE_DATE + " = ? "
-    + " WHERE " + COLUMN_SQN_ID + " = ?";
-
-  // DML: Enable or disable connection
-  public static final String STMT_ENABLE_CONNECTION =
-    "UPDATE " + TABLE_SQ_CONNECTION + " SET "
-    + COLUMN_SQN_ENABLED + " = ? "
-    + " WHERE " + COLUMN_SQN_ID + " = ?";
-
-  // DML: Delete rows from connection input table
-  public static final String STMT_DELETE_CONNECTION_INPUT =
-    "DELETE FROM " + TABLE_SQ_CONNECTION_INPUT
-    + " WHERE " + COLUMN_SQNI_CONNECTION + " = ?";
-
-  // DML: Delete row from connection table
-  public static final String STMT_DELETE_CONNECTION =
-    "DELETE FROM " + TABLE_SQ_CONNECTION
-    + " WHERE " + COLUMN_SQN_ID + " = ?";
-
-  // DML: Select one specific connection
-  public static final String STMT_SELECT_CONNECTION_SINGLE =
+  // DML: Update link
+  public static final String STMT_UPDATE_LINK =
+    "UPDATE " + TABLE_SQ_LINK + " SET "
+    + COLUMN_SQ_LNK_NAME + " = ?, "
+    + COLUMN_SQ_LNK_UPDATE_USER + " = ?, "
+    + COLUMN_SQ_LNK_UPDATE_DATE + " = ? "
+    + " WHERE " + COLUMN_SQ_LNK_ID + " = ?";
+
+  // DML: Enable or disable link
+  public static final String STMT_ENABLE_LINK =
+    "UPDATE " + TABLE_SQ_LINK + " SET "
+    + COLUMN_SQ_LNK_ENABLED + " = ? "
+    + " WHERE " + COLUMN_SQ_LNK_ID + " = ?";
+
+  // DML: Delete rows from link input table
+  public static final String STMT_DELETE_LINK_INPUT =
+    "DELETE FROM " + TABLE_SQ_LINK_INPUT
+    + " WHERE " + COLUMN_SQ_LNKI_LINK + " = ?";
+
+  // DML: Delete row from link table
+  public static final String STMT_DELETE_LINK =
+    "DELETE FROM " + TABLE_SQ_LINK
+    + " WHERE " + COLUMN_SQ_LNK_ID + " = ?";
+
+  // DML: Select one specific link
+  public static final String STMT_SELECT_LINK_SINGLE =
     "SELECT "
-    + COLUMN_SQN_ID + ", "
-    + COLUMN_SQN_NAME + ", "
-    + COLUMN_SQN_CONNECTOR + ", "
-    + COLUMN_SQN_ENABLED + ", "
-    + COLUMN_SQN_CREATION_USER + ", "
-    + COLUMN_SQN_CREATION_DATE + ", "
-    + COLUMN_SQN_UPDATE_USER + ", "
-    + COLUMN_SQN_UPDATE_DATE
-    + " FROM " + TABLE_SQ_CONNECTION
-    + " WHERE " + COLUMN_SQN_ID + " = ?";
+    + COLUMN_SQ_LNK_ID + ", "
+    + COLUMN_SQ_LNK_NAME + ", "
+    + COLUMN_SQ_LNK_CONNECTOR + ", "
+    + COLUMN_SQ_LNK_ENABLED + ", "
+    + COLUMN_SQ_LNK_CREATION_USER + ", "
+    + COLUMN_SQ_LNK_CREATION_DATE + ", "
+    + COLUMN_SQ_LNK_UPDATE_USER + ", "
+    + COLUMN_SQ_LNK_UPDATE_DATE
+    + " FROM " + TABLE_SQ_LINK
+    + " WHERE " + COLUMN_SQ_LNK_ID + " = ?";
 
   // DML: Select all connections
-  public static final String STMT_SELECT_CONNECTION_ALL =
+  public static final String STMT_SELECT_LINK_ALL =
     "SELECT "
-    + COLUMN_SQN_ID + ", "
-    + COLUMN_SQN_NAME + ", "
-    + COLUMN_SQN_CONNECTOR + ", "
-    + COLUMN_SQN_ENABLED + ", "
-    + COLUMN_SQN_CREATION_USER + ", "
-    + COLUMN_SQN_CREATION_DATE + ", "
-    + COLUMN_SQN_UPDATE_USER + ", "
-    + COLUMN_SQN_UPDATE_DATE
-    + " FROM " + TABLE_SQ_CONNECTION;
+    + COLUMN_SQ_LNK_ID + ", "
+    + COLUMN_SQ_LNK_NAME + ", "
+    + COLUMN_SQ_LNK_CONNECTOR + ", "
+    + COLUMN_SQ_LNK_ENABLED + ", "
+    + COLUMN_SQ_LNK_CREATION_USER + ", "
+    + COLUMN_SQ_LNK_CREATION_DATE + ", "
+    + COLUMN_SQ_LNK_UPDATE_USER + ", "
+    + COLUMN_SQ_LNK_UPDATE_DATE
+    + " FROM " + TABLE_SQ_LINK;
 
   // DML: Select all connections for a specific connector.
-  public static final String STMT_SELECT_CONNECTION_FOR_CONNECTOR =
+  public static final String STMT_SELECT_LINK_FOR_CONNECTOR =
     "SELECT "
-    + COLUMN_SQN_ID + ", "
-    + COLUMN_SQN_NAME + ", "
-    + COLUMN_SQN_CONNECTOR + ", "
-    + COLUMN_SQN_ENABLED + ", "
-    + COLUMN_SQN_CREATION_USER + ", "
-    + COLUMN_SQN_CREATION_DATE + ", "
-    + COLUMN_SQN_UPDATE_USER + ", "
-    + COLUMN_SQN_UPDATE_DATE
-    + " FROM " + TABLE_SQ_CONNECTION
-    + " WHERE " + COLUMN_SQN_CONNECTOR + " = ?";
-
-  // DML: Check if given connection exists
-  public static final String STMT_SELECT_CONNECTION_CHECK =
-    "SELECT count(*) FROM " + TABLE_SQ_CONNECTION
-    + " WHERE " + COLUMN_SQN_ID + " = ?";
+    + COLUMN_SQ_LNK_ID + ", "
+    + COLUMN_SQ_LNK_NAME + ", "
+    + COLUMN_SQ_LNK_CONNECTOR + ", "
+    + COLUMN_SQ_LNK_ENABLED + ", "
+    + COLUMN_SQ_LNK_CREATION_USER + ", "
+    + COLUMN_SQ_LNK_CREATION_DATE + ", "
+    + COLUMN_SQ_LNK_UPDATE_USER + ", "
+    + COLUMN_SQ_LNK_UPDATE_DATE
+    + " FROM " + TABLE_SQ_LINK
+    + " WHERE " + COLUMN_SQ_LNK_CONNECTOR + " = ?";
+
+  // DML: Check if given link exists
+  public static final String STMT_SELECT_LINK_CHECK =
+    "SELECT count(*) FROM " + TABLE_SQ_LINK
+    + " WHERE " + COLUMN_SQ_LNK_ID + " = ?";
 
   // DML: Insert new job
   public static final String STMT_INSERT_JOB =
     "INSERT INTO " + TABLE_SQ_JOB + " ("
     + COLUMN_SQB_NAME + ", "
-    + COLUMN_SQB_FROM_CONNECTION + ", "
-    + COLUMN_SQB_TO_CONNECTION + ", "
+    + COLUMN_SQB_FROM_LINK + ", "
+    + COLUMN_SQB_TO_LINK + ", "
     + COLUMN_SQB_ENABLED + ", "
     + COLUMN_SQB_CREATION_USER + ", "
     + COLUMN_SQB_CREATION_DATE + ", "
@@ -747,59 +747,59 @@ public final class DerbySchemaQuery {
     "SELECT count(*) FROM " + TABLE_SQ_JOB
     + " WHERE " + COLUMN_SQB_ID + " = ?";
 
-  // DML: Check if there are jobs for given connection
-  public static final String STMT_SELECT_JOBS_FOR_CONNECTION_CHECK =
+  // DML: Check if there are jobs for given link
+  public static final String STMT_SELECT_JOBS_FOR_LINK_CHECK =
     "SELECT"
     + " count(*)"
     + " FROM " + TABLE_SQ_JOB
-    + " JOIN " + TABLE_SQ_CONNECTION
-      + " ON " + COLUMN_SQB_FROM_CONNECTION + " = " + COLUMN_SQN_ID
-    + " WHERE " + COLUMN_SQN_ID + " = ? ";
+    + " JOIN " + TABLE_SQ_LINK
+      + " ON " + COLUMN_SQB_FROM_LINK + " = " + COLUMN_SQ_LNK_ID
+    + " WHERE " + COLUMN_SQ_LNK_ID + " = ? ";
 
   // DML: Select one specific job
   public static final String STMT_SELECT_JOB_SINGLE =
     "SELECT "
-    + "FROM_CONNECTOR." + COLUMN_SQN_CONNECTOR + ", "
-    + "TO_CONNECTOR." + COLUMN_SQN_CONNECTOR + ", "
+    + "FROM_CONNECTOR." + COLUMN_SQ_LNK_CONNECTOR + ", "
+    + "TO_CONNECTOR." + COLUMN_SQ_LNK_CONNECTOR + ", "
     + "job." + COLUMN_SQB_ID + ", "
     + "job." + COLUMN_SQB_NAME + ", "
-    + "job." + COLUMN_SQB_FROM_CONNECTION + ", "
-    + "job." + COLUMN_SQB_TO_CONNECTION + ", "
+    + "job." + COLUMN_SQB_FROM_LINK + ", "
+    + "job." + COLUMN_SQB_TO_LINK + ", "
     + "job." + COLUMN_SQB_ENABLED + ", "
     + "job." + COLUMN_SQB_CREATION_USER + ", "
     + "job." + COLUMN_SQB_CREATION_DATE + ", "
     + "job." + COLUMN_SQB_UPDATE_USER + ", "
     + "job." + COLUMN_SQB_UPDATE_DATE
     + " FROM " + TABLE_SQ_JOB + " job"
-    + " LEFT JOIN " + TABLE_SQ_CONNECTION
-    + " FROM_CONNECTOR ON " + COLUMN_SQB_FROM_CONNECTION + " = FROM_CONNECTOR." + COLUMN_SQN_ID
-    + " LEFT JOIN " + TABLE_SQ_CONNECTION
-    + " TO_CONNECTOR ON " + COLUMN_SQB_TO_CONNECTION + " = TO_CONNECTOR." + COLUMN_SQN_ID
+    + " LEFT JOIN " + TABLE_SQ_LINK
+    + " FROM_CONNECTOR ON " + COLUMN_SQB_FROM_LINK + " = FROM_CONNECTOR." + COLUMN_SQ_LNK_ID
+    + " LEFT JOIN " + TABLE_SQ_LINK
+    + " TO_CONNECTOR ON " + COLUMN_SQB_TO_LINK + " = TO_CONNECTOR." + COLUMN_SQ_LNK_ID
     + " WHERE " + COLUMN_SQB_ID + " = ?";
 
   // DML: Select all jobs
   public static final String STMT_SELECT_JOB_ALL =
     "SELECT "
-    + "FROM_CONNECTION." + COLUMN_SQN_CONNECTOR + ", "
-    + "TO_CONNECTION." + COLUMN_SQN_CONNECTOR + ", "
+    + "FROM_LINK." + COLUMN_SQ_LNK_CONNECTOR + ", "
+    + "TO_LINK." + COLUMN_SQ_LNK_CONNECTOR + ", "
     + "JOB." + COLUMN_SQB_ID + ", "
     + "JOB." + COLUMN_SQB_NAME + ", "
-    + "JOB." + COLUMN_SQB_FROM_CONNECTION + ", "
-    + "JOB." + COLUMN_SQB_TO_CONNECTION + ", "
+    + "JOB." + COLUMN_SQB_FROM_LINK + ", "
+    + "JOB." + COLUMN_SQB_TO_LINK + ", "
     + "JOB." + COLUMN_SQB_ENABLED + ", "
     + "JOB." + COLUMN_SQB_CREATION_USER + ", "
     + "JOB." + COLUMN_SQB_CREATION_DATE + ", "
     + "JOB." + COLUMN_SQB_UPDATE_USER + ", "
     + "JOB." + COLUMN_SQB_UPDATE_DATE
     + " FROM " + TABLE_SQ_JOB + " JOB"
-      + " LEFT JOIN " + TABLE_SQ_CONNECTION + " FROM_CONNECTION"
-        + " ON " + COLUMN_SQB_FROM_CONNECTION + " = FROM_CONNECTION." + COLUMN_SQN_ID
-      + " LEFT JOIN " + TABLE_SQ_CONNECTION + " TO_CONNECTION"
-        + " ON " + COLUMN_SQB_TO_CONNECTION + " = TO_CONNECTION." + COLUMN_SQN_ID;
+      + " LEFT JOIN " + TABLE_SQ_LINK + " FROM_LINK"
+        + " ON " + COLUMN_SQB_FROM_LINK + " = FROM_LINK." + COLUMN_SQ_LNK_ID
+      + " LEFT JOIN " + TABLE_SQ_LINK + " TO_LINK"
+        + " ON " + COLUMN_SQB_TO_LINK + " = TO_LINK." + COLUMN_SQ_LNK_ID;
 
   // DML: Select all jobs for a Connector
   public static final String STMT_SELECT_ALL_JOBS_FOR_CONNECTOR = STMT_SELECT_JOB_ALL
-    + " WHERE FROM_CONNECTION." + COLUMN_SQN_CONNECTOR + " = ? OR TO_CONNECTION." + COLUMN_SQN_CONNECTOR + " = ?";
+    + " WHERE FROM_LINK." + COLUMN_SQ_LNK_CONNECTOR + " = ? OR TO_LINK." + COLUMN_SQ_LNK_CONNECTOR + " = ?";
 
   // DML: Insert new submission
   public static final String STMT_INSERT_SUBMISSION =
@@ -951,117 +951,117 @@ public final class DerbySchemaQuery {
       + COLUMN_SQC_VERSION + " SET DATA TYPE VARCHAR(64)";
 
   // Version 4 Upgrade
-  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_RENAME_COLUMN_SQB_CONNECTION_TO_SQB_FROM_CONNECTION =
-      "RENAME COLUMN " + TABLE_SQ_JOB + "." + COLUMN_SQB_CONNECTION
-        + " TO " + COLUMN_SQB_FROM_CONNECTION;
+  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_RENAME_COLUMN_SQB_LINK_TO_SQB_FROM_LINK =
+      "RENAME COLUMN " + TABLE_SQ_JOB + "." + COLUMN_SQB_LINK
+        + " TO " + COLUMN_SQB_FROM_LINK;
 
-  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_ADD_COLUMN_SQB_TO_CONNECTION =
-      "ALTER TABLE " + TABLE_SQ_JOB + " ADD COLUMN " + COLUMN_SQB_TO_CONNECTION
+  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_ADD_COLUMN_SQB_TO_LINK =
+      "ALTER TABLE " + TABLE_SQ_JOB + " ADD COLUMN " + COLUMN_SQB_TO_LINK
         + " BIGINT";
 
-  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_REMOVE_CONSTRAINT_SQB_SQN =
-      "ALTER TABLE " + TABLE_SQ_JOB + " DROP CONSTRAINT " + CONSTRAINT_SQB_SQN;
+  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_REMOVE_CONSTRAINT_SQB_SQ_LNK =
+      "ALTER TABLE " + TABLE_SQ_JOB + " DROP CONSTRAINT " + CONSTRAINT_SQB_SQ_LNK;
 
-  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_ADD_CONSTRAINT_SQB_SQN_FROM =
-      "ALTER TABLE " + TABLE_SQ_JOB + " ADD CONSTRAINT " + CONSTRAINT_SQB_SQN_FROM
-          + " FOREIGN KEY (" + COLUMN_SQB_FROM_CONNECTION + ") REFERENCES "
-          + TABLE_SQ_CONNECTION + " (" + COLUMN_SQN_ID + ")";
+  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_ADD_CONSTRAINT_SQB_SQ_LNK_FROM =
+      "ALTER TABLE " + TABLE_SQ_JOB + " ADD CONSTRAINT " + CONSTRAINT_SQB_SQ_LNK_FROM
+          + " FOREIGN KEY (" + COLUMN_SQB_FROM_LINK + ") REFERENCES "
+          + TABLE_SQ_LINK + " (" + COLUMN_SQ_LNK_ID + ")";
 
-  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_ADD_CONSTRAINT_SQB_SQN_TO =
-      "ALTER TABLE " + TABLE_SQ_JOB + " ADD CONSTRAINT " + CONSTRAINT_SQB_SQN_TO
-        + " FOREIGN KEY (" + COLUMN_SQB_TO_CONNECTION + ") REFERENCES "
-        + TABLE_SQ_CONNECTION + " (" + COLUMN_SQN_ID + ")";
+  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_ADD_CONSTRAINT_SQB_SQ_LNK_TO =
+      "ALTER TABLE " + TABLE_SQ_JOB + " ADD CONSTRAINT " + CONSTRAINT_SQB_SQ_LNK_TO
+        + " FOREIGN KEY (" + COLUMN_SQB_TO_LINK + ") REFERENCES "
+        + TABLE_SQ_LINK + " (" + COLUMN_SQ_LNK_ID + ")";
 
-  public static final String QUERY_UPGRADE_TABLE_SQ_FORM_RENAME_COLUMN_SQF_OPERATION_TO_SQF_DIRECTION =
-    "RENAME COLUMN " + TABLE_SQ_FORM + "." + COLUMN_SQF_OPERATION
-      + " TO " + COLUMN_SQF_DIRECTION;
+  public static final String QUERY_UPGRADE_TABLE_SQ_CONFIG_RENAME_COLUMN_SQ_CFG_OPERATION_TO_SQ_CFG_DIRECTION =
+    "RENAME COLUMN " + TABLE_SQ_CONFIG + "." + COLUMN_SQ_CFG_OPERATION
+      + " TO " + COLUMN_SQ_CFG_DIRECTION;
 
-  public static final String QUERY_UPGRADE_TABLE_SQ_FORM_UPDATE_SQF_OPERATION_TO_SQF_DIRECTION =
-      "UPDATE " + TABLE_SQ_FORM + " SET " + COLUMN_SQF_DIRECTION
-        + "=? WHERE " + COLUMN_SQF_DIRECTION + "=?"
-          + " AND " + COLUMN_SQF_CONNECTOR + " IS NOT NULL";
+  public static final String QUERY_UPGRADE_TABLE_SQ_CONFIG_UPDATE_SQ_CFG_OPERATION_TO_SQ_CFG_DIRECTION =
+      "UPDATE " + TABLE_SQ_CONFIG + " SET " + COLUMN_SQ_CFG_DIRECTION
+        + "=? WHERE " + COLUMN_SQ_CFG_DIRECTION + "=?"
+          + " AND " + COLUMN_SQ_CFG_OWNER + " IS NOT NULL";
 
-  public static final String QUERY_UPGRADE_TABLE_SQ_FORM_UPDATE_CONNECTOR =
-      "UPDATE " + TABLE_SQ_FORM + " SET " + COLUMN_SQF_CONNECTOR + "= ?"
-          + " WHERE " + COLUMN_SQF_CONNECTOR + " IS NULL AND "
-          + COLUMN_SQF_NAME + " IN (?, ?)";
+  public static final String QUERY_UPGRADE_TABLE_SQ_CONFIG_UPDATE_CONNECTOR =
+      "UPDATE " + TABLE_SQ_CONFIG + " SET " + COLUMN_SQ_CFG_OWNER + "= ?"
+          + " WHERE " + COLUMN_SQ_CFG_OWNER + " IS NULL AND "
+          + COLUMN_SQ_CFG_NAME + " IN (?, ?)";
 
-  public static final String QUERY_UPGRADE_TABLE_SQ_FORM_UPDATE_CONNECTOR_HDFS_FORM_DIRECTION =
-      "UPDATE " + TABLE_SQ_FORM + " SET " + COLUMN_SQF_DIRECTION + "= ?"
-        + " WHERE " + COLUMN_SQF_NAME + "= ?";
+  public static final String QUERY_UPGRADE_TABLE_SQ_CONFIG_UPDATE_CONNECTOR_HDFS_CONFIG_DIRECTION =
+      "UPDATE " + TABLE_SQ_CONFIG + " SET " + COLUMN_SQ_CFG_DIRECTION + "= ?"
+        + " WHERE " + COLUMN_SQ_CFG_NAME + "= ?";
 
-  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_UPDATE_SQB_TO_CONNECTION_COPY_SQB_FROM_CONNECTION =
+  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_UPDATE_SQB_TO_LINK_COPY_SQB_FROM_LINK =
       "UPDATE " + TABLE_SQ_JOB + " SET "
-        + COLUMN_SQB_TO_CONNECTION + "=" + COLUMN_SQB_FROM_CONNECTION
+        + COLUMN_SQB_TO_LINK + "=" + COLUMN_SQB_FROM_LINK
         + " WHERE " + COLUMN_SQB_TYPE + "= ?";
 
-  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_UPDATE_SQB_FROM_CONNECTION =
-      "UPDATE " + TABLE_SQ_JOB + " SET " + COLUMN_SQB_FROM_CONNECTION + "=?"
+  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_UPDATE_SQB_FROM_LINK =
+      "UPDATE " + TABLE_SQ_JOB + " SET " + COLUMN_SQB_FROM_LINK + "=?"
         + " WHERE " + COLUMN_SQB_TYPE + "= ?";
 
-  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_UPDATE_SQB_TO_CONNECTION =
-      "UPDATE " + TABLE_SQ_JOB + " SET " + COLUMN_SQB_TO_CONNECTION + "=?"
+  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_UPDATE_SQB_TO_LINK =
+      "UPDATE " + TABLE_SQ_JOB + " SET " + COLUMN_SQB_TO_LINK + "=?"
         + " WHERE " + COLUMN_SQB_TYPE + "= ?";
 
-  public static final String QUERY_UPGRADE_TABLE_SQ_FORM_UPDATE_SQF_NAME =
-      "UPDATE " + TABLE_SQ_FORM + " SET "
-          + COLUMN_SQF_NAME + "= ?"
-          + " WHERE " + COLUMN_SQF_NAME + "= ?"
-          + " AND " + COLUMN_SQF_DIRECTION + "= ?";
+  public static final String QUERY_UPGRADE_TABLE_SQ_CONFIG_UPDATE_SQ_CFG_NAME =
+      "UPDATE " + TABLE_SQ_CONFIG + " SET "
+          + COLUMN_SQ_CFG_NAME + "= ?"
+          + " WHERE " + COLUMN_SQ_CFG_NAME + "= ?"
+          + " AND " + COLUMN_SQ_CFG_DIRECTION + "= ?";
 
   /**
-   * Intended to rename forms based on direction.
-   * e.g. If SQ_FORM.SQF_NAME = 'table' and parameter 1 = 'from'
-   * then SQ_FORM.SQF_NAME = 'fromJobConfig'.
+   * Intended to rename configs based on direction.
+   * e.g. If SQ_CONFIG.SQ_CFG_NAME = 'table' and parameter 1 = 'from'
+   * then SQ_CONFIG.SQ_CFG_NAME = 'fromJobConfig'.
    */
-  public static final String QUERY_UPGRADE_TABLE_SQ_FORM_UPDATE_TABLE_INPUT_NAMES =
+  public static final String QUERY_UPGRADE_TABLE_SQ_CONFIG_UPDATE_TABLE_INPUT_NAMES =
       "UPDATE " + TABLE_SQ_INPUT + " SET "
           + COLUMN_SQI_NAME + "=("
           + "? || UPPER(SUBSTR(" + COLUMN_SQI_NAME + ",1,1))"
           + " || SUBSTR(" + COLUMN_SQI_NAME + ",2) )"
-          + " WHERE " + COLUMN_SQI_FORM + " IN ("
-          + " SELECT " + COLUMN_SQF_ID + " FROM " + TABLE_SQ_FORM + " WHERE " + COLUMN_SQF_NAME + "= ?"
-          + " AND " + COLUMN_SQF_DIRECTION + "= ?)";
+          + " WHERE " + COLUMN_SQI_CONFIG + " IN ("
+          + " SELECT " + COLUMN_SQ_CFG_ID + " FROM " + TABLE_SQ_CONFIG + " WHERE " + COLUMN_SQ_CFG_NAME + "= ?"
+          + " AND " + COLUMN_SQ_CFG_DIRECTION + "= ?)";
 
-  public static final String QUERY_UPGRADE_TABLE_SQ_FORM_UPDATE_DIRECTION_TO_NULL =
-      "UPDATE " + TABLE_SQ_FORM + " SET "
-        + COLUMN_SQF_DIRECTION + "= NULL"
-        + " WHERE " + COLUMN_SQF_NAME + "= ?";
+  public static final String QUERY_UPGRADE_TABLE_SQ_CONFIG_UPDATE_DIRECTION_TO_NULL =
+      "UPDATE " + TABLE_SQ_CONFIG + " SET "
+        + COLUMN_SQ_CFG_DIRECTION + "= NULL"
+        + " WHERE " + COLUMN_SQ_CFG_NAME + "= ?";
 
-  public static final String QUERY_SELECT_THROTTLING_FORM_INPUT_IDS =
+  public static final String QUERY_SELECT_THROTTLING_CONFIG_INPUT_IDS =
       "SELECT SQI." + COLUMN_SQI_ID + " FROM " + TABLE_SQ_INPUT + " SQI"
-          + " INNER JOIN " + TABLE_SQ_FORM + " SQF ON SQI." + COLUMN_SQI_FORM + "=SQF." + COLUMN_SQF_ID
-          + " WHERE SQF." + COLUMN_SQF_NAME + "='throttling' AND SQF." + COLUMN_SQF_DIRECTION + "=?";
+          + " INNER JOIN " + TABLE_SQ_CONFIG + " SQ_CFG ON SQI." + COLUMN_SQI_CONFIG + "=SQ_CFG." + COLUMN_SQ_CFG_ID
+          + " WHERE SQ_CFG." + COLUMN_SQ_CFG_NAME + "='throttling' AND SQ_CFG." + COLUMN_SQ_CFG_DIRECTION + "=?";
 
   /**
    * Intended to change SQ_JOB_INPUT.SQBI_INPUT from EXPORT
-   * throttling form, to IMPORT throttling form.
+   * throttling config, to IMPORT throttling config.
    */
-  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_INPUT_UPDATE_THROTTLING_FORM_INPUTS =
+  public static final String QUERY_UPGRADE_TABLE_SQ_JOB_INPUT_UPDATE_THROTTLING_CONFIG_INPUTS =
       "UPDATE " + TABLE_SQ_JOB_INPUT + " SQBI SET"
-        + " SQBI." + COLUMN_SQBI_INPUT + "=(" + QUERY_SELECT_THROTTLING_FORM_INPUT_IDS
+        + " SQBI." + COLUMN_SQBI_INPUT + "=(" + QUERY_SELECT_THROTTLING_CONFIG_INPUT_IDS
           + " AND SQI." + COLUMN_SQI_NAME + "=("
             + "SELECT SQI2." + COLUMN_SQI_NAME + " FROM " + TABLE_SQ_INPUT + " SQI2"
             + " WHERE SQI2." + COLUMN_SQI_ID + "=SQBI." + COLUMN_SQBI_INPUT + " FETCH FIRST 1 ROWS ONLY"
           +   "))"
-        + "WHERE SQBI." + COLUMN_SQBI_INPUT + " IN (" + QUERY_SELECT_THROTTLING_FORM_INPUT_IDS + ")";
+        + "WHERE SQBI." + COLUMN_SQBI_INPUT + " IN (" + QUERY_SELECT_THROTTLING_CONFIG_INPUT_IDS + ")";
 
-  public static final String QUERY_UPGRADE_TABLE_SQ_FORM_REMOVE_EXTRA_FORM_INPUTS =
+  public static final String QUERY_UPGRADE_TABLE_SQ_CONFIG_REMOVE_EXTRA_CONFIG_INPUTS =
       "DELETE FROM " + TABLE_SQ_INPUT + " SQI"
-        + " WHERE SQI." + COLUMN_SQI_FORM + " IN ("
-          + "SELECT SQF." + COLUMN_SQF_ID + " FROM " + TABLE_SQ_FORM + " SQF "
-          + " WHERE SQF." + COLUMN_SQF_NAME + "= ?"
-          + " AND SQF." + COLUMN_SQF_DIRECTION + "= ?)";
-
-  public static final String QUERY_UPGRADE_TABLE_SQ_FORM_REMOVE_EXTRA_FRAMEWORK_FORM =
-      "DELETE FROM " + TABLE_SQ_FORM
-        + " WHERE " + COLUMN_SQF_NAME + "= ?"
-        + " AND " + COLUMN_SQF_DIRECTION + "= ?";
-
-  public static final String QUERY_UPGRADE_TABLE_SQ_FORM_UPDATE_FRAMEWORK_INDEX =
-      "UPDATE " + TABLE_SQ_FORM + " SET "
-        + COLUMN_SQF_INDEX + "= ?"
-        + " WHERE " + COLUMN_SQF_NAME + "= ?";
+        + " WHERE SQI." + COLUMN_SQI_CONFIG + " IN ("
+          + "SELECT SQ_CFG." + COLUMN_SQ_CFG_ID + " FROM " + TABLE_SQ_CONFIG + " SQ_CFG "
+          + " WHERE SQ_CFG." + COLUMN_SQ_CFG_NAME + "= ?"
+          + " AND SQ_CFG." + COLUMN_SQ_CFG_DIRECTION + "= ?)";
+
+  public static final String QUERY_UPGRADE_TABLE_SQ_CONFIG_REMOVE_EXTRA_DRIVER_CONFIG =
+      "DELETE FROM " + TABLE_SQ_CONFIG
+        + " WHERE " + COLUMN_SQ_CFG_NAME + "= ?"
+        + " AND " + COLUMN_SQ_CFG_DIRECTION + "= ?";
+
+  public static final String QUERY_UPGRADE_TABLE_SQ_CONFIG_UPDATE_DRIVER_INDEX =
+      "UPDATE " + TABLE_SQ_CONFIG + " SET "
+        + COLUMN_SQ_CFG_INDEX + "= ?"
+        + " WHERE " + COLUMN_SQ_CFG_NAME + "= ?";
 
   public static final String QUERY_UPGRADE_TABLE_SQ_JOB_REMOVE_COLUMN_SQB_TYPE =
       "ALTER TABLE " + TABLE_SQ_JOB + " DROP COLUMN " + COLUMN_SQB_TYPE;

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java
----------------------------------------------------------------------
diff --git a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java
index 4b95687..bf72626 100644
--- a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java
+++ b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java
@@ -17,20 +17,35 @@
  */
 package org.apache.sqoop.repository.derby;
 
-import org.apache.sqoop.common.Direction;
-import org.apache.sqoop.driver.Driver;
-import org.apache.sqoop.model.MLink;
-import org.apache.sqoop.model.MConnectionForms;
-import org.apache.sqoop.model.MConnector;
-import org.apache.sqoop.model.MForm;
-import org.apache.sqoop.model.MDriverConfig;
-import org.apache.sqoop.model.MInput;
-import org.apache.sqoop.model.MJob;
-import org.apache.sqoop.model.MJobForms;
-import org.apache.sqoop.model.MMapInput;
-import org.apache.sqoop.model.MStringInput;
-import org.junit.After;
-import org.junit.Before;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_CREATE_SCHEMA_SQOOP;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_CREATE_TABLE_SQ_CONFIG;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_CREATE_TABLE_SQ_CONNECTOR;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_CREATE_TABLE_SQ_COUNTER;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_CREATE_TABLE_SQ_COUNTER_GROUP;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_CREATE_TABLE_SQ_COUNTER_SUBMISSION;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_CREATE_TABLE_SQ_INPUT;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_CREATE_TABLE_SQ_JOB;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_CREATE_TABLE_SQ_JOB_INPUT;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_CREATE_TABLE_SQ_LINK;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_CREATE_TABLE_SQ_LINK_INPUT;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_CREATE_TABLE_SQ_SUBMISSION;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_CREATE_TABLE_SQ_SYSTEM;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_UPGRADE_TABLE_SQ_CONFIG_RENAME_COLUMN_SQ_CFG_OPERATION_TO_SQ_CFG_DIRECTION;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_UPGRADE_TABLE_SQ_JOB_ADD_COLUMN_CREATION_USER;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_UPGRADE_TABLE_SQ_JOB_ADD_COLUMN_ENABLED;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_UPGRADE_TABLE_SQ_JOB_ADD_COLUMN_SQB_TO_LINK;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_UPGRADE_TABLE_SQ_JOB_ADD_COLUMN_UPDATE_USER;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_UPGRADE_TABLE_SQ_JOB_ADD_CONSTRAINT_SQB_SQ_LNK_FROM;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_UPGRADE_TABLE_SQ_JOB_ADD_CONSTRAINT_SQB_SQ_LNK_TO;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_UPGRADE_TABLE_SQ_JOB_REMOVE_COLUMN_SQB_TYPE;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_UPGRADE_TABLE_SQ_JOB_REMOVE_CONSTRAINT_SQB_SQ_LNK;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_UPGRADE_TABLE_SQ_JOB_RENAME_COLUMN_SQB_LINK_TO_SQB_FROM_LINK;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_UPGRADE_TABLE_SQ_LINK_ADD_COLUMN_CREATION_USER;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_UPGRADE_TABLE_SQ_LINK_ADD_COLUMN_ENABLED;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_UPGRADE_TABLE_SQ_LINK_ADD_COLUMN_UPDATE_USER;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_UPGRADE_TABLE_SQ_SUBMISSION_ADD_COLUMN_CREATION_USER;
+import static org.apache.sqoop.repository.derby.DerbySchemaQuery.QUERY_UPGRADE_TABLE_SQ_SUBMISSION_ADD_COLUMN_UPDATE_USER;
+import static org.junit.Assert.assertEquals;
 
 import java.sql.Connection;
 import java.sql.DriverManager;
@@ -42,8 +57,22 @@ import java.sql.Statement;
 import java.util.LinkedList;
 import java.util.List;
 
-import static org.apache.sqoop.repository.derby.DerbySchemaQuery.*;
-import static org.junit.Assert.assertEquals;
+import org.apache.sqoop.common.Direction;
+import org.apache.sqoop.json.DriverBean;
+import org.apache.sqoop.model.MConfig;
+import org.apache.sqoop.model.MConnector;
+import org.apache.sqoop.model.MDriver;
+import org.apache.sqoop.model.MDriverConfig;
+import org.apache.sqoop.model.MFromConfig;
+import org.apache.sqoop.model.MInput;
+import org.apache.sqoop.model.MJob;
+import org.apache.sqoop.model.MLink;
+import org.apache.sqoop.model.MLinkConfig;
+import org.apache.sqoop.model.MMapInput;
+import org.apache.sqoop.model.MStringInput;
+import org.apache.sqoop.model.MToConfig;
+import org.junit.After;
+import org.junit.Before;
 
 /**
  * Abstract class with convenience methods for testing derby repository.
@@ -91,11 +120,11 @@ abstract public class DerbyTestCase {
     if (version > 0) {
       runQuery(QUERY_CREATE_SCHEMA_SQOOP);
       runQuery(QUERY_CREATE_TABLE_SQ_CONNECTOR);
-      runQuery(QUERY_CREATE_TABLE_SQ_FORM);
+      runQuery(QUERY_CREATE_TABLE_SQ_CONFIG);
       runQuery(QUERY_CREATE_TABLE_SQ_INPUT);
-      runQuery(QUERY_CREATE_TABLE_SQ_CONNECTION);
+      runQuery(QUERY_CREATE_TABLE_SQ_LINK);
       runQuery(QUERY_CREATE_TABLE_SQ_JOB);
-      runQuery(QUERY_CREATE_TABLE_SQ_CONNECTION_INPUT);
+      runQuery(QUERY_CREATE_TABLE_SQ_LINK_INPUT);
       runQuery(QUERY_CREATE_TABLE_SQ_JOB_INPUT);
       runQuery(QUERY_CREATE_TABLE_SQ_SUBMISSION);
       runQuery(QUERY_CREATE_TABLE_SQ_COUNTER_GROUP);
@@ -105,10 +134,10 @@ abstract public class DerbyTestCase {
 
     if (version > 1) {
       runQuery(QUERY_CREATE_TABLE_SQ_SYSTEM);
-      runQuery(QUERY_UPGRADE_TABLE_SQ_CONNECTION_ADD_COLUMN_ENABLED);
+      runQuery(QUERY_UPGRADE_TABLE_SQ_LINK_ADD_COLUMN_ENABLED);
       runQuery(QUERY_UPGRADE_TABLE_SQ_JOB_ADD_COLUMN_ENABLED);
-      runQuery(QUERY_UPGRADE_TABLE_SQ_CONNECTION_ADD_COLUMN_CREATION_USER);
-      runQuery(QUERY_UPGRADE_TABLE_SQ_CONNECTION_ADD_COLUMN_UPDATE_USER);
+      runQuery(QUERY_UPGRADE_TABLE_SQ_LINK_ADD_COLUMN_CREATION_USER);
+      runQuery(QUERY_UPGRADE_TABLE_SQ_LINK_ADD_COLUMN_UPDATE_USER);
       runQuery(QUERY_UPGRADE_TABLE_SQ_JOB_ADD_COLUMN_CREATION_USER);
       runQuery(QUERY_UPGRADE_TABLE_SQ_JOB_ADD_COLUMN_UPDATE_USER);
       runQuery(QUERY_UPGRADE_TABLE_SQ_SUBMISSION_ADD_COLUMN_CREATION_USER);
@@ -116,12 +145,12 @@ abstract public class DerbyTestCase {
     }
 
     if (version > 3) {
-      runQuery(QUERY_UPGRADE_TABLE_SQ_FORM_RENAME_COLUMN_SQF_OPERATION_TO_SQF_DIRECTION);
-      runQuery(QUERY_UPGRADE_TABLE_SQ_JOB_RENAME_COLUMN_SQB_CONNECTION_TO_SQB_FROM_CONNECTION);
-      runQuery(QUERY_UPGRADE_TABLE_SQ_JOB_ADD_COLUMN_SQB_TO_CONNECTION);
-      runQuery(QUERY_UPGRADE_TABLE_SQ_JOB_REMOVE_CONSTRAINT_SQB_SQN);
-      runQuery(QUERY_UPGRADE_TABLE_SQ_JOB_ADD_CONSTRAINT_SQB_SQN_FROM);
-      runQuery(QUERY_UPGRADE_TABLE_SQ_JOB_ADD_CONSTRAINT_SQB_SQN_TO);
+      runQuery(QUERY_UPGRADE_TABLE_SQ_CONFIG_RENAME_COLUMN_SQ_CFG_OPERATION_TO_SQ_CFG_DIRECTION);
+      runQuery(QUERY_UPGRADE_TABLE_SQ_JOB_RENAME_COLUMN_SQB_LINK_TO_SQB_FROM_LINK);
+      runQuery(QUERY_UPGRADE_TABLE_SQ_JOB_ADD_COLUMN_SQB_TO_LINK);
+      runQuery(QUERY_UPGRADE_TABLE_SQ_JOB_REMOVE_CONSTRAINT_SQB_SQ_LNK);
+      runQuery(QUERY_UPGRADE_TABLE_SQ_JOB_ADD_CONSTRAINT_SQB_SQ_LNK_FROM);
+      runQuery(QUERY_UPGRADE_TABLE_SQ_JOB_ADD_CONSTRAINT_SQB_SQ_LNK_TO);
       runQuery(QUERY_UPGRADE_TABLE_SQ_JOB_REMOVE_COLUMN_SQB_TYPE);
     }
 
@@ -180,65 +209,64 @@ abstract public class DerbyTestCase {
 
     String connector = "1";
 
-    // Connector form entries
+    // Connector config entries
     for(String operation : new String[] {"null", "'IMPORT'", "'EXPORT'"}) {
 
       String type;
       if(operation.equals("null")) {
-        type = "CONNECTION";
+        type = "LINK";
       } else {
         type = "JOB";
       }
 
-      runQuery("INSERT INTO SQOOP.SQ_FORM"
-          + "(SQF_CONNECTOR, SQF_OPERATION, SQF_NAME, SQF_TYPE, SQF_INDEX) "
+      runQuery("INSERT INTO SQOOP.SQ_CONFIG"
+          + "(SQ_CFG_OWNER, SQ_CFG_OPERATION, SQ_CFG_NAME, SQ_CFG_TYPE, SQ_CFG_INDEX) "
           + "VALUES("
           + connector  + ", "
           + operation
-          + ", 'F1', '"
+          + ", 'C1', '"
           + type
           + "', 0)");
-      runQuery("INSERT INTO SQOOP.SQ_FORM"
-          + "(SQF_CONNECTOR, SQF_OPERATION, SQF_NAME, SQF_TYPE, SQF_INDEX) "
+      runQuery("INSERT INTO SQOOP.SQ_CONFIG"
+          + "(SQ_CFG_OWNER, SQ_CFG_OPERATION, SQ_CFG_NAME, SQ_CFG_TYPE, SQ_CFG_INDEX) "
           + "VALUES("
           + connector + ", "
           + operation
-          +  ", 'F2', '"
+          +  ", 'C2', '"
           + type
           + "', 1)");
     }
 
-    // Framework form entries
-    runQuery("INSERT INTO SQOOP.SQ_FORM"
-        + "(SQF_CONNECTOR, SQF_OPERATION, SQF_NAME, SQF_TYPE, SQF_INDEX) VALUES"
+    // Driver config entries
+    runQuery("INSERT INTO SQOOP.SQ_CONFIG"
+        + "(SQ_CFG_OWNER, SQ_CFG_OPERATION, SQ_CFG_NAME, SQ_CFG_TYPE, SQ_CFG_INDEX) VALUES"
         + "(NULL, 'IMPORT', 'output', 'JOB', 0),"
         + "(NULL, 'IMPORT', 'throttling', 'JOB', 1),"
         + "(NULL, 'EXPORT', 'input', 'JOB', 0),"
         + "(NULL, 'EXPORT', 'throttling', 'JOB', 1),"
-        + "(NULL, NULL, 'security', 'CONNECTION', 0)");
+        + "(NULL, NULL, 'security', 'LINK', 0)");
 
     // Connector input entries
-    int x = 0;
     for(int i = 0; i < 3; i++) {
-      // First form
+      // First config
       runQuery("INSERT INTO SQOOP.SQ_INPUT"
-          +"(SQI_NAME, SQI_FORM, SQI_INDEX, SQI_TYPE, SQI_STRMASK, SQI_STRLENGTH)"
+          +"(SQI_NAME, SQI_CONFIG, SQI_INDEX, SQI_TYPE, SQI_STRMASK, SQI_STRLENGTH)"
           + " VALUES('I1', " + (i * 2 + 1) + ", 0, 'STRING', false, 30)");
       runQuery("INSERT INTO SQOOP.SQ_INPUT"
-          +"(SQI_NAME, SQI_FORM, SQI_INDEX, SQI_TYPE, SQI_STRMASK, SQI_STRLENGTH)"
+          +"(SQI_NAME, SQI_CONFIG, SQI_INDEX, SQI_TYPE, SQI_STRMASK, SQI_STRLENGTH)"
           + " VALUES('I2', " + (i * 2 + 1) + ", 1, 'MAP', false, 30)");
 
-      // Second form
+      // Second config
       runQuery("INSERT INTO SQOOP.SQ_INPUT"
-          +"(SQI_NAME, SQI_FORM, SQI_INDEX, SQI_TYPE, SQI_STRMASK, SQI_STRLENGTH)"
+          +"(SQI_NAME, SQI_CONFIG, SQI_INDEX, SQI_TYPE, SQI_STRMASK, SQI_STRLENGTH)"
           + " VALUES('I3', " + (i * 2 + 2) + ", 0, 'STRING', false, 30)");
       runQuery("INSERT INTO SQOOP.SQ_INPUT"
-          +"(SQI_NAME, SQI_FORM, SQI_INDEX, SQI_TYPE, SQI_STRMASK, SQI_STRLENGTH)"
+          +"(SQI_NAME, SQI_CONFIG, SQI_INDEX, SQI_TYPE, SQI_STRMASK, SQI_STRLENGTH)"
           + " VALUES('I4', " + (i * 2 + 2) + ", 1, 'MAP', false, 30)");
     }
 
-    // Framework input entries.
-    runQuery("INSERT INTO SQOOP.SQ_INPUT (SQI_NAME, SQI_FORM, SQI_INDEX,"
+    // Driver input entries.
+    runQuery("INSERT INTO SQOOP.SQ_INPUT (SQI_NAME, SQI_CONFIG, SQI_INDEX,"
         + " SQI_TYPE, SQI_STRMASK, SQI_STRLENGTH, SQI_ENUMVALS)"
         +" VALUES ('security.maxConnections',11,0,'INTEGER','false',NULL,NULL),"
         + "('input.inputDirectory',9,0,'STRING','false',255,NULL),"
@@ -257,74 +285,72 @@ abstract public class DerbyTestCase {
     runQuery("INSERT INTO SQOOP.SQ_CONNECTOR(SQC_NAME, SQC_CLASS, SQC_VERSION)"
         + "VALUES('A', 'org.apache.sqoop.test.A', '1.0-test')");
 
-    // Connector part
     for (String connector : new String[]{"1"}) {
-      // Form entries
+      // connector configs
       for (String direction : new String[]{"null", "'FROM'", "'TO'"}) {
 
         String type;
         if (direction.equals("null")) {
-          type = "CONNECTION";
+          type = "LINK";
         } else {
           type = "JOB";
         }
 
-        runQuery("INSERT INTO SQOOP.SQ_FORM"
-            + "(SQF_CONNECTOR, SQF_DIRECTION, SQF_NAME, SQF_TYPE, SQF_INDEX) "
+        runQuery("INSERT INTO SQOOP.SQ_CONFIG"
+            + "(SQ_CFG_OWNER, SQ_CFG_DIRECTION, SQ_CFG_NAME, SQ_CFG_TYPE, SQ_CFG_INDEX) "
             + "VALUES("
             + connector + ", "
             + direction
-            + ", 'F1', '"
+            + ", 'C1', '"
             + type
             + "', 0)");
-        runQuery("INSERT INTO SQOOP.SQ_FORM"
-            + "(SQF_CONNECTOR, SQF_DIRECTION, SQF_NAME, SQF_TYPE, SQF_INDEX) "
+        runQuery("INSERT INTO SQOOP.SQ_CONFIG"
+            + "(SQ_CFG_OWNER, SQ_CFG_DIRECTION, SQ_CFG_NAME, SQ_CFG_TYPE, SQ_CFG_INDEX) "
             + "VALUES("
             + connector + ", "
             + direction
-            + ", 'F2', '"
+            + ", 'C2', '"
             + type
             + "', 1)");
       }
     }
 
-    // Framework part
-    for (String type : new String[]{"CONNECTION", "JOB"}) {
-      runQuery("INSERT INTO SQOOP.SQ_FORM"
-          + "(SQF_CONNECTOR, SQF_DIRECTION, SQF_NAME, SQF_TYPE, SQF_INDEX) "
+    // driver config
+    for (String type : new String[]{"JOB"}) {
+      runQuery("INSERT INTO SQOOP.SQ_CONFIG"
+          + "(SQ_CFG_OWNER, SQ_CFG_DIRECTION, SQ_CFG_NAME, SQ_CFG_TYPE, SQ_CFG_INDEX) "
           + "VALUES(NULL, NULL"
-          + ", 'F1', '"
+          + ", 'C1', '"
           + type
           + "', 0)");
-      runQuery("INSERT INTO SQOOP.SQ_FORM"
-          + "(SQF_CONNECTOR, SQF_DIRECTION, SQF_NAME, SQF_TYPE, SQF_INDEX) "
+      runQuery("INSERT INTO SQOOP.SQ_CONFIG"
+          + "(SQ_CFG_OWNER, SQ_CFG_DIRECTION, SQ_CFG_NAME, SQ_CFG_TYPE, SQ_CFG_INDEX) "
           + "VALUES(NULL, NULL"
-          + ", 'F2', '"
+          + ", 'C2', '"
           + type
           + "', 1)");
     }
 
     // Input entries
-    // Connector link parts: 0-3
-    // Connector job (FROM) parts: 4-7
-    // Connector job (TO) parts: 8-11
-    // Framework link parts: 12-15
-    // Framework job parts: 16-19
-    for (int i = 0; i < 5; i++) {
-      // First form
+    // Connector LINK config: 0-3
+    // Connector job (FROM) config: 4-7
+    // Connector job (TO) config: 8-11
+    // Driver JOB config: 12-15
+    for (int i = 0; i < 4; i++) {
+      // First config
       runQuery("INSERT INTO SQOOP.SQ_INPUT"
-          + "(SQI_NAME, SQI_FORM, SQI_INDEX, SQI_TYPE, SQI_STRMASK, SQI_STRLENGTH)"
+          + "(SQI_NAME, SQI_CONFIG, SQI_INDEX, SQI_TYPE, SQI_STRMASK, SQI_STRLENGTH)"
           + " VALUES('I1', " + (i * 2 + 1) + ", 0, 'STRING', false, 30)");
       runQuery("INSERT INTO SQOOP.SQ_INPUT"
-          + "(SQI_NAME, SQI_FORM, SQI_INDEX, SQI_TYPE, SQI_STRMASK, SQI_STRLENGTH)"
+          + "(SQI_NAME, SQI_CONFIG, SQI_INDEX, SQI_TYPE, SQI_STRMASK, SQI_STRLENGTH)"
           + " VALUES('I2', " + (i * 2 + 1) + ", 1, 'MAP', false, 30)");
 
-      // Second form
+      // Second config
       runQuery("INSERT INTO SQOOP.SQ_INPUT"
-          + "(SQI_NAME, SQI_FORM, SQI_INDEX, SQI_TYPE, SQI_STRMASK, SQI_STRLENGTH)"
+          + "(SQI_NAME, SQI_CONFIG, SQI_INDEX, SQI_TYPE, SQI_STRMASK, SQI_STRLENGTH)"
           + " VALUES('I3', " + (i * 2 + 2) + ", 0, 'STRING', false, 30)");
       runQuery("INSERT INTO SQOOP.SQ_INPUT"
-          + "(SQI_NAME, SQI_FORM, SQI_INDEX, SQI_TYPE, SQI_STRMASK, SQI_STRLENGTH)"
+          + "(SQI_NAME, SQI_CONFIG, SQI_INDEX, SQI_TYPE, SQI_STRMASK, SQI_STRLENGTH)"
           + " VALUES('I4', " + (i * 2 + 2) + ", 1, 'MAP', false, 30)");
     }
   }
@@ -350,7 +376,7 @@ abstract public class DerbyTestCase {
     }
   }
 
-  protected void loadConnectorAndDriverConfig() throws Exception {
+  protected void loadConnectorLinkConfig() throws Exception {
     loadConnectorAndDriverConfig(LATEST_SYSTEM_VERSION);
   }
 
@@ -364,15 +390,15 @@ abstract public class DerbyTestCase {
     switch (version) {
       case 2:
         // Insert two links - CA and CB
-        runQuery("INSERT INTO SQOOP.SQ_CONNECTION(SQN_NAME, SQN_CONNECTOR) "
+        runQuery("INSERT INTO SQOOP.SQ_LINK(SQ_LNK_NAME, SQ_LNK_CONNECTOR) "
             + "VALUES('CA', 1)");
-        runQuery("INSERT INTO SQOOP.SQ_CONNECTION(SQN_NAME, SQN_CONNECTOR) "
+        runQuery("INSERT INTO SQOOP.SQ_LINK(SQ_LNK_NAME, SQ_LNK_CONNECTOR) "
             + "VALUES('CB', 1)");
 
         for(String ci : new String[] {"1", "2"}) {
           for(String i : new String[] {"1", "3", "13", "15"}) {
-            runQuery("INSERT INTO SQOOP.SQ_CONNECTION_INPUT"
-                + "(SQNI_CONNECTION, SQNI_INPUT, SQNI_VALUE) "
+            runQuery("INSERT INTO SQOOP.SQ_LINK_INPUT"
+                + "(SQ_LNKI_LINK, SQ_LNKI_INPUT, SQ_LNKI_VALUE) "
                 + "VALUES(" + ci + ", " + i + ", 'Value" + i + "')");
           }
         }
@@ -380,15 +406,15 @@ abstract public class DerbyTestCase {
 
       case 4:
         // Insert two links - CA and CB
-        runQuery("INSERT INTO SQOOP.SQ_CONNECTION(SQN_NAME, SQN_CONNECTOR) "
+        runQuery("INSERT INTO SQOOP.SQ_LINK(SQ_LNK_NAME, SQ_LNK_CONNECTOR) "
             + "VALUES('CA', 1)");
-        runQuery("INSERT INTO SQOOP.SQ_CONNECTION(SQN_NAME, SQN_CONNECTOR) "
+        runQuery("INSERT INTO SQOOP.SQ_LINK(SQ_LNK_NAME, SQ_LNK_CONNECTOR) "
             + "VALUES('CB', 1)");
 
         for (String ci : new String[]{"1", "2"}) {
           for (String i : new String[]{"1", "3", "13", "15"}) {
-            runQuery("INSERT INTO SQOOP.SQ_CONNECTION_INPUT"
-                + "(SQNI_CONNECTION, SQNI_INPUT, SQNI_VALUE) "
+            runQuery("INSERT INTO SQOOP.SQ_LINK_INPUT"
+                + "(SQ_LNKI_LINK, SQ_LNKI_INPUT, SQ_LNKI_VALUE) "
                 + "VALUES(" + ci + ", " + i + ", 'Value" + i + "')");
           }
         }
@@ -414,7 +440,7 @@ abstract public class DerbyTestCase {
       case 2:
         for(String type : new String[] {"IMPORT", "EXPORT"}) {
           for(String name : new String[] {"JA", "JB"} ) {
-            runQuery("INSERT INTO SQOOP.SQ_JOB(SQB_NAME, SQB_CONNECTION, SQB_TYPE)"
+            runQuery("INSERT INTO SQOOP.SQ_JOB(SQB_NAME, SQB_LINK, SQB_TYPE)"
                 + " VALUES('" + name + "', 1, '" + type + "')");
           }
         }
@@ -441,19 +467,19 @@ abstract public class DerbyTestCase {
 
       case 4:
         for (String name : new String[]{"JA", "JB", "JC", "JD"}) {
-          runQuery("INSERT INTO SQOOP.SQ_JOB(SQB_NAME, SQB_FROM_CONNECTION, SQB_TO_CONNECTION)"
+          runQuery("INSERT INTO SQOOP.SQ_JOB(SQB_NAME, SQB_FROM_LINK, SQB_TO_LINK)"
               + " VALUES('" + name + "', 1, 1)");
         }
 
         // Odd IDs inputs have values
         for (String ci : new String[]{"1", "2", "3", "4"}) {
-          for (String i : new String[]{"5", "9", "17"}) {
+          for (String i : new String[]{"5", "9", "13"}) {
             runQuery("INSERT INTO SQOOP.SQ_JOB_INPUT"
                 + "(SQBI_JOB, SQBI_INPUT, SQBI_VALUE) "
                 + "VALUES(" + ci + ", " + i + ", 'Value" + i + "')");
           }
 
-          for (String i : new String[]{"7", "11", "19"}) {
+          for (String i : new String[]{"7", "11", "15"}) {
             runQuery("INSERT INTO SQOOP.SQ_JOB_INPUT"
                 + "(SQBI_JOB, SQBI_INPUT, SQBI_VALUE) "
                 + "VALUES(" + ci + ", " + i + ", 'Value" + i + "')");
@@ -524,71 +550,70 @@ abstract public class DerbyTestCase {
 
   protected MConnector getConnector() {
     return new MConnector("A", "org.apache.sqoop.test.A", "1.0-test",
-      getConnectionForms(), getJobForms(), getJobForms());
+      getLinkConfig(), getFromConfig(), getToConfig());
   }
-
-  protected MDriverConfig getDriverConfig() {
-    return new MDriverConfig(getConnectionForms(), getJobForms(),
-        Driver.CURRENT_DRIVER_VERSION);
+  
+  protected MDriver getDriver() {
+    return new MDriver(getDriverConfig(), DriverBean.CURRENT_DRIVER_VERSION);
   }
 
   protected void fillLink(MLink link) {
-    List<MForm> forms;
-
-    forms = link.getConnectorPart().getForms();
-    ((MStringInput)forms.get(0).getInputs().get(0)).setValue("Value1");
-    ((MStringInput)forms.get(1).getInputs().get(0)).setValue("Value2");
-
-    forms = link.getFrameworkPart().getForms();
-    ((MStringInput)forms.get(0).getInputs().get(0)).setValue("Value13");
-    ((MStringInput)forms.get(1).getInputs().get(0)).setValue("Value15");
+    List<MConfig> configs = link.getConnectorLinkConfig().getConfigs();
+    ((MStringInput)configs.get(0).getInputs().get(0)).setValue("Value1");
+    ((MStringInput)configs.get(1).getInputs().get(0)).setValue("Value2");
   }
 
   protected void fillJob(MJob job) {
-    List<MForm> forms;
+    List<MConfig> configs = job.getJobConfig(Direction.FROM).getConfigs();
+    ((MStringInput)configs.get(0).getInputs().get(0)).setValue("Value1");
+    ((MStringInput)configs.get(1).getInputs().get(0)).setValue("Value2");
 
-    forms = job.getConnectorPart(Direction.FROM).getForms();
-    ((MStringInput)forms.get(0).getInputs().get(0)).setValue("Value1");
-    ((MStringInput)forms.get(1).getInputs().get(0)).setValue("Value2");
+    configs = job.getJobConfig(Direction.TO).getConfigs();
+    ((MStringInput)configs.get(0).getInputs().get(0)).setValue("Value1");
+    ((MStringInput)configs.get(1).getInputs().get(0)).setValue("Value2");
+
+    configs = job.getDriverConfig().getConfigs();
+    ((MStringInput)configs.get(0).getInputs().get(0)).setValue("Value13");
+    ((MStringInput)configs.get(1).getInputs().get(0)).setValue("Value15");
+  }
 
-    forms = job.getConnectorPart(Direction.TO).getForms();
-    ((MStringInput)forms.get(0).getInputs().get(0)).setValue("Value1");
-    ((MStringInput)forms.get(1).getInputs().get(0)).setValue("Value2");
+  protected MLinkConfig getLinkConfig() {
+    return new MLinkConfig(getConfigs());
+  }
 
-    forms = job.getFrameworkPart().getForms();
-    ((MStringInput)forms.get(0).getInputs().get(0)).setValue("Value13");
-    ((MStringInput)forms.get(1).getInputs().get(0)).setValue("Value15");
+  protected MFromConfig getFromConfig() {
+    return  new MFromConfig(getConfigs());
   }
 
-  protected MConnectionForms getConnectionForms() {
-    return new MConnectionForms(getForms());
+  protected MToConfig getToConfig() {
+    return  new MToConfig(getConfigs());
   }
   
-  protected MJobForms getJobForms() {
-    return  new MJobForms(getForms());
+  protected MDriverConfig getDriverConfig() {
+    return  new MDriverConfig(getConfigs());
   }
 
-  protected List<MForm> getForms() {
-    List<MForm> forms = new LinkedList<MForm>();
+  protected List<MConfig> getConfigs() {
+    List<MConfig> jobConfigs = new LinkedList<MConfig>();
 
-    List<MInput<?>> inputs;
-    MInput input;
-
-    inputs = new LinkedList<MInput<?>>();
-    input = new MStringInput("I1", false, (short)30);
+    List<MInput<?>> inputs = new LinkedList<MInput<?>>();
+    MInput input = new MStringInput("I1", false, (short)30);
     inputs.add(input);
     input = new MMapInput("I2", false);
     inputs.add(input);
-    forms.add(new MForm("F1", inputs));
+    // adding the from part of the job config
+    jobConfigs.add(new MConfig("C1", inputs));
 
+    // to
     inputs = new LinkedList<MInput<?>>();
     input = new MStringInput("I3", false, (short)30);
     inputs.add(input);
     input = new MMapInput("I4", false);
     inputs.add(input);
-    forms.add(new MForm("F2", inputs));
+    // adding the to part of the job config
+    jobConfigs.add(new MConfig("C2", inputs));
 
-    return forms;
+    return jobConfigs;
   }
 
   /**
@@ -641,8 +666,8 @@ abstract public class DerbyTestCase {
    * @throws Exception
    */
   protected void generateDatabaseState() throws Exception {
-    for(String tbl : new String[] {"SQ_CONNECTOR", "SQ_FORM", "SQ_INPUT",
-      "SQ_CONNECTION", "SQ_CONNECTION_INPUT", "SQ_JOB", "SQ_JOB_INPUT"}) {
+    for(String tbl : new String[] {"SQ_CONNECTOR", "SQ_CONFIG", "SQ_INPUT",
+      "SQ_LINK", "SQ_LINK_INPUT", "SQ_JOB", "SQ_JOB_INPUT"}) {
       generateTableState("SQOOP." + tbl);
     }
   }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestConnectorHandling.java
----------------------------------------------------------------------
diff --git a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestConnectorHandling.java b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestConnectorHandling.java
index 15306c2..a0e8b91 100644
--- a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestConnectorHandling.java
+++ b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestConnectorHandling.java
@@ -51,7 +51,7 @@ public class TestConnectorHandling extends DerbyTestCase {
     assertNull(handler.findConnector("B", getDerbyDatabaseConnection()));
 
     // Load connector into repository
-    loadConnectorAndDriverConfig();
+    loadConnectorLinkConfig();
 
     // Retrieve it
     MConnector connector = handler.findConnector("A", getDerbyDatabaseConnection());
@@ -69,7 +69,7 @@ public class TestConnectorHandling extends DerbyTestCase {
     // No connectors in an empty repository, we expect an empty list
     assertEquals(handler.findConnectors(getDerbyDatabaseConnection()).size(),0);
 
-    loadConnectorAndDriverConfig();
+    loadConnectorLinkConfig();
     addConnector();
 
     // Retrieve connectors
@@ -93,7 +93,7 @@ public class TestConnectorHandling extends DerbyTestCase {
 
     // Now check content in corresponding tables
     assertCountForTable("SQOOP.SQ_CONNECTOR", 1);
-    assertCountForTable("SQOOP.SQ_FORM", 6);
+    assertCountForTable("SQOOP.SQ_CONFIG", 6);
     assertCountForTable("SQOOP.SQ_INPUT", 12);
 
     // Registered connector should be easily recovered back

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestDriverConfigHandling.java
----------------------------------------------------------------------
diff --git a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestDriverConfigHandling.java b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestDriverConfigHandling.java
deleted file mode 100644
index 9b18bd3..0000000
--- a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestDriverConfigHandling.java
+++ /dev/null
@@ -1,135 +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.repository.derby;
-
-import org.apache.sqoop.driver.Driver;
-import org.apache.sqoop.model.MDriverConfig;
-import org.junit.Before;
-import org.junit.Test;
-
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-/**
- * Test driver config methods on Derby repository.
- */
-public class TestDriverConfigHandling extends DerbyTestCase {
-
-  DerbyRepositoryHandler handler;
-
-  @Before
-  public void setUp() throws Exception {
-    super.setUp();
-
-    handler = new DerbyRepositoryHandler();
-
-    // We always needs schema for this test case
-    createSchema();
-  }
-
-  @Test
-  public void testFindDriverConfig() throws Exception {
-    // On empty repository, no driverConfig should be there
-    assertNull(handler.findDriverConfig(getDerbyDatabaseConnection()));
-    // Load Connector and DriverConfig into repository
-    loadConnectorAndDriverConfig();
-    // Retrieve it
-    MDriverConfig driverConfig = handler.findDriverConfig(getDerbyDatabaseConnection());
-    assertNotNull(driverConfig);
-
-    // Get original structure
-    MDriverConfig originalDriverConfig = getDriverConfig();
-
-    // And compare them
-    assertEquals(originalDriverConfig, driverConfig);
-  }
-
-  @Test
-  public void testRegisterConnector() throws Exception {
-    MDriverConfig driverConfig = getDriverConfig();
-    handler.registerDriverConfig(driverConfig, getDerbyDatabaseConnection());
-
-    // Connector should get persistence ID
-    assertEquals(1, driverConfig.getPersistenceId());
-
-    // Now check content in corresponding tables
-    assertCountForTable("SQOOP.SQ_CONNECTOR", 0);
-    assertCountForTable("SQOOP.SQ_FORM", 4);
-    assertCountForTable("SQOOP.SQ_INPUT", 8);
-
-    // Registered framework should be easily recovered back
-    MDriverConfig retrieved = handler.findDriverConfig(getDerbyDatabaseConnection());
-    assertNotNull(retrieved);
-    assertEquals(driverConfig, retrieved);
-    assertEquals(driverConfig.getVersion(), retrieved.getVersion());
-  }
-
-  private String getDriverVersion() throws Exception {
-    final String frameworkVersionQuery =
-      "SELECT SQM_VALUE FROM SQOOP.SQ_SYSTEM WHERE SQM_KEY=?";
-    String retVal = null;
-    PreparedStatement preparedStmt = null;
-    ResultSet resultSet = null;
-    try {
-      preparedStmt =
-        getDerbyDatabaseConnection().prepareStatement(frameworkVersionQuery);
-      preparedStmt.setString(1, DerbyRepoConstants.SYSKEY_DRIVER_VERSION);
-      resultSet = preparedStmt.executeQuery();
-      if(resultSet.next())
-        retVal = resultSet.getString(1);
-      return retVal;
-    } finally {
-      if(preparedStmt !=null) {
-        try {
-          preparedStmt.close();
-        } catch(SQLException e) {
-        }
-      }
-      if(resultSet != null) {
-        try {
-          resultSet.close();
-        } catch(SQLException e) {
-        }
-      }
-    }
-  }
-
-  @Test
-  public void testDriverVersion() throws Exception {
-    handler.registerDriverConfig(getDriverConfig(), getDerbyDatabaseConnection());
-
-    final String lowerVersion = Integer.toString(
-      Integer.parseInt(Driver.CURRENT_DRIVER_VERSION) - 1);
-    assertEquals(Driver.CURRENT_DRIVER_VERSION, getDriverVersion());
-    runQuery("UPDATE SQOOP.SQ_SYSTEM SET SQM_VALUE='" + lowerVersion +
-      "' WHERE SQM_KEY = '" + DerbyRepoConstants.SYSKEY_DRIVER_VERSION + "'");
-    assertEquals(lowerVersion, getDriverVersion());
-
-    MDriverConfig framework = getDriverConfig();
-    handler.updateDriverConfig(framework, getDerbyDatabaseConnection());
-
-    assertEquals(Driver.CURRENT_DRIVER_VERSION, framework.getVersion());
-
-    assertEquals(Driver.CURRENT_DRIVER_VERSION, getDriverVersion());
-  }
-}

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestDriverHandling.java
----------------------------------------------------------------------
diff --git a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestDriverHandling.java b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestDriverHandling.java
new file mode 100644
index 0000000..d597bd8
--- /dev/null
+++ b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestDriverHandling.java
@@ -0,0 +1,135 @@
+/**
+ * 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.repository.derby;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import org.apache.sqoop.json.DriverBean;
+import org.apache.sqoop.model.MDriver;
+import org.apache.sqoop.model.MDriverConfig;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test driver config methods on Derby repository.
+ */
+public class TestDriverHandling extends DerbyTestCase {
+
+  private static final Object CURRENT_DRIVER_VERSION = "1";
+  DerbyRepositoryHandler handler;
+
+  @Before
+  public void setUp() throws Exception {
+    super.setUp();
+
+    handler = new DerbyRepositoryHandler();
+
+    // We always needs schema for this test case
+    createSchema();
+  }
+
+  @Test
+  public void testFindDriverConfig() throws Exception {
+    // On empty repository, no driverConfig should be there
+    assertNull(handler.findDriver(getDerbyDatabaseConnection()));
+    // Load Connector and DriverConfig into repository
+    loadConnectorLinkConfig();
+    // Retrieve it
+    MDriver driver = handler.findDriver(getDerbyDatabaseConnection());
+    assertNotNull(driver);
+
+    // Get original structure
+    MDriverConfig originalDriverConfig = getDriverConfig();
+    // And compare them
+    assertEquals(originalDriverConfig, driver.getDriverConfig());
+  }
+
+  public void testRegisterDriverAndConnectorConfig() throws Exception {
+    MDriver driver = getDriver();
+    handler.registerDriver(driver, getDerbyDatabaseConnection());
+
+    // Connector should get persistence ID
+    assertEquals(1, driver.getPersistenceId());
+
+    // Now check content in corresponding tables
+    assertCountForTable("SQOOP.SQ_CONNECTOR", 0);
+    assertCountForTable("SQOOP.SQ_CONFIG", 2);
+    assertCountForTable("SQOOP.SQ_INPUT", 4);
+
+    // Registered driver config should be easily recovered back
+    MDriver retrieved = handler.findDriver(getDerbyDatabaseConnection());
+    assertNotNull(retrieved);
+    assertEquals(driver, retrieved);
+    assertEquals(driver.getVersion(), retrieved.getVersion());
+  }
+
+  private String getDriverVersion() throws Exception {
+    final String frameworkVersionQuery =
+      "SELECT SQM_VALUE FROM SQOOP.SQ_SYSTEM WHERE SQM_KEY=?";
+    String retVal = null;
+    PreparedStatement preparedStmt = null;
+    ResultSet resultSet = null;
+    try {
+      preparedStmt =
+        getDerbyDatabaseConnection().prepareStatement(frameworkVersionQuery);
+      preparedStmt.setString(1, DerbyRepoConstants.SYSKEY_DRIVER_VERSION);
+      resultSet = preparedStmt.executeQuery();
+      if(resultSet.next())
+        retVal = resultSet.getString(1);
+      return retVal;
+    } finally {
+      if(preparedStmt !=null) {
+        try {
+          preparedStmt.close();
+        } catch(SQLException e) {
+        }
+      }
+      if(resultSet != null) {
+        try {
+          resultSet.close();
+        } catch(SQLException e) {
+        }
+      }
+    }
+  }
+
+  @Test
+  public void testDriverVersion() throws Exception {
+    MDriver driver = getDriver();
+    handler.registerDriver(driver, getDerbyDatabaseConnection());
+
+    final String lowerVersion = Integer.toString(Integer
+        .parseInt(DriverBean.CURRENT_DRIVER_VERSION) - 1);
+    assertEquals(CURRENT_DRIVER_VERSION, getDriverVersion());
+    runQuery("UPDATE SQOOP.SQ_SYSTEM SET SQM_VALUE='" + lowerVersion + "' WHERE SQM_KEY = '"
+        + DerbyRepoConstants.SYSKEY_DRIVER_VERSION + "'");
+    assertEquals(lowerVersion, getDriverVersion());
+
+    handler.updateDriver(driver, getDerbyDatabaseConnection());
+
+    assertEquals(CURRENT_DRIVER_VERSION, driver.getVersion());
+
+    assertEquals(CURRENT_DRIVER_VERSION, getDriverVersion());
+  }
+}

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestInputTypes.java
----------------------------------------------------------------------
diff --git a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestInputTypes.java b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestInputTypes.java
index d744693..260c2a9 100644
--- a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestInputTypes.java
+++ b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestInputTypes.java
@@ -19,11 +19,11 @@ package org.apache.sqoop.repository.derby;
 
 import org.apache.sqoop.model.MBooleanInput;
 import org.apache.sqoop.model.MLink;
-import org.apache.sqoop.model.MConnectionForms;
+import org.apache.sqoop.model.MLinkConfig;
 import org.apache.sqoop.model.MConnector;
 import org.apache.sqoop.model.MEnumInput;
-import org.apache.sqoop.model.MForm;
-import org.apache.sqoop.model.MDriverConfig;
+import org.apache.sqoop.model.MConfig;
+import org.apache.sqoop.model.MDriver;
 import org.apache.sqoop.model.MInput;
 import org.apache.sqoop.model.MIntegerInput;
 import org.apache.sqoop.model.MMapInput;
@@ -86,19 +86,19 @@ public class TestInputTypes extends DerbyTestCase {
   @Test
   public void testEntityDataSerialization() throws Exception {
     MConnector connector = getConnector();
-    MDriverConfig driverConfig = getDriverConfig();
+    MDriver driver = getDriver();
 
     // Register objects for everything and our new connector
     handler.registerConnector(connector, getDerbyDatabaseConnection());
-    handler.registerDriverConfig(driverConfig, getDerbyDatabaseConnection());
+    handler.registerDriver(driver, getDerbyDatabaseConnection());
 
     // Inserted values
     Map<String, String> map = new HashMap<String, String>();
     map.put("A", "B");
 
     // Connection object with all various values
-    MLink link = new MLink(connector.getPersistenceId(), connector.getConnectionForms(), driverConfig.getConnectionForms());
-    MConnectionForms forms = link.getConnectorPart();
+    MLink link = new MLink(connector.getPersistenceId(), connector.getLinkConfig());
+    MLinkConfig forms = link.getConnectorLinkConfig();
     forms.getStringInput("f.String").setValue("A");
     forms.getMapInput("f.Map").setValue(map);
     forms.getIntegerInput("f.Integer").setValue(1);
@@ -111,7 +111,7 @@ public class TestInputTypes extends DerbyTestCase {
 
     // Retrieve created link
     MLink retrieved = handler.findLink(link.getPersistenceId(), getDerbyDatabaseConnection());
-    forms = retrieved.getConnectorPart();
+    forms = retrieved.getConnectorLinkConfig();
     assertEquals("A", forms.getStringInput("f.String").getValue());
     assertEquals(map, forms.getMapInput("f.Map").getValue());
     assertEquals(1, (int)forms.getIntegerInput("f.Integer").getValue());
@@ -125,8 +125,8 @@ public class TestInputTypes extends DerbyTestCase {
    * @return Forms with all data types
    */
   @Override
-  protected List<MForm> getForms() {
-    List<MForm> forms = new LinkedList<MForm>();
+  protected List<MConfig> getConfigs() {
+    List<MConfig> forms = new LinkedList<MConfig>();
 
     List<MInput<?>> inputs;
     MInput input;
@@ -148,7 +148,7 @@ public class TestInputTypes extends DerbyTestCase {
     input = new MEnumInput("f.Enum", false, new String[] {"YES", "NO"});
     inputs.add(input);
 
-    forms.add(new MForm("f", inputs));
+    forms.add(new MConfig("f", inputs));
     return forms;
   }
 }


Mime
View raw message