Package org.itnaf.model

Examples of org.itnaf.model.User


    public List getUsers() {
        List l = new ArrayList((Collection)getServletContext().getAttribute("userNames"));
       
        Comparator comparator = new Comparator(){
            public int compare(Object o1, Object o2){
                User u1 = (User) o1;
                User u2 = (User) o2;
                if (sort == null){
                    return 0;
                }
                if (sort.equals("username")){
                    return !ascending ? u1.getUsername().toLowerCase()
                            .compareTo(u2.getUsername().toLowerCase())
                            : u2.getUsername().toLowerCase()
                            .compareTo(u1.getUsername().toLowerCase());
                }
                if (sort.equals("fullName")){
                    return !ascending ? u1.getFullName().toLowerCase()
                            .compareTo(u2.getFullName().toLowerCase())
                            : u2.getFullName().toLowerCase()
                            .compareTo(u1.getFullName().toLowerCase());
                }
                return 0;
            }
        };
View Full Code Here

TOP

Related Classes of org.itnaf.model.User

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.