Package easyJ.common

Examples of easyJ.common.EasyJException


            // TODO 自动生成 catch 块
            e.printStackTrace();
            String clientMessage = "服务器忙";
            String location = "easyJ.database.dao.SQLServerDAOImpl.executeQuery()";
            String logMessage = "SQL语句执行错误,请查看生成的SQL是否正确";
            EasyJException ee = new EasyJException(e, location, logMessage,
                    clientMessage);
            throw ee;
        } finally {
            try {
                if (rs != null) {
View Full Code Here


    }

    public Object get(Object o, Connection conn) throws EasyJException {
        ArrayList list = query(o, conn);
        if (list.size() == 0) {
            EasyJException ee = new EasyJException();
            String location = "SQLServerDAOImpl.getObject(Object o,Connection conn)";
            String clientMessage = "您查找的数据不存在";
            throw ee;
        }
        return list.get(0);
View Full Code Here

            // TODO 自动生成 catch 块
            e.printStackTrace();
            String clientMessage = "服务器忙";
            String location = "easyJ.database.dao.SQLServerDAOImpl.executeUpdate(String updateSQL,ArrayList paramValueList,Connection conn)";
            String logMessage = "SQL语句执行时错误,请检查SQL语句";
            EasyJException ee = new EasyJException(e, location, logMessage,
                    clientMessage);
            throw ee;
        } catch (Exception e) {
            if (e instanceof EasyJException) {
                throw (EasyJException) e;
            }
            e.printStackTrace();
            String clientMessage = "服务器忙";
            String location = "easyJ.database.dao.SQLServerDAOImpl.executeUpdate(String updateSQL,ArrayList paramValueList,Connection conn)";
            String logMessage = "运行时异常";
            EasyJException ee = new EasyJException(e, location, logMessage,
                    clientMessage);
            throw ee;
        } finally {
            try {
                if (psst != null) {
View Full Code Here

            // TODO 自动生成 catch 块
            e.printStackTrace();
            String clientMessage = "服务器忙";
            String location = "easyJ.database.dao.SQLServerDAOImpl.create(Object o,Connection conn)";
            String logMessage = "SQL语句执行时错误,请检查SQL语句";
            EasyJException ee = new EasyJException(e, location, logMessage,
                    clientMessage);
            throw ee;
        } catch (Exception e) {
            if (e instanceof EasyJException) {
                throw (EasyJException) e;
            }
            e.printStackTrace();
            String clientMessage = "服务器忙";
            String location = "easyJ.database.dao.SQLServerDAOImpl.create(Object o,Connection conn)";
            String logMessage = "运行时异常";
            EasyJException ee = new EasyJException(e, location, logMessage,
                    clientMessage);
            throw ee;
        }

        finally {
View Full Code Here

            // TODO 自动生成 catch 块
            e.printStackTrace();
            String clientMessage = "服务器忙";
            String location = "easyJ.database.dao.SQLServerDAOImpl.create(Object o,Connection conn)";
            String logMessage = "SQL语句执行时错误,请检查SQL语句";
            EasyJException ee = new EasyJException(e, location, logMessage,
                    clientMessage);
            throw ee;
        } catch (Exception e) {
            if (e instanceof EasyJException) {
                throw (EasyJException) e;
            }
            e.printStackTrace();
            String clientMessage = "服务器忙";
            String location = "easyJ.database.dao.SQLServerDAOImpl.create(Object o,Connection conn)";
            String logMessage = "运行时异常";
            EasyJException ee = new EasyJException(e, location, logMessage,
                    clientMessage);
            throw ee;
        }

        finally {
View Full Code Here

            // TODO 自动生成 catch 块
            e.printStackTrace();
            String clientMessage = "服务器忙";
            String location = "easyJ.database.dao.ExecuteSQL.executeQueryResultSet(String sql,ArrayList paramValueList,Connection conn)";
            String logMessage = "SQL语句执行出错,请检查SQL语句";
            EasyJException ee = new EasyJException(e, location, logMessage,
                    clientMessage);
            throw ee;
        }
    }
View Full Code Here

            // TODO 自动生成 catch 块
            e.printStackTrace();
            String clientMessage = "服务器忙";
            String location = "easyJ.database.dao.SQLServerDAOImpl.rsToArrayList(ResultSet rs, Class oclass)";
            String logMessage = "数据从ResultSet中读取时出错,检查数据库字段";
            EasyJException ee = new EasyJException(e, location, logMessage,
                    clientMessage);
            throw ee;
        } catch (InstantiationException e) {
            e.printStackTrace();
            String clientMessage = "服务器忙";
            String location = "easyJ.database.dao.SQLServerDAOImpl.rsToArrayList(ResultSet rs, Class oclass)";
            String logMessage = "类实例化时出错,请检查类:" + oclass + " 是否有不带参数的构造方法";
            EasyJException ee = new EasyJException(e, location, logMessage,
                    clientMessage);
            throw ee;
        } catch (IllegalAccessException e) {
            e.printStackTrace();
            String clientMessage = "服务器忙";
            String location = "easyJ.database.dao.SQLServerDAOImpl.rsToArrayList(ResultSet rs, Class oclass)";
            String logMessage = "类实例化时出错,请检查类:" + oclass
                    + "的不带参数的构造方法是否是public的";
            EasyJException ee = new EasyJException(e, location, logMessage,
                    clientMessage);
            throw ee;
        } finally {
            try {
                if (rs != null) {
View Full Code Here

        } catch (SQLException sqle) {
            sqle.printStackTrace();
            String clientMessage = "服务器忙";
            String location = "easyJ.database.dao.SQLServerDAOImpl.setElement(PreparedStatement psst, ArrayList paramValueList)";
            String logMessage = "对PreparedStatement进行设置的时候出现错误,检查数据的类型是否和数据库的类型匹配";
            EasyJException ee = new EasyJException(sqle, location, logMessage,
                    clientMessage);
            throw ee;
        }
        return psst;
    }
View Full Code Here

        } catch (SQLException sqle) {
            sqle.printStackTrace();
            String clientMessage = "服务器忙";
            String location = "easyJ.database.dao.SQLServerDAOImpl.setElement(PreparedStatement psst, ArrayList paramValueList)";
            String logMessage = "对PreparedStatement进行设置的时候出现错误,检查数据的类型是否和数据库的类型匹配";
            EasyJException ee = new EasyJException(sqle, location, logMessage,
                    clientMessage);
            throw ee;
        }
        return psst;
    }
View Full Code Here

    protected ArrayList paramTypeList = new ArrayList();

    public InsertCommandSQLServerImpl(String tableName) throws EasyJException {
        if (GenericValidator.isBlankOrNull(tableName)
                || tableName.indexOf(",") >= 0) {
            throw new EasyJException();
        }
        this.tableName = tableName;
    }
View Full Code Here

TOP

Related Classes of easyJ.common.EasyJException

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.