01: /**
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 2004 Bull S.A.
04: * Contact: jonas-team@objectweb.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or any later version.
10: *
11: * This library 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 GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19: * USA
20: *
21: * --------------------------------------------------------------------------
22: * $Id: EjbqlLimiterRange.java 5843 2004-12-03 07:48:57Z joaninh $
23: * --------------------------------------------------------------------------
24: */package org.objectweb.jonas_ejb.lib;
25:
26: /**
27: * Limiter range representation that may be a literal integer or a parameter
28: * @author Helene Joanin
29: */
30: public class EjbqlLimiterRange {
31:
32: /**
33: * None kind
34: */
35: public static final int KIND_NONE = -1;
36:
37: /**
38: * Literal integer kind
39: */
40: public static final int KIND_LITERAL = 1;
41:
42: /**
43: * Parameter kind
44: */
45: public static final int KIND_PARAMETER = 2;
46:
47: /**
48: * Kind of limit range
49: */
50: private int kind = KIND_NONE;
51:
52: /**
53: * Value of limit range: value of literal or number of parameter
54: */
55: private int value;
56:
57: /**
58: * Constructs an EjbqlLimitRange
59: * @param kind kind of limiter range
60: * @param value value of limiter range (value of literal or number of parameter)
61: */
62: public EjbqlLimiterRange(int kind, int value) {
63: this .kind = kind;
64: this .value = value;
65: }
66:
67: /**
68: * @return returns the kind of limiter range, literal or parameter
69: */
70: public int getKind() {
71: return kind;
72: }
73:
74: /**
75: * @return returns the value of the limiter range (value of literal or number of parameter)
76: */
77: public int getValue() {
78: return value;
79: }
80:
81: }
|