jdbc-protolib/src/main/java/com/streamsets/pipeline/lib/jdbc/typesupport/JdbcTypeSupport.java
@SuppressWarnings("unchecked")
  public JdbcTypeInfo generateJdbcTypeInfoFromMetadataField(Field jdbcTypeInfoField, JdbcSchemaWriter schemaWriter) throws StageException {
    if (jdbcTypeInfoField.getType() == Field.Type.MAP) {
      Map<String, Field> fields = (Map<String, Field>) jdbcTypeInfoField.getValue();
      if (!fields.containsKey(TYPE)
          || !fields.containsKey(EXTRA_INFO)) {
        throw new StageException(JdbcErrors.JDBC_308, TYPE_INFO);
      }
      JdbcType jdbcType = JdbcType.getJdbcTypeFromString(fields.get(TYPE).getValueAsString());
      return generateJdbcTypeInfoFromMetadataField(jdbcType, fields.get(EXTRA_INFO), schemaWriter);
    } else {
      throw new StageException(JdbcErrors.JDBC_308, TYPE_INFO);
    }
  }
@SuppressWarnings("unchecked")
  public JdbcTypeInfo generateJdbcTypeInfoFromMetadataField(Field jdbcTypeInfoField, JdbcSchemaWriter schemaWriter) throws StageException {
    if (jdbcTypeInfoField.getType() == Field.Type.MAP) {
      Map<String, Field> fields = (Map<String, Field>) jdbcTypeInfoField.getValue();
      if (!fields.containsKey(TYPE)
          || !fields.containsKey(EXTRA_INFO)) {
        throw new StageException(JdbcErrors.JDBC_308, TYPE_INFO);
      }
      JdbcType jdbcType = JdbcType.getJdbcTypeFromString(fields.get(TYPE).getValueAsString());
      return generateJdbcTypeInfoFromMetadataField(jdbcType, fields.get(EXTRA_INFO), schemaWriter);
    } else {
      throw new StageException(JdbcErrors.JDBC_308, TYPE_INFO);
    }
  }
@ SuppressWarnings ( "unchecked" ) public JdbcTypeInfo generateJdbcTypeInfoFromMetadataField ( Field jdbcTypeInfoField , JdbcSchemaWriter schemaWriter ) throws StageException { if ( jdbcTypeInfoField . getType ( ) == Field . Type . MAP ) { Map < String , Field > fields = ( Map < String , Field > ) jdbcTypeInfoField . getValue ( ) ; if ( ! fields . containsKey ( TYPE ) || ! fields . containsKey ( EXTRA_INFO ) ) { throw new StageException ( JdbcErrors . JDBC_308 , TYPE_INFO ) ; } JdbcType jdbcType = JdbcType . getJdbcTypeFromString ( fields . get ( TYPE ) . getValueAsString ( ) ) ; return generateJdbcTypeInfoFromMetadataField ( jdbcType , fields . get ( EXTRA_INFO ) , schemaWriter ) ; } else { throw new StageException ( JdbcErrors . JDBC_308 , TYPE_INFO ) ; } }
Generate {@link JdbcTypeInfo} from the Metadata Record <br>.
(Reverse of {@link #generateJdbcTypeInfoFieldForMetadataRecord(JdbcTypeInfo)})

@throws StageException if the metadata field is not valid.
@param jdbcTypeInfoField
@return {@link JdbcTypeInfo}
@throws StageException If the record has invalid
Generate { @link JdbcTypeInfo } from the Metadata Record <br > . ( Reverse of { @link #generateJdbcTypeInfoFieldForMetadataRecord ( JdbcTypeInfo ) } )