KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > jdbc > fetch > FetchOptions


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.fetch;
13
14 /**
15  * Flags etc to control fetching.
16  */

17 public class FetchOptions {
18
19     private boolean useParallelQueries;
20     private boolean useOneToManyJoin;
21
22     /**
23      * Set if the plan may consist of multiple separate SQL queries processed
24      * in parallel i.e. several ResultSet's will be open at once. Each query
25      * will have essentially the same where clause.
26      */

27     public void setUseParallelQueries(boolean useParallelQueries) {
28         this.useParallelQueries = useParallelQueries;
29     }
30
31     public boolean isUseParallelQueries() {
32         return useParallelQueries;
33     }
34
35     /**
36      * Set if the plan may prefetch one to many relationships by joining
37      * them to the main query to fetch the data. The main query will return
38      * n * m rows but a separate query will not need to be done to fetch
39      * the relationships.
40      */

41     public void setUseOneToManyJoin(boolean useOneToManyJoin) {
42         this.useOneToManyJoin = useOneToManyJoin;
43     }
44
45     public boolean isUseOneToManyJoin() {
46         return useOneToManyJoin;
47     }
48
49 }
50
51
Popular Tags