KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > jdbc > ejbql > JdbcCompiledQueryEJBQL


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.jdbc.ejbql;
13
14 import com.versant.core.jdbc.query.JdbcCompiledQuery;
15 import com.versant.core.jdbc.fetch.FetchSpec;
16 import com.versant.core.metadata.ClassMetaData;
17 import com.versant.core.jdo.QueryDetails;
18
19 /**
20  * Hacked version of JdbcCompiledQuery to suite the new FetchSpec query
21  * processing. The old stuff needs to be refactored so everything uses
22  * FetchSpec etc. This is a hack so we can get EJBQL into our implementation.
23  */

24 public class JdbcCompiledQueryEJBQL extends JdbcCompiledQuery {
25
26     private FetchSpec fetchSpec;
27
28     public JdbcCompiledQueryEJBQL(ClassMetaData cmd, QueryDetails queryParams,
29             FetchSpec fetchSpec) {
30         super(cmd, queryParams);
31         this.fetchSpec = fetchSpec;
32         unique = QueryDetails.FALSE;
33     }
34
35     public boolean isEJBQLHack() {
36         return true;
37     }
38
39     public FetchSpec getFetchSpec() {
40         return fetchSpec;
41     }
42
43 }
44
45
Popular Tags