Examples of IsoConversionException


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

Examples of net.sf.isolation.conversion.IsoConversionException

    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

Examples of net.sf.isolation.conversion.IsoConversionException

        @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

Examples of net.sf.isolation.conversion.IsoConversionException

      }
      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

Examples of net.sf.isolation.conversion.IsoConversionException

    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

Examples of net.sf.isolation.conversion.IsoConversionException

      }
      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

Examples of net.sf.isolation.conversion.IsoConversionException

      }
      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

Examples of net.sf.isolation.conversion.IsoConversionException

  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

Examples of net.sf.isolation.conversion.IsoConversionException

      }
      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

Examples of net.sf.isolation.conversion.IsoConversionException

  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
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.