Examples of LongConverter


Examples of org.apache.commons.beanutils.converters.LongConverter

            ConvertUtils.register(new CharacterConverter(null),
                                  Character.class);
            ConvertUtils.register(new DoubleConverter(null), Double.class);
            ConvertUtils.register(new FloatConverter(null), Float.class);
            ConvertUtils.register(new IntegerConverter(null), Integer.class);
            ConvertUtils.register(new LongConverter(null), Long.class);
            ConvertUtils.register(new ShortConverter(null), Short.class);
        }

    }
View Full Code Here

Examples of org.apache.commons.beanutils.converters.LongConverter

            ConvertUtils.register(new ByteConverter(null), Byte.class);
            ConvertUtils.register(new CharacterConverter(null), Character.class);
            ConvertUtils.register(new DoubleConverter(null), Double.class);
            ConvertUtils.register(new FloatConverter(null), Float.class);
            ConvertUtils.register(new IntegerConverter(null), Integer.class);
            ConvertUtils.register(new LongConverter(null), Long.class);
            ConvertUtils.register(new ShortConverter(null), Short.class);
        }

    }
View Full Code Here

Examples of org.apache.commons.beanutils.converters.LongConverter

        return (defaultLong.longValue());
    }

    public static void setDefaultLong(long newDefaultLong) {
        defaultLong = new Long(newDefaultLong);
        converters.put(Long.TYPE, new LongConverter(defaultLong));
        converters.put(Long.class, new LongConverter(defaultLong));
    }
View Full Code Here

Examples of org.apache.commons.beanutils.converters.LongConverter

                       new FloatArrayConverter(floatArray));
        converters.put(Integer.TYPE, new IntegerConverter(defaultInteger));
        converters.put(Integer.class, new IntegerConverter(defaultInteger));
        converters.put(intArray.getClass(),
                       new IntegerArrayConverter(intArray));
        converters.put(Long.TYPE, new LongConverter(defaultLong));
        converters.put(Long.class, new LongConverter(defaultLong));
        converters.put(longArray.getClass(),
                       new LongArrayConverter(longArray));
        converters.put(Short.TYPE, new ShortConverter(defaultShort));
        converters.put(Short.class, new ShortConverter(defaultShort));
        converters.put(shortArray.getClass(),
View Full Code Here

Examples of org.apache.commons.beanutils.converters.LongConverter

    ConvertUtils.register(new SqlTimestampConverter(null),Timestamp.class);
    //number
    ConvertUtils.register(new BooleanConverter(null), Boolean.class);
    ConvertUtils.register(new ShortConverter(null), Short.class);
    ConvertUtils.register(new IntegerConverter(null), Integer.class);
    ConvertUtils.register(new LongConverter(null), Long.class);
    ConvertUtils.register(new FloatConverter(null), Float.class);
    ConvertUtils.register(new DoubleConverter(null), Double.class);
    ConvertUtils.register(new BigDecimalConverter(null), BigDecimal.class);
    ConvertUtils.register(new BigIntegerConverter(null), BigInteger.class)
  }
View Full Code Here

Examples of org.apache.commons.beanutils.converters.LongConverter

    convertUtils.register(ConvertRegisterHelper.setPatterns(new SqlTimestampConverter(null),datePatterns),Timestamp.class);
    //number
    convertUtils.register(new BooleanConverter(null), Boolean.class);
    convertUtils.register(new ShortConverter(null), Short.class);
    convertUtils.register(new IntegerConverter(null), Integer.class);
    convertUtils.register(new LongConverter(null), Long.class);
    convertUtils.register(new FloatConverter(null), Float.class);
    convertUtils.register(new DoubleConverter(null), Double.class);
    convertUtils.register(new BigDecimalConverter(null), BigDecimal.class);
    convertUtils.register(new BigIntegerConverter(null), BigInteger.class)
  }
View Full Code Here

Examples of org.apache.wicket.util.convert.converter.LongConverter

   * Test long conversions.
   */
  @Test
  public void longConversions()
  {
    LongConverter converter = new LongConverter();
    assertNull(converter.convertToObject("", Locale.US));
    assertEquals(new Long(10), converter.convertToObject("10", Locale.US));
    assertEquals("10", converter.convertToString((long)10, Locale.US));
    try
    {
      converter.convertToObject("whatever", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
    }
    try
    {
      converter.convertToObject("10whatever", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
    }
    try
    {
      converter.convertToObject("" + Long.MAX_VALUE + "0", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
View Full Code Here

Examples of org.apache.wicket.util.convert.converter.LongConverter

  /**
   * Test long conversions.
   */
  public void testLongConversions()
  {
    LongConverter converter = new LongConverter();
    assertEquals(new Long(10), converter.convertToObject("10", Locale.US));
    assertEquals("10", converter.convertToString((long) 10, Locale.US));
    try
    {
      converter.convertToObject("whatever", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
    }
    try
    {
      converter.convertToObject("10whatever", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
    }
    try
    {
      converter.convertToObject("" + Long.MAX_VALUE + "0", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
View Full Code Here

Examples of org.apache.wicket.util.convert.converter.LongConverter

  /**
   * Test long conversions.
   */
  public void testLongConversions()
  {
    LongConverter converter = new LongConverter();
    assertNull(converter.convertToObject("", Locale.US));
    assertEquals(new Long(10), converter.convertToObject("10", Locale.US));
    assertEquals("10", converter.convertToString((long)10, Locale.US));
    try
    {
      converter.convertToObject("whatever", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
    }
    try
    {
      converter.convertToObject("10whatever", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
    }
    try
    {
      converter.convertToObject("" + Long.MAX_VALUE + "0", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
View Full Code Here

Examples of org.apache.wicket.util.convert.converter.LongConverter

  /**
   * Test long conversions.
   */
  public void testLongConversions()
  {
    LongConverter converter = new LongConverter();
    assertEquals(new Long(10), converter.convertToObject("10", Locale.US));
    assertEquals("10", converter.convertToString(new Long(10), Locale.US));
    try
    {
      converter.convertToObject("whatever", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
    }
    try
    {
      converter.convertToObject("10whatever", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
    }
    try
    {
      converter.convertToObject("" + Long.MAX_VALUE + "0", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
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.