Package com.salesforce.dataloader.exception

Examples of com.salesforce.dataloader.exception.ParameterLoadException


            ival = new Double(value).doubleValue();
        } catch (NumberFormatException e) {
            String errMsg = Messages.getFormattedString("Config.errorParameterLoad", new String[] { name,
                    Double.class.getName() });
            logger.warn(errMsg, e);
            throw new ParameterLoadException(e.getMessage(), e);
        }
        return ival;
    }
View Full Code Here


            ival = new Float(value).floatValue();
        } catch (NumberFormatException e) {
            String errMsg = Messages.getFormattedString("Config.errorParameterLoad", new String[] { name,
                    Float.class.getName() });
            logger.warn(errMsg, e);
            throw new ParameterLoadException(e.getMessage(), e);
        }
        return ival;
    }
View Full Code Here

            ival = Integer.parseInt(value);
        } catch (NumberFormatException e) {
            String errMsg = Messages.getFormattedString("Config.errorParameterLoad", new String[] { name,
                    Integer.class.getName() });
            logger.warn(errMsg, e);
            throw new ParameterLoadException(e.getMessage(), e);
        }
        return ival;
    }
View Full Code Here

            ival = Long.parseLong(value);
        } catch (NumberFormatException e) {
            String errMsg = Messages.getFormattedString("Config.errorParameterLoad", new String[] { name,
                    Long.class.getName() });
            logger.warn(errMsg, e);
            throw new ParameterLoadException(e.getMessage(), e);
        }
        return ival;
    }
View Full Code Here

    public String getStringRequired(String name) throws ParameterLoadException {
        String value = getString(name);
        if(value == null || value.length() == 0) {
            String errMsg = Messages.getFormattedString("Config.errorNoRequiredParameter", name); //$NON-NLS-1$
            logger.fatal(errMsg);
            throw new ParameterLoadException(errMsg);
        }
        return value;
    }
View Full Code Here

            dval = DATE_FORMATTER.parse(value);
        } catch (ParseException e) {
            String errMsg = Messages.getFormattedString("Config.errorParameterLoad", new String[] { name,
                    Date.class.getName() });
            logger.warn(errMsg, e);
            throw new ParameterLoadException(e.getMessage(), e);
        }
        return dval;
    }
View Full Code Here

            String[] nameValue = pair.split("=");
            if(nameValue.length != 2) {
                String errMsg = Messages.getFormattedString("Config.errorParameterLoad", new String[] { name,
                        Map.class.getName() });
                logger.warn(errMsg);
                throw new ParameterLoadException(errMsg);
            }
            mval.put(nameValue[0],nameValue[1]);
        }
        return mval;
    }
View Full Code Here

                // if running in the UI, we can ignore encryption errors
                if(isBatch) {
                    String errMsg = Messages.getFormattedString("Config.errorParameterLoad", new String[] { propName,
                            String.class.getName() });
                    logger.error(errMsg, e);
                    throw new ParameterLoadException(errMsg, e);
                } else {
                    return null;
                }
            } catch (Exception e) {
                String errMsg = Messages.getFormattedString("Config.errorParameterLoad", new String[] { propName,
                        String.class.getName() });
                logger.error(errMsg, e);
                throw new ParameterLoadException(errMsg, e);
            }
        }
        return propValue;
    }
View Full Code Here

                    paramValues.put(paramName, sqlValue);
                } else {
                    String errMsg = Messages.getFormattedString("DatabaseDAO.errorParamMissing", new String[] {
                            paramName, dbConfigName });
                    logger.fatal(errMsg);
                    throw new ParameterLoadException(errMsg);
                }
            }
        }

        // Set the parameters for all the replaced params
        // Set the params in the Map
        int index = 1;
        for (String paramName : currentSqlParamNames) {
            Object sqlValue = paramValues.get(paramName);
            try {
                if (sqlValue != null)
                    dataStatement.setObject(index, sqlValue);
                else {
                    dataStatement.setNull(index, getSqlType(sqlConfig.getSqlParams().get(paramName)));
                }
            } catch (SQLException sqe) {
                String valueString = String.valueOf(sqlValue);
                String valueClass = String.valueOf(sqlValue == null ? null : sqlValue.getClass());
                String errMsg = Messages.getFormattedString("DatabaseDAO.sqlExceptionParamReplace", new String[] {
                        this.dbConfigName, paramName, valueString, valueClass, sqe.getMessage() });
                logger.error(errMsg, sqe);
                throw new ParameterLoadException(errMsg, sqe);
            }
            index++;
        }

    }
View Full Code Here

            }
        } catch (ParameterLoadException e) {
            String errMsg = Messages.getFormattedString("DatabaseDAO.errorSqlParamReplace", new String[] { paramName,
                    type, dbConfigName });
            logger.error(errMsg, e);
            throw new ParameterLoadException(errMsg, e);
        }
        return value;
    }
View Full Code Here

TOP

Related Classes of com.salesforce.dataloader.exception.ParameterLoadException

Copyright © 2018 www.massapicom. 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.