Package com.ibatis.dao.client

Examples of com.ibatis.dao.client.DaoException


   */
  public Map queryForMap(String id, Object parameterObject, String keyProp, String valueProp) {
    try {
      return getSqlMapExecutor().queryForMap(id, parameterObject, keyProp, valueProp);
    } catch (SQLException e) {
      throw new DaoException("Failed to queryForMap - id [" + id + "], parameterObject ["
          + parameterObject + "], keyProp [" + keyProp + "], valueProp ["
          + valueProp + "].  Cause: " + e, e);
    }
  }
View Full Code Here


   */
  public void startBatch() {
    try {
      getSqlMapExecutor().startBatch();
    } catch (SQLException e) {
      throw new DaoException("Failed to startBatch.  Cause: " + e, e);
    }
  }
View Full Code Here

   */
  public int executeBatch() {
    try {
      return getSqlMapExecutor().executeBatch();
    } catch (SQLException e) {
      throw new DaoException("Failed to executeBatch.  Cause: " + e, e);
    }
  }
View Full Code Here

            }
          }
        }
      }
    } catch (Exception e) {
      throw new DaoException("Error while configuring DaoManager.  Cause: " + e.toString(), e);
    }
    return daoManager;
  }
View Full Code Here


    try {
      txMgr = (DaoTransactionManager) Class.forName(implementation).newInstance();
    } catch (Exception e) {
      throw new DaoException("Error while configuring DaoManager.  Cause: " + e.toString(), e);
    }

    Properties props = properties;

    if (props == null) {
      props = parsePropertyElements(transPoolElement);
    } else {
      props.putAll(parsePropertyElements(transPoolElement));
    }

    txMgr.configure(props);

    if (txMgr == null) {
      throw new DaoException("Error while configuring DaoManager.  Some unknown condition caused the " +
          "DAO Transaction Manager to be null after configuration.");
    }

    return txMgr;
  }
View Full Code Here

          }

          daoImpl.setDaoInstance(dao);
          daoImpl.initProxy();
        } catch (Exception e) {
          throw new DaoException("Error configuring DAO.  Cause: " + e, e);
        }
      }
    }
    return daoImpl;
  }
View Full Code Here

            }
          }
        }
      }
    } catch (Exception e) {
      throw new DaoException("Error while configuring DaoManager.  Cause: " + e.toString(), e);
    }
    return daoManager;
  }
View Full Code Here


    try {
      txMgr = (DaoTransactionManager) Class.forName(implementation).newInstance();
    } catch (Exception e) {
      throw new DaoException("Error while configuring DaoManager.  Cause: " + e.toString(), e);
    }

    Properties props = properties;

    if (props == null) {
      props = parsePropertyElements(transPoolElement);
    } else {
      props.putAll(parsePropertyElements(transPoolElement));
    }

    txMgr.configure(props);

    if (txMgr == null) {
      throw new DaoException("Error while configuring DaoManager.  Some unknown condition caused the " +
          "DAO Transaction Manager to be null after configuration.");
    }

    return txMgr;
  }
View Full Code Here

          }

          daoImpl.setDaoInstance(dao);
          daoImpl.initProxy();
        } catch (Exception e) {
          throw new DaoException("Error configuring DAO.  Cause: " + e, e);
        }
      }
    }
    return daoImpl;
  }
View Full Code Here

  public synchronized int getNextId(String name) {
    Sequence sequence = new Sequence(name, -1);

    sequence = (Sequence) queryForObject("getSequence", sequence);
    if (sequence == null) {
      throw new DaoException("Error: A null sequence was returned from the database (could not get next " + name + " sequence).");
    }
    Object parameterObject = new Sequence(name, sequence.getNextId() + 1);
    update("updateSequence", parameterObject);

    return sequence.getNextId();
View Full Code Here

TOP

Related Classes of com.ibatis.dao.client.DaoException

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.