Package com.avaje.ebean.text

Examples of com.avaje.ebean.text.TextException


    return Short.valueOf(value);
  }

  @Override
  public Short parseDateTime(long systemTimeMillis) {
    throw new TextException("Not Supported");
  }
View Full Code Here


    return value;
  }

  @Override
  public T parseDateTime(long systemTimeMillis) {
    throw new TextException("Not Supported");
  }
View Full Code Here

  @Override
  public URI parse(String value) {
    try {
      return new URI(value);
    } catch (URISyntaxException e) {
      throw new TextException("Error with URI [" + value + "] ", e);
    }
  }
View Full Code Here

  @Override
  public InetAddress parse(String value) {
    try {
      return ConvertInetAddresses.forUriString(value);
    } catch (IllegalArgumentException e) {
      throw new TextException("Error with InetAddresses [" + value + "] ", e);
    }
  }
View Full Code Here

  public void addDateTime(String propertyName, String dateTimeFormat, Locale locale) {

    ElPropertyValue elProp = descriptor.getElGetValue(propertyName);
    if (!elProp.isDateTimeCapable()) {
      throw new TextException("Property " + propertyName + " is not DateTime capable");
    }

    if (dateTimeFormat == null) {
      dateTimeFormat = getDefaultDateTimeFormat(elProp.getJdbcType());
    }
View Full Code Here

          // the line content is expected to be ok for processing
          if (line.length != columnList.size()) {
            // we have not got the expected number of columns
            String msg = "Error at line " + row + ". Expected [" + columnList.size() + "] columns "
                    + "but instead we have [" + line.length + "].  Line[" + Arrays.toString(line) + "]";
            throw new TextException(msg);
          }

          T bean = buildBeanFromLineContent(row, line);

          callback.processBean(row, line, bean);
View Full Code Here

  private void addPropertiesFromHeader(String[] line) {
    for (int i = 0; i < line.length; i++) {
      ElPropertyValue elProp = descriptor.getElGetValue(line[i]);
      if (elProp == null) {
        throw new TextException("Property [" + line[i] + "] not found");
      }

      if (Types.TIME == elProp.getJdbcType()) {
        addProperty(line[i], TIME_PARSER);
View Full Code Here

  public String formatValue(Byte t) {
    return t.toString();
  }

  public Byte parse(String value) {
    throw new TextException("Not supported");
  }
View Full Code Here

  public Byte parse(String value) {
    throw new TextException("Not supported");
  }

  public Byte parseDateTime(long systemTimeMillis) {
    throw new TextException("Not Supported");
  }
View Full Code Here

      try {
        Date dt = dateFormat.parse(value);
        return elProp.parseDateTime(dt.getTime());

      } catch (ParseException e) {
        throw new TextException("Error parsing [" + value + "] using format[" + format + "]", e);
      }
    }
View Full Code Here

TOP

Related Classes of com.avaje.ebean.text.TextException

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.