Package easyJ.common

Examples of easyJ.common.EasyJException


    }

    public void addInsertItem(String property, Object value)
            throws EasyJException {
        if (GenericValidator.isBlankOrNull(property)) {
            throw new EasyJException();
        }
        paramNameList.add(property);
        paramValueList.add(value);
        paramTypeList.add(value.getClass());
    }
View Full Code Here


    protected String condition;

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

                || BeanUtil.getFieldValue(o, BeanUtil
                        .getPrimaryKeyName(updateClass)) == null) {
            String clientMessage = "服务器忙";
            String location = "SQLServerDAOImpl.executeUpdate(Object o)";
            String logMessage = "参数错误,更新的数据不能为空,主键值也不能为空";
            EasyJException ee = new EasyJException(null, location, logMessage,
                    clientMessage);
            throw ee;
        }
        Field fields[] = updateClass.getDeclaredFields();
        for (int i = 0; i < fields.length; i++) {
View Full Code Here

                    + ",ou=People,o=SEForge,dc=sei,dc=pku",
                    LDAPConnection.SCOPE_SUB, "objectClass=*", null, false);
            SysUser user = new SysUser();
            user.setUserName(uid);
            if (!rs.hasMore()) {
                throw new EasyJException(
                        null,
                        "easyJ.system.service.LDAPService.getUserFromLDAP(String)",
                        user.getUserName() + "的用户名密码错", "用户名密码错");
            }
            while (rs.hasMore()) {

                LDAPEntry entry = rs.next();
                LDAPAttributeSet attSet = entry.getAttributeSet();
                Iterator it = attSet.iterator();
                while (it.hasNext()) {
                    LDAPAttribute attr = (LDAPAttribute) it.next();
                    if (attr.getName().equalsIgnoreCase("userPassword")) {
                        user.setPassword(attr.getStringValue());
                    }
                }
            }
            return user;
        } catch (LDAPException e) {
            // e.printStackTrace();
            throw new EasyJException(null,
                    "easyJ.system.service.LDAPService.getUserFromLDAP(String)",
                    "验证服务器出错", "验证服务器出错");
        } finally {
            try {
                connection.disconnect();
View Full Code Here

            connection.add(entry);
            System.out.println("成功的添加了一条记录!");
            connection.disconnect();
        } catch (Exception e) {
            e.printStackTrace();
            throw new EasyJException(null,
                    "easyJ.system.service.LDAPService.addUserToLDAP(SysUser)",
                    "验证服务器出错", "验证服务器出错");
        }

    }
View Full Code Here

                                    .getPassword())));
            System.out.println("成功修改一条记录!");
            connection.disconnect();
        } catch (LDAPException e) {
            e.printStackTrace();
            throw new EasyJException(null,
                    "easyJ.system.service.LDAPService.changePassword(SysUser)",
                    "验证服务器出错", "验证服务器出错");
        }

    }
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

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.