KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_ejb > lib > EjbqlLimiterRange


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 2004 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * 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,v 1.1 2004/12/03 07:48:57 joaninh Exp $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.jonas_ejb.lib;
26
27 /**
28  * Limiter range representation that may be a literal integer or a parameter
29  * @author Helene Joanin
30  */

31 public class EjbqlLimiterRange {
32
33     /**
34      * None kind
35      */

36     public static final int KIND_NONE = -1;
37
38     /**
39      * Literal integer kind
40      */

41     public static final int KIND_LITERAL = 1;
42
43     /**
44      * Parameter kind
45      */

46     public static final int KIND_PARAMETER = 2;
47
48     /**
49      * Kind of limit range
50      */

51     private int kind = KIND_NONE;
52
53     /**
54      * Value of limit range: value of literal or number of parameter
55      */

56     private int value;
57
58     /**
59      * Constructs an EjbqlLimitRange
60      * @param kind kind of limiter range
61      * @param value value of limiter range (value of literal or number of parameter)
62      */

63     public EjbqlLimiterRange(int kind, int value) {
64         this.kind = kind;
65         this.value = value;
66     }
67
68     /**
69      * @return returns the kind of limiter range, literal or parameter
70      */

71     public int getKind() {
72         return kind;
73     }
74
75     /**
76      * @return returns the value of the limiter range (value of literal or number of parameter)
77      */

78     public int getValue() {
79         return value;
80     }
81
82 }
Popular Tags