KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > server > CompiledQuery


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.server;
13
14 import com.versant.core.jdo.QueryDetails;
15
16 /**
17  * A query compiled from a QueryDetails instance.
18  */

19 public interface CompiledQuery {
20
21     /**
22      * Get the unique ID assigned to this CompiledQuery.
23      */

24     public int getId();
25
26     /**
27      * Give this query an ID. This is used by {@link CompiledQueryCache}
28      * to assign unique IDs to CompiledQuery's.
29      */

30     public void setId(int id);
31
32     /**
33      * Return the QueryDetails this query was compiled from. This method
34      * may return null if this information is not available.
35      */

36     public QueryDetails getQueryDetails();
37
38     /**
39      * Return bitmapped array of the class indexes involved in this query in
40      * some way. that will cause the results
41      * of this query to be evicted when their instances are modified. Each
42      * class index has one bit in this array.
43      */

44     public int[] getEvictionClassBits();
45
46     /**
47      * Get the indexes of all of the classes involved in some way. This is
48      * used to check query cache eviction and to trigger flushing.
49      */

50     public int[] getClassIndexes();
51
52     /**
53      * If this is a query with a single/unique result.
54      */

55     public boolean isUnique();
56
57     /**
58      * Is this a non default projection query.
59      * This will return false for the default projection.
60      */

61     public boolean isProjectionQuery();
62
63     /**
64      * If this query returns default results. ie The result will be a collection
65      * of managed instances.
66      */

67     public boolean isDefaultResult();
68
69     /**
70      * The index of the first occurance of 'this' in the projection. If not then
71      * return -1.
72      */

73     public int getFirstThisIndex();
74
75     /**
76      * The typeCode of each column or null if this is not a projection query.
77      *
78      * @see com.versant.core.metadata.MDStatics
79      */

80     public int[] getResultTypeCodes();
81 }
82
83
Popular Tags