Package org.g4studio.core.orm.xibatis.sqlmap.client

Examples of org.g4studio.core.orm.xibatis.sqlmap.client.SqlMapException


public class SimpleDateFormatter {
  public static Date format(String format, String datetime) {
    try {
      return new SimpleDateFormat(format).parse(datetime);
    } catch (ParseException e) {
      throw new SqlMapException("Error parsing default null value date.  Format must be '" + format
          + "'. Cause: " + e);
    }
  }
View Full Code Here


      try {
        Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
        doc.appendChild(doc.createElement(name));
        resultObject = doc;
      } catch (ParserConfigurationException e) {
        throw new SqlMapException("Error creating new Document for DOM result.  Cause: " + e, e);
      }
    }

    Probe probe = ProbeFactory.getProbe(resultObject);
View Full Code Here

      SqlMapSessionImpl sqlMapSession = new SqlMapSessionImpl(this);
      sqlMapSession.open();
      sqlMapSession.setUserConnection(conn);
      return sqlMapSession;
    } catch (SQLException e) {
      throw new SqlMapException("Error setting user provided connection.  Cause: " + e, e);
    }
  }
View Full Code Here

   * @return the MemoryCacheLevel that the name indicates
   */
  public static MemoryCacheLevel getByReferenceType(String refType) {
    MemoryCacheLevel cacheLevel = (MemoryCacheLevel) cacheLevelMap.get(refType);
    if (cacheLevel == null) {
      throw new SqlMapException("Error getting CacheLevel (reference type) for name: '" + refType + "'.");
    }
    return cacheLevel;
  }
View Full Code Here

    errorContext.setActivity("setting default timeout");
    if (defaultTimeout != null) {
      try {
        defaultStatementTimeout = defaultTimeout;
      } catch (NumberFormatException e) {
        throw new SqlMapException("Specified defaultStatementTimeout is not a valid integer");
      }
    }
  }
View Full Code Here

        typeHandlerFactory.register(javaType, jdbcType, typeHandler);
      } else {
        typeHandlerFactory.register(javaType, typeHandler);
      }
    } catch (Exception e) {
      throw new SqlMapException("Error registering occurred.  Cause: " + e, e);
    }
    errorContext.setMoreInfo(null);
    errorContext.setObjectId(null);
  }
View Full Code Here

      this.iterator = ((Iterator) collection);
    } else if (collection.getClass().isArray()) {
      List list = arrayToList(collection);
      this.iterator = list.iterator();
    } else {
      throw new SqlMapException("ParameterObject or property was not a Collection, Array or Iterator.");
    }
  }
View Full Code Here

TOP

Related Classes of org.g4studio.core.orm.xibatis.sqlmap.client.SqlMapException

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.