01: /*
02: * Copyright (c) 1998 - 2005 Versant Corporation
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * Versant Corporation - initial API and implementation
10: */
11: package com.versant.core.jdbc.fetch;
12:
13: /**
14: * Flags etc to control fetching.
15: */
16: public class FetchOptions {
17:
18: private boolean useParallelQueries;
19: private boolean useOneToManyJoin;
20:
21: /**
22: * Set if the plan may consist of multiple separate SQL queries processed
23: * in parallel i.e. several ResultSet's will be open at once. Each query
24: * will have essentially the same where clause.
25: */
26: public void setUseParallelQueries(boolean useParallelQueries) {
27: this .useParallelQueries = useParallelQueries;
28: }
29:
30: public boolean isUseParallelQueries() {
31: return useParallelQueries;
32: }
33:
34: /**
35: * Set if the plan may prefetch one to many relationships by joining
36: * them to the main query to fetch the data. The main query will return
37: * n * m rows but a separate query will not need to be done to fetch
38: * the relationships.
39: */
40: public void setUseOneToManyJoin(boolean useOneToManyJoin) {
41: this .useOneToManyJoin = useOneToManyJoin;
42: }
43:
44: public boolean isUseOneToManyJoin() {
45: return useOneToManyJoin;
46: }
47:
48: }
|