Package net.sf.isolation.conversion

Examples of net.sf.isolation.conversion.IsoConversionException


        T t = (T) (value == null ? null
            : new BigDecimal((String) value));
        return t;
      }
    } catch (ClassCastException exception) {
      throw new IsoConversionException(String.valueOf(value), exception);
    }
    if (type == String.class) {
      @SuppressWarnings("unchecked")
      T t = (T) (value == null ? null : value.toString());
      return t;
View Full Code Here


    if (type == String.class) {
      @SuppressWarnings("unchecked")
      T t = (T) (value == null ? value : value.toString());
      return t;
    }
    throw new IsoConversionException(type.getName());
  }
View Full Code Here

        @SuppressWarnings("unchecked")
        T t = (T) (value == null ? null : getDateFormat().parse(
            (String) value));
        return t;
      } catch (ParseException exception) {
        throw new IsoConversionException(String.valueOf(value),
            exception);
      }
    } else {
      if (type == String.class) {
        try {
          @SuppressWarnings("unchecked")
          T t = (T) (value == null ? null : getDateFormat().format(
              (Date) value));
          return t;
        } catch (ClassCastException exception) {
          throw new IsoConversionException(String.valueOf(value),
              exception);
        }
      }
    }
    throw new IsoConversionNotSupportedException(type.getName());
View Full Code Here

      }
      if (type == Byte.class) {
        return (T) (value == null ? null : Byte.valueOf((String) value));
      }
    } catch (ClassCastException exception) {
      throw new IsoConversionException(String.valueOf(value), exception);
    }
    if (type == String.class) {
      return (T) (value == null ? null : value.toString());
    }
    throw new IsoConversionNotSupportedException(type.getName());
View Full Code Here

    if (type == Date.class) {
      try {
        return value == null ? null : getDateFormat().parse(
            (String) value);
      } catch (ParseException exception) {
        throw new IsoConversionException(String.valueOf(value),
            exception);
      }
    }
    if (type == String.class) {
      try {
        return value == null ? null : getDateFormat().format(
            (Date) value);
      } catch (ClassCastException exception) {
        throw new IsoConversionException(String.valueOf(value),
            exception);
      }
    }
    throw new IsoConversionNotSupportedException(type.getName());
  }
View Full Code Here

      }
      if (type == Byte.class) {
        return value == null ? null : Byte.valueOf((String) value);
      }
    } catch (ClassCastException exception) {
      throw new IsoConversionException(String.valueOf(value), exception);
    }
    if (type == String.class) {
      return value == null ? null : value.toString();
    }
    throw new IsoConversionNotSupportedException(type.getName());
View Full Code Here

      }
      if (type == BigDecimal.class) {
        return value == null ? null : new BigDecimal((String) value);
      }
    } catch (ClassCastException exception) {
      throw new IsoConversionException(String.valueOf(value), exception);
    }
    if (type == String.class) {
      return value == null ? null : value.toString();
    }
    throw new IsoConversionNotSupportedException(type.getName());
View Full Code Here

  public Object convert(Class<?> type, Object value)
      throws IsoConversionException {
    if (type == String.class) {
      return value == null ? value : value.toString();
    }
    throw new IsoConversionException(type.getName());
  }
View Full Code Here

      }
      if (type == BigDecimal.class) {
        return value == null ? null : new BigDecimal((String) value);
      }
    } catch (ClassCastException exception) {
      throw new IsoConversionException(String.valueOf(value), exception);
    }
    if (type == String.class) {
      return value == null ? null : value.toString();
    }
    throw new IsoConversionNotSupportedException(type.getName());
View Full Code Here

  public Object convert(Class<?> type, Object value)
      throws IsoConversionException {
    if (type == String.class) {
      return value == null ? value : value.toString();
    }
    throw new IsoConversionException(type.getName());
  }
View Full Code Here

TOP

Related Classes of net.sf.isolation.conversion.IsoConversionException

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.