Review Board 1.7.22


SQOOP-1076 Sqoop2: Introduce Boolean model type

Review Request #11749 - Created June 8, 2013 and submitted

Jarek Cecho
SQOOP-1076
Reviewers
Sqoop
sqoop-sqoop2
I've added new model type for Boolean as suggested on the JIRA. In addition I've added two exhaustive tests for all data types (for derby repository and for JSON serialization).
All unit and integration tests seems to be passing.
client/src/main/java/org/apache/sqoop/client/utils/FormDisplayer.java
Revision 36509c4eb6071a20efcc2269c79bd455a53debd9 New Change
[20] 16 lines
[+20]
17
 */
17
 */
18
package org.apache.sqoop.client.utils;
18
package org.apache.sqoop.client.utils;
19

    
   
19

   
20
import org.apache.sqoop.client.core.Constants;
20
import org.apache.sqoop.client.core.Constants;
21
import org.apache.sqoop.model.MAccountableEntity;
21
import org.apache.sqoop.model.MAccountableEntity;

    
   
22
import org.apache.sqoop.model.MBooleanInput;
22
import org.apache.sqoop.model.MConnection;
23
import org.apache.sqoop.model.MConnection;
23
import org.apache.sqoop.model.MEnumInput;
24
import org.apache.sqoop.model.MEnumInput;
24
import org.apache.sqoop.model.MForm;
25
import org.apache.sqoop.model.MForm;
25
import org.apache.sqoop.model.MFramework;
26
import org.apache.sqoop.model.MFramework;
26
import org.apache.sqoop.model.MInput;
27
import org.apache.sqoop.model.MInput;
[+20] [20] 143 lines
[+20] [+] private static void displayForm(MForm form, ResourceBundle bundle) {
170
              displayInputString((MStringInput) input);
171
              displayInputString((MStringInput) input);
171
              break;
172
              break;
172
            case INTEGER:
173
            case INTEGER:
173
              displayInputInteger((MIntegerInput) input);
174
              displayInputInteger((MIntegerInput) input);
174
              break;
175
              break;

    
   
176
            case BOOLEAN:

    
   
177
              displayInputBoolean((MBooleanInput) input);

    
   
178
              break;
175
            case MAP:
179
            case MAP:
176
              displayInputMap((MMapInput) input);
180
              displayInputMap((MMapInput) input);
177
              break;
181
              break;
178
            case ENUM:
182
            case ENUM:
179
              displayInputEnum((MEnumInput) input);
183
              displayInputEnum((MEnumInput) input);
[+20] [20] 25 lines
[+20] [+] private static void displayInputString(MStringInput input) {
205
  private static void displayInputInteger(MIntegerInput input) {
209
  private static void displayInputInteger(MIntegerInput input) {
206
    print(input.getValue());
210
    print(input.getValue());
207
  }
211
  }
208

    
   
212

   
209
  /**
213
  /**

    
   
214
   * Display content of Boolean input.

    
   
215
   *

    
   
216
   * @param input Boolean input

    
   
217
   */

    
   
218
  private static void displayInputBoolean(MBooleanInput input) {

    
   
219
    print(input.getValue());

    
   
220
  }

    
   
221

   

    
   
222
  /**
210
   * Display content of Map input
223
   * Display content of Map input
211
   *
224
   *
212
   * @param input Map input
225
   * @param input Map input
213
   */
226
   */
214
  private static void displayInputMap(MMapInput input) {
227
  private static void displayInputMap(MMapInput input) {
[+20] [20] 22 lines
client/src/main/java/org/apache/sqoop/client/utils/FormFiller.java
Revision 95d06122c6f86c163e42d187ebc65cefaa15e77f New Change
 
common/src/main/java/org/apache/sqoop/json/util/FormSerialization.java
Revision 048323b8d5a000e385774cee304e06447612bc1d New Change
 
common/src/main/java/org/apache/sqoop/model/FormUtils.java
Revision 80b10c803695a7a4578641ac7533b2a7588a0d47 New Change
 
common/src/main/java/org/apache/sqoop/model/MBooleanInput.java
New File
 
common/src/main/java/org/apache/sqoop/model/MForm.java
Revision cc7d88c1d57f3e5713c2eafe5377fb52cd87ae63 New Change
 
common/src/main/java/org/apache/sqoop/model/MFormList.java
Revision c1c3a414b047b3428440231e1be3d29d1c93131a New Change
 
common/src/main/java/org/apache/sqoop/model/MInputType.java
Revision 76411e335e6bf7981d483be8fc1fa595bfdc3738 New Change
 
common/src/test/java/org/apache/sqoop/json/util/TestFormSerialization.java
New File
 
common/src/test/java/org/apache/sqoop/model/TestMBooleanInput.java
New File
 
core/src/main/java/org/apache/sqoop/repository/Repository.java
Revision 21dd759ea0825438de26b3538acca95a72a2a359 New Change
 
repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
Revision 45a0da4e069e506186a3948cd73032d02724c057 New Change
 
repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestInputTypes.java
New File
 
  1. client/src/main/java/org/apache/sqoop/client/utils/FormDisplayer.java: Loading...
  2. client/src/main/java/org/apache/sqoop/client/utils/FormFiller.java: Loading...
  3. common/src/main/java/org/apache/sqoop/json/util/FormSerialization.java: Loading...
  4. common/src/main/java/org/apache/sqoop/model/FormUtils.java: Loading...
  5. common/src/main/java/org/apache/sqoop/model/MBooleanInput.java: Loading...
  6. common/src/main/java/org/apache/sqoop/model/MForm.java: Loading...
  7. common/src/main/java/org/apache/sqoop/model/MFormList.java: Loading...
  8. common/src/main/java/org/apache/sqoop/model/MInputType.java: Loading...
  9. common/src/test/java/org/apache/sqoop/json/util/TestFormSerialization.java: Loading...
  10. common/src/test/java/org/apache/sqoop/model/TestMBooleanInput.java: Loading...
  11. core/src/main/java/org/apache/sqoop/repository/Repository.java: Loading...
  12. repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java: Loading...
  13. repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestInputTypes.java: Loading...