Java 类org.springframework.dao.NonTransientDataAccessResourceException 实例源码

项目:eHMP    文件:JdsDao.java   
public DataAccessException translate(String task, String url, RestClientException e) {
    if (e instanceof ResourceAccessException) {
        return new DataAccessResourceFailureException(getMessage(task, url), e);
    } else if (e instanceof HttpStatusCodeException) {
        return new DataRetrievalFailureException(getMessage(task, url, (HttpStatusCodeException) e), e);
    } else {
        return new NonTransientDataAccessResourceException(getMessage(task, url), e);
    }
}
项目:eHMP    文件:DefaultJdsExceptionTranslator.java   
@Override
public DataAccessException translate(String task, String url, RestClientException e) {
    if (e instanceof ResourceAccessException) {
        return new DataAccessResourceFailureException(getMessage(task, url), e);
    } else if (e instanceof HttpStatusCodeException) {
        return new DataRetrievalFailureException(getMessage(task, url, (HttpStatusCodeException) e), e);
    } else {
        return new NonTransientDataAccessResourceException(getMessage(task, url), e);
    }
}
项目:opennmszh    文件:DefaultManualProvisioningDao.java   
/**
 * <p>setImportFileDirectory</p>
 *
 * @param importFileDir a {@link java.io.File} object.
 */
public void setImportFileDirectory(final File importFileDir) {
    m_importFileDir = importFileDir;
    if (!m_importFileDir.exists()) {
        if (!m_importFileDir.mkdirs()) {
            throw new NonTransientDataAccessResourceException("import file directory (" + m_importFileDir.getPath() + ") does not exist");
        }
    }
}
项目:OpenNMS    文件:DefaultManualProvisioningDao.java   
/**
 * <p>setImportFileDirectory</p>
 *
 * @param importFileDir a {@link java.io.File} object.
 */
public void setImportFileDirectory(final File importFileDir) {
    m_importFileDir = importFileDir;
    if (!m_importFileDir.exists()) {
        if (!m_importFileDir.mkdirs()) {
            throw new NonTransientDataAccessResourceException("import file directory (" + m_importFileDir.getPath() + ") does not exist");
        }
    }
}