1 /*
2    Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
3 
4    This program is free software; you can redistribute it and/or modify
5    it under the terms of the GNU General Public License, version 2.0,
6    as published by the Free Software Foundation.
7 
8    This program is also distributed with certain software (including
9    but not limited to OpenSSL) that is licensed under separate terms,
10    as designated in a particular file or component or in included license
11    documentation.  The authors of MySQL hereby grant you an additional
12    permission to link the program and your derivative works with the
13    separately licensed software that they have included with MySQL.
14 
15    This program is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18    GNU General Public License, version 2.0, for more details.
19 
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
23 */
24 
25 package com.mysql.clusterj.query;
26 
27 /** PredicateOperand represents a column or parameter that can be compared to
28  * another
29  *
30  */
31 public interface PredicateOperand {
32 
33     /** Return a Predicate representing comparing this to another using
34      * "equal to" semantics.
35      *
36      * @param other the other PredicateOperand
37      * @return a new Predicate
38      */
equal(PredicateOperand other)39     Predicate equal(PredicateOperand other);
40 
41     /** Return a Predicate representing comparing this to another using
42      * "greater than" semantics.
43      *
44      * @param other the other PredicateOperand
45      * @return a new Predicate
46      */
greaterThan(PredicateOperand other)47     Predicate greaterThan(PredicateOperand other);
48 
49     /** Return a Predicate representing comparing this to another using
50      * "greater than or equal to" semantics.
51      *
52      * @param other the other PredicateOperand
53      * @return a new Predicate
54      */
greaterEqual(PredicateOperand other)55     Predicate greaterEqual(PredicateOperand other);
56 
57     /** Return a Predicate representing comparing this to another using
58      * "less than" semantics.
59      *
60      * @param other the other PredicateOperand
61      * @return a new Predicate
62      */
lessThan(PredicateOperand other)63     Predicate lessThan(PredicateOperand other);
64 
65     /** Return a Predicate representing comparing this to another using
66      * "less than or equal to" semantics.
67      *
68      * @param other the other PredicateOperand
69      * @return a new Predicate
70      */
lessEqual(PredicateOperand other)71     Predicate lessEqual(PredicateOperand other);
72 
73     /** Return a Predicate representing comparing this to another using
74      * "between" semantics.
75      *
76      * @param lower another PredicateOperand
77      * @param upper another PredicateOperand
78      * @return a new Predicate
79      */
between(PredicateOperand lower, PredicateOperand upper)80     Predicate between(PredicateOperand lower, PredicateOperand upper);
81 
82     /** Return a Predicate representing comparing this to a collection of
83      * values using "in" semantics.
84      *
85      * @param other another PredicateOperand
86      * @return a new Predicate
87      */
in(PredicateOperand other)88     Predicate in(PredicateOperand other);
89 
90     /** Return a Predicate representing comparing this to another using
91      * "like" semantics.
92      *
93      * @param other another PredicateOperand
94      * @return a new Predicate
95      */
like(PredicateOperand other)96     Predicate like(PredicateOperand other);
97 
98 }
99