KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jresearch > gossip > beans > LogSearchCriteria


1 /*
2  * $Id: LogSearchCriteria.java,v 1.3 2005/06/07 12:32:26 bel70 Exp $
3  *
4  * ***** BEGIN LICENSE BLOCK *****
5  * The contents of this file are subject to the Mozilla Public License
6  * Version 1.1 (the "License"); you may not use this file except in
7  * compliance with the License. You may obtain a copy of the License
8  * at http://www.mozilla.org/MPL/
9  *
10  * Software distributed under the License is distributed on an "AS IS"
11  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
12  * the License for the specific language governing rights and
13  * limitations under the License.
14  *
15  * The Original Code is JGossip forum code.
16  *
17  * The Initial Developer of the Original Code is the JResearch, Org.
18  * Portions created by the Initial Developer are Copyright (C) 2004
19  * the Initial Developer. All Rights Reserved.
20  *
21  * Contributor(s):
22  * Dmitriy Belov <bel@jresearch.org>
23  * .
24  * * ***** END LICENSE BLOCK ***** */

25 /*
26  * Created on 12.08.2004
27  *
28  */

29 package org.jresearch.gossip.beans;
30
31 import java.util.Date JavaDoc;
32
33 import org.jresearch.gossip.IConst;
34
35 /**
36  * @author Dmitry Belov
37  *
38  */

39 public class LogSearchCriteria {
40
41     private Date JavaDoc from;
42
43     private Date JavaDoc to;
44
45     private String JavaDoc logger;
46
47     private String JavaDoc log_level;
48
49     private String JavaDoc remote_ip;
50
51     private String JavaDoc user_name;
52
53     private String JavaDoc session_id;
54
55     /**
56      * Sort direction:
57      * <li>FALSE - reversed order - oldest data first
58      * <li>TRUE - normal order - newest data first.
59      */

60     private boolean sortOrder;
61
62     /**
63      * @param from
64      * @param to
65      * @param logger
66      * @param log_level
67      * @param remote_ip
68      * @param user_name
69      * @param session_id
70      * @deprecated - Use LogSearchCriteria(Date, Date, String, String, String,
71      * String, String, boolean)
72      */

73     public LogSearchCriteria(Date JavaDoc from, Date JavaDoc to, String JavaDoc logger,
74             String JavaDoc log_level, String JavaDoc remote_ip, String JavaDoc user_name,
75             String JavaDoc session_id) {
76         super();
77         this.from = from;
78         this.to = to;
79         this.logger = logger;
80         this.log_level = log_level;
81         this.remote_ip = remote_ip;
82         this.user_name = user_name;
83         this.session_id = session_id;
84         this.sortOrder = true;
85     }
86
87     /**
88      * Document me!
89      *
90      * @param from
91      * @param to
92      * @param logger
93      * @param log_level
94      * @param remote_ip
95      * @param user_name
96      * @param session_id
97      * @param sortOrder
98      */

99     public LogSearchCriteria(Date JavaDoc from, Date JavaDoc to, String JavaDoc logger,
100             String JavaDoc log_level, String JavaDoc remote_ip, String JavaDoc user_name,
101             String JavaDoc session_id, boolean sortOrder) {
102         super();
103         this.from = from;
104         this.to = to;
105         this.logger = logger;
106         this.log_level = log_level;
107         this.remote_ip = remote_ip;
108         this.user_name = user_name;
109         this.session_id = session_id;
110         this.sortOrder = sortOrder;
111     }
112
113     /**
114      *
115      */

116     public LogSearchCriteria() {
117         this.from = new Date JavaDoc(0);
118         this.to = new Date JavaDoc();
119         this.logger = IConst.VALUES.ALL;
120         this.log_level = IConst.VALUES.ALL;
121         this.remote_ip = IConst.VALUES.ALL;
122         this.user_name = IConst.VALUES.ALL;
123         this.session_id = IConst.VALUES.ALL;
124         this.sortOrder = true;
125     }
126
127     /**
128      * @return Returns the from.
129      */

130     public Date JavaDoc getFrom() {
131         return from;
132     }
133
134     /**
135      * @param from
136      * The from to set.
137      */

138     public void setFrom(Date JavaDoc from) {
139         this.from = from;
140     }
141
142     /**
143      * @return Returns the log_level.
144      */

145     public String JavaDoc getLog_level() {
146         return log_level;
147     }
148
149     /**
150      * @param log_level
151      * The log_level to set.
152      */

153     public void setLog_level(String JavaDoc log_level) {
154         this.log_level = log_level;
155     }
156
157     /**
158      * @return Returns the logger.
159      */

160     public String JavaDoc getLogger() {
161         return logger;
162     }
163
164     /**
165      * @param logger
166      * The logger to set.
167      */

168     public void setLogger(String JavaDoc logger) {
169         this.logger = logger;
170     }
171
172     /**
173      * @return Returns the remote_ip.
174      */

175     public String JavaDoc getRemote_ip() {
176         return remote_ip;
177     }
178
179     /**
180      * @param remote_ip
181      * The remote_ip to set.
182      */

183     public void setRemote_ip(String JavaDoc remote_ip) {
184         this.remote_ip = remote_ip;
185     }
186
187     /**
188      * @return Returns the session_id.
189      */

190     public String JavaDoc getSession_id() {
191         return session_id;
192     }
193
194     /**
195      * @param session_id
196      * The session_id to set.
197      */

198     public void setSession_id(String JavaDoc session_id) {
199         this.session_id = session_id;
200     }
201
202     /**
203      * @return Returns the to.
204      */

205     public Date JavaDoc getTo() {
206         return to;
207     }
208
209     /**
210      * @param to
211      * The to to set.
212      */

213     public void setTo(Date JavaDoc to) {
214         this.to = to;
215     }
216
217     /**
218      * @return Returns the user_name.
219      */

220     public String JavaDoc getUser_name() {
221         return user_name;
222     }
223
224     /**
225      * @param user_name
226      * The user_name to set.
227      */

228     public void setUser_name(String JavaDoc user_name) {
229         this.user_name = user_name;
230     }
231
232     /**
233      * @return Returns the sortOrder.
234      */

235     public boolean isSortOrder() {
236         return sortOrder;
237     }
238 }
Popular Tags