KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejbca > ui > web > admin > rainterface > SortBy


1 /*************************************************************************
2  * *
3  * EJBCA: The OpenSource Certificate Authority *
4  * *
5  * This software is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU Lesser General Public *
7  * License as published by the Free Software Foundation; either *
8  * version 2.1 of the License, or any later version. *
9  * *
10  * See terms of license at gnu.org. *
11  * *
12  *************************************************************************/

13  
14 /*
15  * SortBy.java
16  *
17  * Created on den 18 april 2002, 15:47
18  */

19
20 package org.ejbca.ui.web.admin.rainterface;
21
22 /**
23  * A class specifying which field to sort the userdata by.
24  *
25  * @author Philip Vendil
26  * @version $Id: SortBy.java,v 1.1 2006/01/17 20:32:20 anatom Exp $
27  */

28 public class SortBy implements java.io.Serializable JavaDoc {
29     // Public constants
30
// Constants used by userdata.
31
public static final int USERNAME = 0;
32     public static final int PASSWORD = 1;
33     public static final int COMMONNAME = 2;
34     public static final int SERIALNUMBER = 3;
35     public static final int TITLE = 4;
36     public static final int ORGANIZATIONUNIT = 5;
37     public static final int ORGANIZATION = 6;
38     public static final int LOCALE = 7;
39     public static final int STATE = 8;
40     public static final int DOMAINCOMPONENT = 9;
41     public static final int COUNTRY = 10;
42     public static final int EMAIL = 11;
43     public static final int STATUS = 12;
44     public static final int TIMECREATED = 13;
45     public static final int TIMEMODIFIED = 14;
46     public static final int CA = 15;
47       // Constants used by logentrydata.
48

49     public static final int ADMINTYPE = 1;
50     public static final int ADMINDATA = 2;
51     public static final int MODULE = 4;
52     public static final int TIME = 5;
53     public static final int CERTIFICATE = 6;
54     public static final int EVENT = 7;
55     public static final int COMMENT = 8;
56     
57     public static final int ACCENDING = 0;
58     public static final int DECENDING = 1;
59
60     
61     /** Creates a new instance of SortBy */
62     public SortBy() {
63       this.sortby=USERNAME;
64       this.sortorder=ACCENDING;
65     }
66     
67     public SortBy(int sortby, int sortorder){
68       this.sortby=sortby;
69       this.sortorder=sortorder;
70     }
71     
72     public int getSortBy() {
73       return sortby;
74     }
75     
76     public int getSortOrder() {
77       return sortorder;
78     }
79     
80     public void setSortBy(int sortby) {
81        this.sortby=sortby;
82     }
83
84     public void setSortOrder(int sortorder){
85       this.sortorder=sortorder;
86     }
87     // Private fields.
88
private int sortby;
89     private int sortorder;
90 }
91
Popular Tags