Package org.eweb4j.orm.dao

Examples of org.eweb4j.orm.dao.DAOException


        String sql = SqlFactory.getSelectSql(t, dbType).selectWhere(
            fields, null, likeType, true, false, isOR, orderField,
            orderType, currPage, numPerPage);
        list = JdbcUtil.getList(con, clazz, sql);
      } catch (Exception e) {
        throw new DAOException("divPageByFieldLikeValue exception", e);
      }
    }
    return list;
  }
View Full Code Here


        String sql = SqlFactory.getSelectSql(t, dbType).selectWhere(
            fields, null, likeType, true, true, isOR, orderField,
            orderType, currPage, numPerPage);
        list = JdbcUtil.getList(con, clazz, sql);
      } catch (Exception e) {
        throw new DAOException("", e);
      }
    }
    return list;
  }
View Full Code Here

          }
        }

      }
    } catch (Exception e) {
      throw new DAOException("", e);
    }

    return ids;
  }
View Full Code Here

      int rs = (Integer) JdbcUtil.updateWithArgs(con, sql, args);
      if (rs > 0) {
        id = DAOUtil.selectMaxId(clazz, ds.getConnection(), dbType);
      }
    } catch (Exception e) {
      throw new DAOException("", e);
    }

    return id;
  }
View Full Code Here

          }
        }

      }
    } catch (Exception e) {
      throw new DAOException("", e);
    }

    return ids;
  }
View Full Code Here

          }
        }

      }
    } catch (Exception e) {
      throw new DAOException("", e);
    }

    return ids;
  }
View Full Code Here

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

    return ids;
  }
View Full Code Here

    this.table = ORMConfigBeanUtil.getTable(this.t.getClass());
    // 主类的ID属性名
    this.idField = ORMConfigBeanUtil.getIdField(this.t.getClass());
    this.idGetter = ru.getGetter(idField);
    if (idGetter == null)
      throw new DAOException("can not find idGetter.", null);

    this.idColumn = ORMConfigBeanUtil.getIdColumn(this.t.getClass());

    Object idVal = null;
    try {
      idVal = idGetter.invoke(this.t);
      this.idVal = idVal == null ? null : String.valueOf(idVal);
    } catch (Exception e) {
      throw new DAOException(idGetter + " invoke exception ", e);
    }

  }
View Full Code Here

          List<?> fList = null;

          try {
            fList = (List<?>) fGetter.invoke(t);
          } catch (Exception e) {
            throw new DAOException(fGetter + " invoke exception ",e);
          }

          if (fList == null)
            continue;
View Full Code Here

          List<?> tarList = null;

          try {
            tarList = (List<?>) tarGetter.invoke(t);
          } catch (Exception e) {
            throw new DAOException(
                tarGetter + " invoke exception ", e);
          }
         
          if (tarList == null || tarList.size() == 0) {
            // 当关联对象为空的时候,删除所有关联对象
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.