Package org.apache.commons.beanutils.converters

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


        registerArrayConverter(Boolean.TYPE,   new BooleanConverter(),   throwException, defaultArraySize);
        registerArrayConverter(Byte.TYPE,      new ByteConverter(),      throwException, defaultArraySize);
        registerArrayConverter(Character.TYPE, new CharacterConverter(), throwException, defaultArraySize);
        registerArrayConverter(Double.TYPE,    new DoubleConverter(),    throwException, defaultArraySize);
        registerArrayConverter(Float.TYPE,     new FloatConverter(),     throwException, defaultArraySize);
        registerArrayConverter(Integer.TYPE,   new IntegerConverter(),   throwException, defaultArraySize);
        registerArrayConverter(Long.TYPE,      new LongConverter(),      throwException, defaultArraySize);
        registerArrayConverter(Short.TYPE,     new ShortConverter(),     throwException, defaultArraySize);

        // Standard
        registerArrayConverter(BigDecimal.class, new BigDecimalConverter(), throwException, defaultArraySize);
        registerArrayConverter(BigInteger.class, new BigIntegerConverter(), throwException, defaultArraySize);
        registerArrayConverter(Boolean.class,    new BooleanConverter(),    throwException, defaultArraySize);
        registerArrayConverter(Byte.class,       new ByteConverter(),       throwException, defaultArraySize);
        registerArrayConverter(Character.class,  new CharacterConverter(),  throwException, defaultArraySize);
        registerArrayConverter(Double.class,     new DoubleConverter(),     throwException, defaultArraySize);
        registerArrayConverter(Float.class,      new FloatConverter(),      throwException, defaultArraySize);
        registerArrayConverter(Integer.class,    new IntegerConverter(),    throwException, defaultArraySize);
        registerArrayConverter(Long.class,       new LongConverter(),       throwException, defaultArraySize);
        registerArrayConverter(Short.class,      new ShortConverter(),      throwException, defaultArraySize);
        registerArrayConverter(String.class,     new StringConverter(),     throwException, defaultArraySize);

        // Other
View Full Code Here


   */
  public static Object buildEntity(BaseBO baseBO, Object obj) throws IllegalAccessException, InvocationTargetException {
    final BeanUtilsBean beanUtilsBean = BeanUtilsBean.getInstance();
   
    beanUtilsBean.getConvertUtils().register(new CalendarConverter( null), Calendar.class);
    beanUtilsBean.getConvertUtils().register(new IntegerConverter( null), Integer.class);
    beanUtilsBean.getConvertUtils().register(new LongConverter(null), Long.class);
   
    beanUtilsBean.copyProperties(obj, baseBO);
   
    return obj;
View Full Code Here

   */
  public static BaseBO buildBO(Object obj, BaseBO baseBO) throws IllegalAccessException, InvocationTargetException {
    final BeanUtilsBean beanUtilsBean = BeanUtilsBean.getInstance();
   
    beanUtilsBean.getConvertUtils().register(new CalendarConverter( null), Calendar.class);
    beanUtilsBean.getConvertUtils().register(new IntegerConverter( null), Integer.class);
    beanUtilsBean.getConvertUtils().register(new LongConverter(null), Long.class);
   
    beanUtilsBean.copyProperties(baseBO, obj);
   
    return baseBO;
View Full Code Here

        cub.register(
            new DoubleArrayConverter(doubleArray), doubleArray.getClass());
        cub.register(new FloatConverter(), Float.TYPE);
        cub.register(new FloatConverter(), Float.class);
        cub.register(new FloatArrayConverter(), floatArray.getClass());
        cub.register(new IntegerConverter(), Integer.TYPE);
        cub.register(new IntegerConverter(), Integer.class);
        cub.register(new IntegerArrayConverter(), intArray.getClass());
        cub.register(new LongConverter(), Long.TYPE);
        cub.register(new LongConverter(), Long.class);
        cub.register(new LongArrayConverter(), longArray.getClass());
        cub.register(new ShortConverter(), Short.TYPE);
View Full Code Here

    findIdFieldName();

    // FIXME: add other converters so that null values are stored instead of
    // defaults. if you don't do this, you'll get a default value stored
    // instead of a null
    ConvertUtils.register(new IntegerConverter(null), Integer.class);
    ConvertUtils.register(new LongConverter(null), Long.class);
    ConvertUtils.register(new BooleanConverter(null), Boolean.class);

    // FIXME: todo, add support for time. could just make all date fields
    // datetime instead
View Full Code Here

TOP

Related Classes of org.apache.commons.beanutils.converters.IntegerConverter

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.