1 /*******************************************************************************
2 * Copyright (c) 2005 MOST S.A.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the ? License
5 * which accompanies this distribution, and is available at
6 * http://www.grupomost.com/legal/????.html
7 *
8 *******************************************************************************/
9 package ar.com.jiji.kaya.query;
10
11 import ar.com.jiji.kaya.utils.ValidateUtils;
12
13 /**
14 * Un item de la consulta. Comprende el atributo a chequear, un operador y uno o
15 * mas valores.
16 *
17 * @author lparravicini
18 * @version $Id: QueryItem.java 71 2005-09-08 20:03:22Z lparravicini $
19 *
20 */
21 public class QueryItem {
22 public enum QueryOp {
23 LIKE, Eq, notEq, CUSTOM, isNULL, notNULL
24
25 }
26
27 String column;
28
29 QueryOp op;
30
31 Object value;
32
33 public QueryItem(Object value, QueryOp op) {
34 this(null, value, op);
35 }
36
37 public QueryItem(String column, Object value, QueryOp op) {
38 ValidateUtils.argNotNull(value, "value");
39 this.column = column;
40 this.value = value;
41 this.op = op;
42 }
43
44 public String getColumn() {
45 return column;
46 }
47
48 public Object getValue() {
49 return value;
50 }
51
52 public QueryOp getOp() {
53 return op;
54 }
55
56 }