KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > oracle > toplink > essentials > ejb > cmp3 > EJBQuery


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the "License"). You may not use this file except
5  * in compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * glassfish/bootstrap/legal/CDDLv1.0.txt or
9  * https://glassfish.dev.java.net/public/CDDLv1.0.html.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * HEADER in each file and include the License file at
15  * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
16  * add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your
18  * own identifying information: Portions Copyright [yyyy]
19  * [name of copyright owner]
20  */

21 // Copyright (c) 1998, 2006, Oracle. All rights reserved.
22
package oracle.toplink.essentials.ejb.cmp3;
23
24 import java.util.Collection JavaDoc;
25 import oracle.toplink.essentials.queryframework.DatabaseQuery;
26
27 /**
28  * PUBLIC:
29  * TopLInk specific EJB 3.0 query interface. Provides the functionality defined in
30  * javax.persistence.Query and adds access to the underlying database query for TopLink specific
31  * functionality.
32  */

33 public interface EJBQuery extends javax.persistence.Query {
34
35     /**
36      * PUBLIC:
37      * Return the cached database query for this EJBQueryImpl. If the query is
38      * a named query and it has not yet been looked up, the query will be looked up
39      * and stored as the cached query.
40      */

41     public DatabaseQuery getDatabaseQuery();
42
43     /**
44      * PUBLIC:
45      * return the EntityManager for this query
46      */

47     public EntityManager getEntityManager();
48
49     /**
50      * PUBLIC:
51      * Non-standard method to return results of a ReadQuery that has a containerPoliry
52      * that returns objects as a collection rather than a List
53      * @return Collection of results
54      */

55     public Collection JavaDoc getResultCollection();
56
57     /**
58      * PUBLIC:
59      * Replace the cached query with the given query.
60      */

61     public void setDatabaseQuery(DatabaseQuery query);
62
63 }
64
Popular Tags