KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > oracle > toplink > essentials > queryframework > Call


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, 2005, Oracle. All rights reserved.
22
package oracle.toplink.essentials.queryframework;
23
24 import java.io.Serializable JavaDoc;
25 import oracle.toplink.essentials.internal.databaseaccess.Accessor;
26 import oracle.toplink.essentials.internal.queryframework.*;
27
28 /**
29  * Call defines the interface used primarily by TopLink queries
30  * and query mechanisms to perform the necessary actions
31  * (read, insert, update, delete) on the data store.
32  * A Call can collaborate with an Accessor to perform its
33  * responsibilities. The only explicit requirement of a Call is that
34  * it be able to supply the appropriate query mechanism for
35  * performing its duties. Otherwise, the Call is pretty much
36  * unrestricted as to how it should perform its responsibilities.
37  *
38  * @see DatabaseQuery
39  *
40  * @author Big Country
41  * @since TOPLink/Java 3.0
42  */

43 public interface Call extends Cloneable JavaDoc, Serializable JavaDoc {
44
45     /**
46      * INTERNAL:
47      * Return the appropriate mechanism,
48      * with the call set as necessary.
49      */

50     DatabaseQueryMechanism buildNewQueryMechanism(DatabaseQuery query);
51
52     /**
53      * INTERNAL:
54      * Return the appropriate mechanism,
55      * with the call added as necessary.
56      */

57     DatabaseQueryMechanism buildQueryMechanism(DatabaseQuery query, DatabaseQueryMechanism mechanism);
58
59     /**
60      * INTERNAL:
61      * Return a clone of the call.
62      */

63     Object JavaDoc clone();
64
65     /**
66      * INTERNAL:
67      * Return a string appropriate for the session log.
68      */

69     String JavaDoc getLogString(Accessor accessor);
70
71     /**
72      * INTERNAL:
73      * Return whether the call is finished returning
74      * all of its results (e.g. a call that returns a cursor
75      * will answer false).
76      */

77     boolean isFinished();
78 }
79
Popular Tags