public int queryForCounts(String id, Object obj) {
            //调用父类用来初始化执行sql所需要的变量
            createClass(id);
            int count = 0;
            try {
                st = con.createStatement();
                if (obj != null) {
                    this.parseEntity(obj);
                }
                System.out.println(sql);
                rs = st.executeQuery(sql);
    			if(rs.next()){
    				count = rs.getInt(1);
    			}
            } catch (Exception e) {
                e.printStackTrace();
            } finally {
                closeAll();
            }
            return count;
        }