Package cn.edu.zju.acm.onlinejudge.bean.request

Examples of cn.edu.zju.acm.onlinejudge.bean.request.LogCriteria


      if (errors.size() > 0) {
        context.setAttribute("logs", new ArrayList<AccessLog>());
            return handleFailure(mapping, context, errors);
      }
       
      LogCriteria criteria = searchForm.toLogCriteria();
        if (criteria.getTimeStart() == null) {
          criteria.setTimeStart(new Date(System.currentTimeMillis() - 24 * 3600 * 1000));
        }
        List<ActionLog> logs = PerformanceManager.getInstance().getActionDashboard(criteria, searchForm.getOrderBy());
       
        context.setAttribute("parameters", searchForm.toParameterMap());
        context.setAttribute("logs", logs);
View Full Code Here


        if (page < 0) {
            page = 1;
        }
        int logsPerPage = 20;

        LogCriteria criteria = searchForm.toLogCriteria();

        List<AccessLog> logs =
                PerformanceManager.getInstance().searchLogs(criteria, (page - 1) * 20, logsPerPage,
                                                            searchForm.getOrderBy());

View Full Code Here

        return p;
    }

    public LogCriteria toLogCriteria() throws ParseException, NumberFormatException {

        LogCriteria criteria = new LogCriteria();
        if (this.userId != null && this.userId.trim().length() > 0) {
            criteria.setUserId(Long.valueOf(this.userId.trim()));
        }
        if (this.handle != null && this.handle.trim().length() > 0) {
            criteria.setHandle(this.handle);
        }
        if (this.timeStart != null && this.timeStart.trim().length() > 0) {
            criteria.setTimeStart(Utility.parseTimestamp(this.timeStart));
        }
        if (this.timeEnd != null && this.timeEnd.trim().length() > 0) {
            criteria.setTimeEnd(Utility.parseTimestamp(this.timeEnd));
        }
        if (this.action != null && this.action.trim().length() > 0) {
            criteria.setAction(this.action);
        }
        if (this.ip != null && this.ip.trim().length() > 0) {
            criteria.setIp(this.ip);
        }

        return criteria;
    }
View Full Code Here

TOP

Related Classes of cn.edu.zju.acm.onlinejudge.bean.request.LogCriteria

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.