01: /*
02: $Header: /cvsroot/xorm/xorm/src/org/xorm/query/QueryOrdering.java,v 1.1 2003/04/27 00:00:26 wbiggs Exp $
03:
04: This file is part of XORM.
05:
06: XORM is free software; you can redistribute it and/or modify
07: it under the terms of the GNU General Public License as published by
08: the Free Software Foundation; either version 2 of the License, or
09: (at your option) any later version.
10:
11: XORM is distributed in the hope that it will be useful,
12: but WITHOUT ANY WARRANTY; without even the implied warranty of
13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: GNU General Public License for more details.
15:
16: You should have received a copy of the GNU General Public License
17: along with XORM; if not, write to the Free Software
18: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19: */
20: package org.xorm.query;
21:
22: import java.io.StringReader;
23: import java.util.HashMap;
24: import java.util.Collection;
25: import java.util.Iterator;
26: import java.util.List;
27: import java.util.Map;
28: import java.util.ArrayList;
29: import java.util.StringTokenizer;
30:
31: /** Immutable class to capture ordering information. */
32: public class QueryOrdering {
33: public static final int ASCENDING = 0;
34: public static final int DESCENDING = 1;
35:
36: private String field;
37: private int order;
38:
39: public QueryOrdering(String field, int order) {
40: this .field = field;
41: this .order = order;
42: }
43:
44: public String getField() {
45: return field;
46: }
47:
48: public int getOrder() {
49: return order;
50: }
51: }
|