Package br.com.caelum.vraptor.converter

Examples of br.com.caelum.vraptor.converter.ConversionError


      if (date == null) {
        return null;
      }
      return LocalDate.fromDateFields(date);
    } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_date"), value));
    }
  }
View Full Code Here


      if (datetime == null) {
        return null;
      }
      return LocalDateTime.fromDateFields(datetime);
    } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_datetime"), value));
    }
  }
View Full Code Here

          if (time == null) {
            return null;
          }
          return LocalTime.fromDateFields(time);
        } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_time"), value));
        }
  }
View Full Code Here

                return null;
            }
           
            return out.toLocalDate();
    } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_date"), value));
    }
  }
View Full Code Here

                return null;
            }
           
            return out.toDateTime();
    } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_datetime"), value));
    }
  }
View Full Code Here

                return null;
            }
           
            return out.toLocalDateTime();
    } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_datetime"), value));
    }
  }
View Full Code Here

                return null;
            }
           
            return out.toLocalTime();
        } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_time"), value));
        }
  }
View Full Code Here

                return null;
            }
           
            return out.toDateMidnight();
    } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_datetime"), value));
    }
  }
View Full Code Here

            final Locale locale = localization.getLocale();
            DecimalFormat fmt = ((DecimalFormat) DecimalFormat.getInstance(locale));

            return fmt.parse(value).floatValue();
        } catch (ParseException e) {
            throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_number"), value));
        }
    }
View Full Code Here

            final Locale locale = localization.getLocale();
            DecimalFormat fmt = ((DecimalFormat) DecimalFormat.getInstance(locale));

            return fmt.parse(value).floatValue();
        } catch (ParseException e) {
            throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_number"), value));
        }
    }
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.converter.ConversionError

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.