Package org.eweb4j.orm.dao

Examples of org.eweb4j.orm.dao.DAOException


          int rs = (Integer) JdbcUtil.update(con, sqls[0]);
          ids[i] = rs;
        }
      }
    } catch (Exception e) {
      throw new DAOException("", e);
    }

    return ids;
  }
View Full Code Here


        con = ds.getConnection();
        String[] sqls = SqlFactory.getDeleteSql(new Object[] { t })
            .delete(fields);
        id = JdbcUtil.update(con, sqls[0]);
      } catch (Exception e) {
        throw new DAOException("", e);
      }
    }
    return id;
  }
View Full Code Here

        String[] sqls = SqlFactory.getDeleteSql(
            new Object[] { clazz.newInstance() }).delete(fields,
            values);
        id = JdbcUtil.update(con, sqls[0]);
      } catch (Exception e) {
        throw new DAOException("", e);
      }
    }
    return id;
  }
View Full Code Here

        con = ds.getConnection();
        String sql = SqlFactory.getDeleteSql(new Object[] { clazz.newInstance() }).deleteWhere(ORMConfigBeanUtil.parseQuery(condition, clazz));
        id = JdbcUtil.updateWithArgs(con, sql, args);
        // 缓存
      } catch (Exception e) {
        throw new DAOException("", e);
      }
    }
    return id;
  }
View Full Code Here

      try {
        con = ds.getConnection();
        List<T> list = JdbcUtil.getList(con, clazz, SqlFactory.getSelectSql(t, dbType).nextOne());
        return list != null && !list.isEmpty() ? list.get(0) : null;
      } catch (Exception e) {
        throw new DAOException("nextOne exception ", e);
      }
    }
    return null;
  }
View Full Code Here

      try {
        con = ds.getConnection();
        List<T> list = JdbcUtil.getList(con, clazz,SqlFactory.getSelectSql(clazz.newInstance(), dbType).nextOne(column, value));
        return list != null && !list.isEmpty() ? list.get(0) : null;
      } catch (Exception e) {
        throw new DAOException("nextOne exception ", e);
      }
    }
    return null;
  }
View Full Code Here

        con = ds.getConnection();
        @SuppressWarnings("unchecked")
        List<T> list = JdbcUtil.getList(con, (Class<T>) t.getClass(),SqlFactory.getSelectSql(t, dbType).preOne());
        return list != null && !list.isEmpty() ? list.get(0) : null;
      } catch (Exception e) {
        throw new DAOException("preOne exception ", e);
      }
    }
    return null;
  }
View Full Code Here

        con = ds.getConnection();
        List<T> list = JdbcUtil.getList(con, clazz,SqlFactory.getSelectSql(clazz.newInstance(), dbType).preOne(column, value));
        return list != null && !list.isEmpty() ? list.get(0) : null;
      } catch (Exception e) {

        throw new DAOException("preOne exception ", e);
      }
    }
    return null;
  }
View Full Code Here

        String sql = SqlFactory.getSelectSql(clazz.newInstance(),
            dbType).divPage(currPage, numPerPage, orderField,
            orderType, condition);
        list = JdbcUtil.getListWithArgs(con, clazz, sql, args);
      } catch (Exception e) {
        throw new DAOException("divPageByWhere exception ", e);
      }
    }
    return list;
  }
View Full Code Here

        String sql = SqlFactory.getSelectSql(clazz.newInstance(),
            dbType).selectWhere(fields, values, -2, false, false,
            isOR, orderField, orderType, currPage, numPerPage);
        list = JdbcUtil.getList(con, clazz, sql);
      } catch (Exception e) {
        throw new DAOException("divPageByFieldIsValue exception ", e);
      }
    }
    return list;
  }
View Full Code Here

TOP

Related Classes of org.eweb4j.orm.dao.DAOException

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.