Package org.apache.ibatis.mapping

Examples of org.apache.ibatis.mapping.SqlMapperException


  }

  public Iterable evaluateIterable(String expression, Object parameterObject) {
    try {
      Object value = Ognl.getValue(expression, parameterObject);
      if (value == null) throw new SqlMapperException("The expression '" + expression + "' evaluated to a null value.");
      if (value instanceof Iterable) return (Iterable) value;
      if (value.getClass().isArray()) return Arrays.asList((Object[]) value);
      throw new BuilderException("Error evaluating expression '" + expression + "'.  Return value (" + value + ") was not iterable.");
    } catch (OgnlException e) {
      throw new BuilderException("Error evaluating expression '" + expression + "'. Cause: " + e, e);
View Full Code Here


  }

  public Iterable evaluateIterable(String expression, Object parameterObject) {
    try {
      Object value = Ognl.getValue(expression, parameterObject);
      if (value == null) throw new SqlMapperException("The expression '" +expression+ "' evaluated to a null value.");
      if (value instanceof Iterable) return (Iterable) value;
      if (value.getClass().isArray()) return Arrays.asList((Object[])value);
      throw new BuilderException("Error evaluating expression '"+expression+"'.  Return value ("+value+") was not iterable.");
    } catch (OgnlException e) {
      throw new BuilderException("Error evaluating expression '"+expression+"'. Cause: " + e, e);
View Full Code Here

  }

  public Iterable<?> evaluateIterable(String expression, Object parameterObject) {
    try {
      Object value = Ognl.getValue(expression, parameterObject);
      if (value == null) throw new SqlMapperException("The expression '" + expression + "' evaluated to a null value.");
      if (value instanceof Iterable) return (Iterable<?>) value;
      if (value.getClass().isArray()) {
          // the array may be primitive, so Arrays.asList() may throw
          // a ClassCastException (issue 209).  Do the work manually
          // Curse primitives! :) (JGB)
View Full Code Here

TOP

Related Classes of org.apache.ibatis.mapping.SqlMapperException

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.