01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com> and
03: * JR Boyens <gnu-jrb[remove] at gmx dot net>
04: * Distributed under the terms of either:
05: * - the common development and distribution license (CDDL), v1.0; or
06: * - the GNU Lesser General Public License, v2.1 or later
07: * $Id: DeleteQuery.java 3634 2007-01-08 21:42:24Z gbevin $
08: */
09: package com.uwyn.rife.database.querymanagers.generic;
10:
11: import com.uwyn.rife.database.capabilities.Capabilities;
12: import com.uwyn.rife.database.exceptions.DbQueryException;
13: import com.uwyn.rife.database.queries.AbstractWhereDelegateQuery;
14: import com.uwyn.rife.database.queries.Delete;
15: import com.uwyn.rife.database.queries.Query;
16: import com.uwyn.rife.database.queries.QueryParameters;
17:
18: public class DeleteQuery extends
19: AbstractWhereDelegateQuery<DeleteQuery, Delete> implements
20: Query, Cloneable {
21: private Delete mDelegatePristine = null;
22:
23: public String toString() {
24: return getSql();
25: }
26:
27: public DeleteQuery clone() {
28: return new DeleteQuery(mDelegate.clone());
29: }
30:
31: public DeleteQuery(Delete query) {
32: super (query.clone());
33: mDelegatePristine = query.clone();
34: }
35:
36: public String getSql() throws DbQueryException {
37: return mDelegate.getSql();
38: }
39:
40: public void clear() {
41: mDelegate = mDelegatePristine.clone();
42: }
43:
44: public QueryParameters getParameters() {
45: return mDelegate.getParameters();
46: }
47:
48: public Capabilities getCapabilities() {
49: return mDelegate.getCapabilities();
50: }
51:
52: public void setExcludeUnsupportedCapabilities(boolean flag) {
53: mDelegate.setExcludeUnsupportedCapabilities(flag);
54: }
55:
56: public String getFrom() {
57: return mDelegate.getFrom();
58: }
59: }
|