Examples of RankInfoDTO


Examples of org.jresearch.gossip.beans.RankInfoDTO

          && countInt >= 0) {

        int delta = Integer.MAX_VALUE;
        Iterator it = Ranks.getInstance().getRanks().iterator();
        while (it.hasNext()) {
          RankInfoDTO rank = (RankInfoDTO) it.next();
          int d = rank.getCount() - countInt;
          if (d >= 0 && d < delta) {
            statusString = rank.getName();
          }
          delta = d;
        }
      } else {
        MessageResources messages = (MessageResources) pageContext
View Full Code Here

Examples of org.jresearch.gossip.beans.RankInfoDTO

                id = -1;
            }
            List records = dao.getRankList();
            Iterator it = records.iterator();
            while (it.hasNext()) {
                RankInfoDTO curr = (RankInfoDTO) it.next();
                if (curr.getCount() == count && curr.getId() != id) {
                    ActionErrors errors = new ActionErrors();
                    errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(
                            "errors.ERR23", rForm.getCount()));
                    saveErrors(request, errors);
                    return mapping.getInputForward();
View Full Code Here

Examples of org.jresearch.gossip.beans.RankInfoDTO

    ForumDAO dao = ForumDAO.getInstance();
    ProcessItemForm piForm = (ProcessItemForm) form;
    RankForm rForm;
    if (request.getAttribute("rankForm") == null) {
      try {
        RankInfoDTO info = dao.getRankInfo(Integer.parseInt(piForm
            .getId()));
        rForm = new RankForm();
        BeanUtils.copyProperties(rForm, info);
      } catch (SQLException e) {
        throw new SystemException(e);
View Full Code Here

Examples of org.jresearch.gossip.beans.RankInfoDTO

     *
     * @see org.jresearch.gossip.actions.admin.rank.SaveRankAction#saveRank(org.jresearch.gossip.forms.RankForm)
     */
    protected void saveRank(RankForm rForm) throws SQLException {
        ForumDAO dao = ForumDAO.getInstance();
        RankInfoDTO rank = new RankInfoDTO(Integer.parseInt(rForm.getId()),
                rForm.getName(), Integer.parseInt(rForm.getCount()));
        dao.updateRank(rank);

    }
View Full Code Here

Examples of org.jresearch.gossip.beans.RankInfoDTO

     *
     * @see org.jresearch.gossip.actions.admin.rank.SaveRankAction#saveRank(org.jresearch.gossip.forms.RankForm)
     */
    protected void saveRank(RankForm rForm) throws SQLException {
        ForumDAO dao = ForumDAO.getInstance();
        RankInfoDTO rank = new RankInfoDTO(rForm.getName(), Integer
                .parseInt(rForm.getCount()));
        dao.addRank(rank);
    }
View Full Code Here

Examples of org.jresearch.gossip.beans.RankInfoDTO

        try {
            rs = (ResultSet) st.executeQuery();

            while (rs.next()) {
                ranks.add(new RankInfoDTO(rs.getInt("id"), rs
                        .getString("rank_name"), rs.getInt("rank_count")));
            }
        } finally {
            if (rs != null) {
                try {
View Full Code Here

Examples of org.jresearch.gossip.beans.RankInfoDTO

    /**
     * @param i
     * @return
     */
    public RankInfoDTO getRankInfo(int id) throws SQLException {
        RankInfoDTO rank = null;
        Connection connection = this.dataSource.getConnection();
        PreparedStatement st = connection.prepareStatement(dbDriver
                .getQueries().getForumQueries().getSql_GET_RANK());
        ResultSet rs = null;

        try {
            rs = (ResultSet) st.executeQuery();

            if (rs.next()) {
                rank = new RankInfoDTO(rs.getInt("id"), rs
                        .getString("rank_name"), rs.getInt("rank_count"));
            }
        } finally {
            if (rs != null) {
                try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.