Examples of CalendarConverter


Examples of org.dozer.converters.CalendarConverter

    dc.convert(String.class, "123");
  }

  @Test(expected = ConversionException.class)
  public void testInvalidCalendarInput() throws Exception {
    CalendarConverter dc = new CalendarConverter(DateFormat.getDateInstance(DateFormat.LONG));
    dc.convert(java.util.GregorianCalendar.class, "jfdlajf");
  }
View Full Code Here

Examples of org.dozer.converters.CalendarConverter

   */
  @Test
  public void testAccessors() throws Exception {
    DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.LONG);

    CalendarConverter cc = new CalendarConverter(dateFormat);
    assertEquals(dateFormat, cc.getDateFormat());

    StringConverter sc = new StringConverter(null);
    DateFormatContainer dfc = new DateFormatContainer(null);
    sc.setDateFormatContainer(dfc);
    assertEquals(dfc, sc.getDateFormatContainer());
View Full Code Here

Examples of org.dozer.converters.CalendarConverter

    dc.convert(String.class, "123");
  }

  @Test(expected = ConversionException.class)
  public void testInvalidCalendarInput() throws Exception {
    CalendarConverter dc = new CalendarConverter(DateFormat.getDateInstance(DateFormat.LONG));
    dc.convert(java.util.GregorianCalendar.class, "jfdlajf");
  }
View Full Code Here

Examples of org.jbehave.examples.core.converters.CalendarConverter

    System.out.println(amount);
  }
 
  @AsParameterConverter
  public Calendar calendarDate(String value){
      return (Calendar) new CalendarConverter("dd/MM/yyyy").convertValue(value, Calendar.class);
  }
View Full Code Here

Examples of org.more.convert.convert.CalendarConverter

     * <code>false</code> if a default value should be used.
     */
    private void registerOther(final boolean throwException) {
        this.register(Class.class, throwException ? new ClassConverter() : new ClassConverter(null));
        this.register(java.util.Date.class, throwException ? new DateConverter() : new DateConverter(null));
        this.register(Calendar.class, throwException ? new CalendarConverter() : new CalendarConverter(null));
        this.register(File.class, throwException ? new FileConverter() : new FileConverter(null));
        this.register(java.sql.Date.class, throwException ? new SqlDateConverter() : new SqlDateConverter(null));
        this.register(java.sql.Time.class, throwException ? new SqlTimeConverter() : new SqlTimeConverter(null));
        this.register(Timestamp.class, throwException ? new SqlTimestampConverter() : new SqlTimestampConverter(null));
        this.register(URL.class, throwException ? new URLConverter() : new URLConverter(null));
View Full Code Here

Examples of org.skyway.spring.util.databinding.CalendarConverter

  public ConverterForCalendar(String pattern){
    this(pattern, TypeConversionUtils.getLocale());
  }
 
  public ConverterForCalendar(String pattern, Locale locale){
    this.converter = new CalendarConverter(pattern, locale);
  }
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.