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

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


            return this.handleSuccess(mapping, context, "success");

        }

        UserCriteria criteria = userForm.toUserCriteria();
        String export = context.getRequest().getParameter("exportFormat");

        if ("txt".equalsIgnoreCase(export)) {
            List<UserProfile> users =
                    PersistenceManager.getInstance().getUserPersistence().searchUserProfiles(criteria, 0,
View Full Code Here


        this.totalPages = totalPages;
    }

    public UserCriteria toUserCriteria() throws ParseException, NumberFormatException {

        UserCriteria criteria = new UserCriteria();

        if (this.handle != null && this.handle.trim().length() > 0) {
            criteria.setHandle(this.handle.trim());
        }
        if (this.email != null && this.email.trim().length() > 0) {
            criteria.setEmail(this.email.trim());
        }
        if (this.roleId != null && this.roleId.trim().length() > 0) {
            criteria.setRoleId(Long.valueOf(this.roleId));
        }
        if (this.firstName != null && this.firstName.trim().length() > 0) {
            criteria.setFirstName(this.firstName.trim());
        }
        if (this.lastName != null && this.lastName.trim().length() > 0) {
            criteria.setLastName(this.lastName.trim());
        }
        if (this.countryId != null && this.countryId.trim().length() > 0) {
            criteria.setCountryId(Long.valueOf(this.countryId));
        }
        if (this.school != null && this.school.trim().length() > 0) {
            criteria.setSchool(this.school.trim());
        }
        return criteria;
    }
View Full Code Here

TOP

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

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.