2 Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; version 2 of the License.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 package com.mysql.clusterj.query;
20 /** PredicateOperand represents a column or parameter that can be compared to
24 public interface PredicateOperand {
26 /** Return a Predicate representing comparing this to another using
27 * "equal to" semantics.
29 * @param other the other PredicateOperand
30 * @return a new Predicate
32 Predicate equal(PredicateOperand other);
34 /** Return a Predicate representing comparing this to another using
35 * "greater than" semantics.
37 * @param other the other PredicateOperand
38 * @return a new Predicate
40 Predicate greaterThan(PredicateOperand other);
42 /** Return a Predicate representing comparing this to another using
43 * "greater than or equal to" semantics.
45 * @param other the other PredicateOperand
46 * @return a new Predicate
48 Predicate greaterEqual(PredicateOperand other);
50 /** Return a Predicate representing comparing this to another using
51 * "less than" semantics.
53 * @param other the other PredicateOperand
54 * @return a new Predicate
56 Predicate lessThan(PredicateOperand other);
58 /** Return a Predicate representing comparing this to another using
59 * "less than or equal to" semantics.
61 * @param other the other PredicateOperand
62 * @return a new Predicate
64 Predicate lessEqual(PredicateOperand other);
66 /** Return a Predicate representing comparing this to another using
67 * "between" semantics.
69 * @param lower another PredicateOperand
70 * @param upper another PredicateOperand
71 * @return a new Predicate
73 Predicate between(PredicateOperand lower, PredicateOperand upper);
75 /** Return a Predicate representing comparing this to a collection of
76 * values using "in" semantics.
78 * @param other another PredicateOperand
79 * @return a new Predicate
81 Predicate in(PredicateOperand other);
83 /** Return a Predicate representing comparing this to another using
86 * @param other another PredicateOperand
87 * @return a new Predicate
89 Predicate like(PredicateOperand other);