01: /*
02: $Header: /cvsroot/xorm/xorm/src/org/xorm/query/DataQuery.java,v 1.6 2003/04/28 18:28:16 wbiggs Exp $
03:
04: This file is part of XORM.
05:
06: XORM is free software; you can redistribute it and/or modify
07: it under the terms of the GNU General Public License as published by
08: the Free Software Foundation; either version 2 of the License, or
09: (at your option) any later version.
10:
11: XORM is distributed in the hope that it will be useful,
12: but WITHOUT ANY WARRANTY; without even the implied warranty of
13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: GNU General Public License for more details.
15:
16: You should have received a copy of the GNU General Public License
17: along with XORM; if not, write to the Free Software
18: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19: */
20: package org.xorm.query;
21:
22: import javax.jdo.PersistenceManager;
23:
24: /**
25: * Implementation of JDO query interface for native queries (using
26: * DataQuery.LANGUAGE).
27: */
28: public class DataQuery extends AbstractQueryLanguage {
29: private Condition condition;
30:
31: public DataQuery(Class candidateClass, Condition condition) {
32: setClass(candidateClass);
33: this .condition = condition;
34: }
35:
36: public void compile() {
37: }
38:
39: public Condition getCondition() {
40: return condition;
41: }
42:
43: public Expression getExpression() {
44: return Expression.Constant.TRUE;
45: }
46:
47: public void setFilter(Object filter) {
48: if (filter instanceof Condition) {
49: this .condition = (Condition) filter;
50: }
51: }
52: }
|