daoruntimeexception.java

来自「权限系统以为业务逻辑提供服务为目标。这个系统的设计目的」· Java 代码 · 共 50 行

JAVA
50
字号
package com.tairun.component.popedom.util;

import org.apache.commons.lang.exception.NestableRuntimeException;
import org.springframework.jdbc.support.SQLExceptionTranslator;
import org.springframework.dao.DataAccessException;

import java.sql.SQLException;

/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 2005-12-6
 * Time: 9:56:05
 * To change this template use File | Settings | File Templates.
 */
public class DAORuntimeException extends NestableRuntimeException implements SQLExceptionTranslator{

    /**
     * Constructs an Exception with a detailed message.
     *
     * @param message The message associated with the exception.
     */
    public DAORuntimeException(final String message) {
        super(message);
    }

    /**
     * Constructs an Exception with a detailed message and detailed cause.
     *
     * @param message The message associated with the exception.
     * @param cause   the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
     */
    public DAORuntimeException(final String message, final Throwable cause) {
        super(message, cause);
    }

    /**
     * Constructs an Exception with a detailed cause.
     *
     * @param cause the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
     */
    public DAORuntimeException(final Throwable cause) {
        super(cause);
    }

    public DataAccessException translate(String s, String s1, SQLException e) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?