001: /*
002: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com> and
003: * JR Boyens <gnu-jrb[remove] at gmx dot net>
004: * Distributed under the terms of either:
005: * - the common development and distribution license (CDDL), v1.0; or
006: * - the GNU Lesser General Public License, v2.1 or later
007: * $Id: RestoreQuery.java 3634 2007-01-08 21:42:24Z gbevin $
008: */
009: package com.uwyn.rife.database.querymanagers.generic;
010:
011: import com.uwyn.rife.database.capabilities.Capabilities;
012: import com.uwyn.rife.database.queries.AbstractWhereDelegateQuery;
013: import com.uwyn.rife.database.queries.QueryParameters;
014: import com.uwyn.rife.database.queries.ReadQuery;
015: import com.uwyn.rife.database.queries.Select;
016:
017: public class RestoreQuery extends
018: AbstractWhereDelegateQuery<RestoreQuery, Select> implements
019: ReadQuery, Cloneable {
020: private Select mDelegatePristine = null;
021:
022: public String toString() {
023: return getSql();
024: }
025:
026: public RestoreQuery clone() {
027: return new RestoreQuery(mDelegate.clone());
028: }
029:
030: public RestoreQuery(Select query) {
031: super (query.clone());
032: mDelegatePristine = query.clone();
033: }
034:
035: public void clear() {
036: mDelegate = mDelegatePristine.clone();
037: }
038:
039: public Capabilities getCapabilities() {
040: return mDelegate.getCapabilities();
041: }
042:
043: public void setExcludeUnsupportedCapabilities(boolean flag) {
044: mDelegate.setExcludeUnsupportedCapabilities(flag);
045: }
046:
047: public QueryParameters getParameters() {
048: return mDelegate.getParameters();
049: }
050:
051: public String getSql() {
052: return mDelegate.getSql();
053: }
054:
055: public RestoreQuery distinctOn(String column) {
056: mDelegate.distinctOn(column);
057:
058: return this ;
059: }
060:
061: public RestoreQuery distinctOn(String[] columns) {
062: mDelegate.distinctOn(columns);
063:
064: return this ;
065: }
066:
067: public String getFrom() {
068: return mDelegate.getFrom();
069: }
070:
071: public RestoreQuery join(String table) {
072: mDelegate.join(table);
073:
074: return this ;
075: }
076:
077: public RestoreQuery joinCross(String table) {
078: mDelegate.joinCross(table);
079:
080: return this ;
081: }
082:
083: public RestoreQuery joinCustom(String customJoin) {
084: mDelegate.joinCustom(customJoin);
085:
086: return this ;
087: }
088:
089: public RestoreQuery joinInner(String table,
090: Select.JoinCondition condition, String conditionExpression) {
091: mDelegate.joinInner(table, condition, conditionExpression);
092:
093: return this ;
094: }
095:
096: public RestoreQuery joinOuter(String table, Select.JoinType type,
097: Select.JoinCondition condition, String conditionExpression) {
098: mDelegate
099: .joinOuter(table, type, condition, conditionExpression);
100:
101: return this ;
102: }
103:
104: public RestoreQuery limit(int limit) {
105: mDelegate.limit(limit);
106:
107: return this ;
108: }
109:
110: public RestoreQuery offset(int offset) {
111: mDelegate.offset(offset);
112:
113: return this ;
114: }
115:
116: public RestoreQuery orderBy(String column) {
117: mDelegate.orderBy(column);
118:
119: return this ;
120: }
121:
122: public RestoreQuery orderBy(String column,
123: Select.OrderByDirection direction) {
124: mDelegate.orderBy(column, direction);
125:
126: return this ;
127: }
128:
129: public RestoreQuery union(Select union) {
130: mDelegate.union(union);
131:
132: return this ;
133: }
134:
135: public RestoreQuery union(String union) {
136: mDelegate.union(union);
137:
138: return this ;
139: }
140:
141: public RestoreQuery field(String field) {
142: mDelegate.field(field);
143:
144: return this ;
145: }
146:
147: public RestoreQuery fields(Class bean) {
148: mDelegate.fields(bean);
149:
150: return this ;
151: }
152:
153: public RestoreQuery fieldsExcluded(Class bean, String... excluded) {
154: mDelegate.fieldsExcluded(bean, excluded);
155:
156: return this ;
157: }
158:
159: public RestoreQuery fields(String table, Class bean) {
160: mDelegate.fields(table, bean);
161:
162: return this ;
163: }
164:
165: public RestoreQuery fieldsExcluded(String table, Class bean,
166: String... excluded) {
167: mDelegate.fieldsExcluded(table, bean, excluded);
168:
169: return this ;
170: }
171:
172: public RestoreQuery fields(String... fields) {
173: mDelegate.fields(fields);
174:
175: return this ;
176: }
177:
178: public RestoreQuery field(String alias, Select query) {
179: mDelegate.field(alias, query);
180:
181: return this ;
182: }
183:
184: public RestoreQuery fieldSubselect(Select query) {
185: mDelegate.fieldSubselect(query);
186:
187: return this;
188: }
189: }
|