01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of the GNU Lesser General License, v2.1 or later
04: * $Id: WhereQuery.java 3634 2007-01-08 21:42:24Z gbevin $
05: */
06: package com.uwyn.rife.database.queries;
07:
08: import com.uwyn.rife.database.exceptions.DbQueryException;
09: import java.util.List;
10:
11: interface WhereQuery<QueryType extends WhereQuery> {
12: QueryType whereSubselect(Select query);
13:
14: QueryType where(String where);
15:
16: QueryType whereAnd(String where);
17:
18: QueryType whereOr(String where);
19:
20: WhereGroup<QueryType> startWhere();
21:
22: WhereGroupAnd<QueryType> startWhereAnd();
23:
24: WhereGroupOr<QueryType> startWhereOr();
25:
26: QueryType where(String field, String operator, char value);
27:
28: QueryType where(String field, String operator, boolean value);
29:
30: QueryType where(String field, String operator, byte value);
31:
32: QueryType where(String field, String operator, double value);
33:
34: QueryType where(String field, String operator, float value);
35:
36: QueryType where(String field, String operator, int value);
37:
38: QueryType where(String field, String operator, long value);
39:
40: QueryType where(String field, String operator, short value);
41:
42: QueryType where(String field, String operator, Select query);
43:
44: QueryType where(String field, String operator, Object value);
45:
46: QueryType whereAnd(String field, String operator, char value);
47:
48: QueryType whereAnd(String field, String operator, boolean value);
49:
50: QueryType whereAnd(String field, String operator, byte value);
51:
52: QueryType whereAnd(String field, String operator, double value);
53:
54: QueryType whereAnd(String field, String operator, float value);
55:
56: QueryType whereAnd(String field, String operator, int value);
57:
58: QueryType whereAnd(String field, String operator, long value);
59:
60: QueryType whereAnd(String field, String operator, short value);
61:
62: QueryType whereAnd(String field, String operator, Select query);
63:
64: QueryType whereAnd(String field, String operator, Object value);
65:
66: QueryType whereOr(String field, String operator, char value);
67:
68: QueryType whereOr(String field, String operator, boolean value);
69:
70: QueryType whereOr(String field, String operator, byte value);
71:
72: QueryType whereOr(String field, String operator, double value);
73:
74: QueryType whereOr(String field, String operator, float value);
75:
76: QueryType whereOr(String field, String operator, int value);
77:
78: QueryType whereOr(String field, String operator, long value);
79:
80: QueryType whereOr(String field, String operator, short value);
81:
82: QueryType whereOr(String field, String operator, Select query);
83:
84: QueryType whereOr(String field, String operator, Object value);
85:
86: QueryType where(Object bean) throws DbQueryException;
87:
88: QueryType whereIncluded(Object bean, String[] includedFields)
89: throws DbQueryException;
90:
91: QueryType whereExcluded(Object bean, String[] excludedFields)
92: throws DbQueryException;
93:
94: QueryType whereFiltered(Object bean, String[] includedFields,
95: String[] excludedFields) throws DbQueryException;
96:
97: void addWhereParameters(List<String> parameters);
98: }
|