01: /**********************************************************************
02: Copyright (c) 2005 Erik Bengtson and others. All rights reserved.
03: Licensed under the Apache License, Version 2.0 (the "License");
04: you may not use this file except in compliance with the License.
05: You may obtain a copy of the License at
06:
07: http://www.apache.org/licenses/LICENSE-2.0
08:
09: Unless required by applicable law or agreed to in writing, software
10: distributed under the License is distributed on an "AS IS" BASIS,
11: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: See the License for the specific language governing permissions and
13: limitations under the License.
14:
15:
16: Contributors:
17: ...
18: **********************************************************************/package org.jpox.store.query;
19:
20: import java.util.Collection;
21:
22: /**
23: * Lazy collection results from a Query. The actual result elements are only loaded when accessed.
24: * <p>
25: * The lifecycle of a QueryResult is as follows
26: * <ul>
27: * <li><b>Open, Connected, With Connection</b> - the query has been run and the results returned.</li>
28: * <li><b>Open, Disconnected</b> - the query has been run, and the txn committed, and the PM closed so has its results
29: * internally</li>
30: * <li><b>Closed, Disconnected</b> - the query has been run, txn committed, query results closed.</li>
31: * </ul>
32: *
33: * @version $Revision: 1.13 $
34: */
35: public interface QueryResult extends Collection {
36: /**
37: * Method to close the results, making them unusable thereafter.
38: */
39: void close();
40:
41: /**
42: * Method to disconnect the results from the ObjectManager, meaning that thereafter it just behaves
43: * like a List.
44: */
45: void disconnect();
46: }
|