Package org.springframework.dao

Examples of org.springframework.dao.DataAccessException


      if (resultSet == null) {
        try {
          this.statement.setLong(pColOrdinal, pValue);
        }
        catch (SQLException e) {
          DataAccessException errorVar = new SQLErrorCodeSQLExceptionTranslator().translate("DBDataSet.setValue(" + pColOrdinal +"," + pValue + ")", "", e );
          ErrorMgr.addError(errorVar);
          throw errorVar;
        }
      } else {
        // AD:20/11/2008: Allow for CachedRowSet to be updated if the DBDataSet has already been populated.
View Full Code Here


      if (resultSet == null) {
        try {
          this.statement.setBoolean(pColOrdinal, pValue);
        }
        catch (SQLException e) {
          DataAccessException errorVar = new SQLErrorCodeSQLExceptionTranslator().translate("DBDataSet.setValue(" + pColOrdinal +"," + pValue + ")", "", e );
          ErrorMgr.addError(errorVar);
          throw errorVar;
        }
      } else {
        // AD:20/11/2008: Allow for CachedRowSet to be updated if the DBDataSet has already been populated.
View Full Code Here

      if (resultSet == null) {
        try {
          this.statement.setShort(pColOrdinal, pValue);
        }
        catch (SQLException e) {
          DataAccessException errorVar = new SQLErrorCodeSQLExceptionTranslator().translate("DBDataSet.setValue(" + pColOrdinal +"," + pValue + ")", "", e );
          ErrorMgr.addError(errorVar);
          throw errorVar;
        }
      } else {
        // AD:20/11/2008: Allow for CachedRowSet to be updated if the DBDataSet has already been populated.
View Full Code Here

      if (resultSet == null) {
        try {
          this.statement.setString(pColOrdinal, pValue);
        }
        catch (SQLException e) {
          DataAccessException errorVar = new SQLErrorCodeSQLExceptionTranslator().translate("DBDataSet.setValue(" + pColOrdinal +"," + pValue + ")", "", e );
          ErrorMgr.addError(errorVar);
          throw errorVar;
        }
      } else {
        // AD:20/11/2008: Allow for CachedRowSet to be updated if the DBDataSet has already been populated.
View Full Code Here

      EntityTransaction tx = txObject.getEntityManagerHolder().getEntityManager().getTransaction();
      tx.commit();
    }
    catch (RollbackException ex) {
      if (ex.getCause() instanceof RuntimeException) {
        DataAccessException dex = getJpaDialect().translateExceptionIfPossible((RuntimeException) ex.getCause());
        if (dex != null) {
          throw dex;
        }
      }
      throw new TransactionSystemException("Could not commit JPA transaction", ex);
View Full Code Here

      }
      // Don't close the EntityManager... That's up to the user.
    }

    private RuntimeException convertCompletionException(RuntimeException ex) {
      DataAccessException daex = (this.exceptionTranslator != null) ?
          this.exceptionTranslator.translateExceptionIfPossible(ex) :
          EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(ex);
      return (daex != null ? daex : ex);
    }
View Full Code Here

                }
   
            }
        }
        catch (SQLException e) {
            DataAccessException qq_dae = new SQLErrorCodeSQLExceptionTranslator().translate("SQL tasks", "", e );
            ErrorMgr.addError(e);
            ErrorMgr.addError(qq_dae);
            throw qq_dae;
        }
    }
View Full Code Here

            }
   
            return result;
        }
        catch (SQLException e) {
            DataAccessException qq_dae = new SQLErrorCodeSQLExceptionTranslator().translate("SQL tasks", "", e );
            ErrorMgr.addError(e);
            ErrorMgr.addError(qq_dae);
            throw qq_dae;
        }
    }
View Full Code Here

                for (int i = 1; i <= numCols; i++) {
                    cds.add(new DBColumnDesc(data, i));
                }
            }
        } catch (SQLException e) {
            DataAccessException errorVar = new SQLErrorCodeSQLExceptionTranslator().translate("Cannot get column List from result set\n" + e.getMessage(), "", e );
            ErrorMgr.addError(errorVar);
            throw errorVar;
            // PM:16/07/2008
        } catch (NullPointerException e){
          String msg = (e.getMessage() == null) ? e.getClass().getName() : e.getMessage();
View Full Code Here

      if (resultSet == null) {
        try {
          setter.setParameterValue(this.statement, pColOrdinal, SqlTypeValue.TYPE_UNKNOWN, null, pValue);
        }
        catch (SQLException e) {
          DataAccessException errorVar = new SQLErrorCodeSQLExceptionTranslator().translate("DBDataSet.setValue(" + pColOrdinal +"," + pValue + ")", "", e );
          ErrorMgr.addError(errorVar);
          throw errorVar;
        }
      } else {
        // AD:20/11/2008: Allow for CachedRowSet to be updated if the DBDataSet has already been populated.
View Full Code Here

TOP

Related Classes of org.springframework.dao.DataAccessException

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.