Examples of UnsupportedFormatException


Examples of net.sourceforge.squirrel_sql.plugins.dataimport.importer.UnsupportedFormatException

      long value = 0;
      try {
        value = Long.parseLong(getFixedValue(column));
        value += counter;
      } catch (NumberFormatException nfe) {
        throw new UnsupportedFormatException();
      }
      switch (column.getDataType()) {
      case Types.BIGINT:
         stmt.setLong(index, value);
        break;
      case Types.INTEGER:
      case Types.NUMERIC:
         stmt.setInt(index, (int)value);
        break;
      default:
        throw new UnsupportedFormatException();
      }
  }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.plugins.dataimport.importer.UnsupportedFormatException

      switch (column.getDataType()) {
      case Types.BIGINT:
        try {
          stmt.setLong(index, Long.parseLong(value));
        } catch (NumberFormatException nfe) {
          throw new UnsupportedFormatException();
        }
        break;
      case Types.INTEGER:
      case Types.NUMERIC:
        setIntOrUnsignedInt(stmt, index, column);
View Full Code Here

Examples of net.sourceforge.squirrel_sql.plugins.dataimport.importer.UnsupportedFormatException

  private void setDateOrNull(PreparedStatement stmt, int index,
      String value) throws UnsupportedFormatException, SQLException {
    if (null != value) {
      Date d = DateUtils.parseSQLFormats(value);
      if (d == null)
        throw new UnsupportedFormatException();
      stmt.setDate(index, new java.sql.Date(d.getTime()));
    } else {
      stmt.setNull(index, Types.DATE);
    }
  }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.plugins.dataimport.importer.UnsupportedFormatException

  private void setTimeStampOrNull(PreparedStatement stmt, int index,
      String value) throws UnsupportedFormatException, SQLException {
    if (null != value) {
      Date d = DateUtils.parseSQLFormats(value);
      if (d == null)
        throw new UnsupportedFormatException();
      stmt.setTimestamp(index, new java.sql.Timestamp(d.getTime()));
    } else {
      stmt.setNull(index, Types.TIMESTAMP);
    }
  }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.plugins.dataimport.importer.UnsupportedFormatException

  private void setTimeOrNull(PreparedStatement stmt, int index, String value)
      throws UnsupportedFormatException, SQLException {
    if (null != value) {
      Date d = DateUtils.parseSQLFormats(value);
      if (d == null)
        throw new UnsupportedFormatException();
      stmt.setTime(index, new java.sql.Time(d.getTime()));
    } else {
      stmt.setNull(index, Types.TIME);
    }
  }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.plugins.dataimport.importer.UnsupportedFormatException

      if (null == longS || 0 == longS.trim().length()){
        return null;
      }       
      return Long.parseLong(longS);
    } catch (NumberFormatException nfe) {
      throw new UnsupportedFormatException();
    }
  }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.plugins.dataimport.importer.UnsupportedFormatException

      if (null == intS || 0 == intS.trim().length()){
        return null;
      }
      return Integer.parseInt(intS);
    } catch (NumberFormatException nfe) {
      throw new UnsupportedFormatException(nfe);
    }
  }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.plugins.dataimport.importer.UnsupportedFormatException

        d = f.parse(dateString);
      }
    } catch (IllegalArgumentException e) {
      //i18n[CSVFileImporter.invalidDateFormat=Invalid date format given]
      JOptionPane.showMessageDialog(null, stringMgr.getString("CSVFileImporter.invalidDateFormat"));
      throw new UnsupportedFormatException();
    } catch (ParseException pe) {
      throw new UnsupportedFormatException();
    }
    return d;
  }
View Full Code Here

Examples of org.apache.maven.doxia.UnsupportedFormatException

            }
        }

        if ( parser == null )
        {
            throw new UnsupportedFormatException( format, supportedFormats );
        }

        return parser;
    }
View Full Code Here

Examples of org.apache.maven.doxia.UnsupportedFormatException

            }
        }

        if ( factory == null )
        {
            throw new UnsupportedFormatException( format, supportedFormats );
        }

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