KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cayenne > access > DataDomainQuery


1 /*****************************************************************
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  ****************************************************************/

19 package org.apache.cayenne.access;
20
21 import org.apache.cayenne.map.DataMap;
22 import org.apache.cayenne.map.DbEntity;
23 import org.apache.cayenne.map.EntityResolver;
24 import org.apache.cayenne.map.ObjEntity;
25 import org.apache.cayenne.map.Procedure;
26 import org.apache.cayenne.query.PrefetchTreeNode;
27 import org.apache.cayenne.query.Query;
28 import org.apache.cayenne.query.QueryMetadata;
29 import org.apache.cayenne.query.QueryRouter;
30 import org.apache.cayenne.query.SQLAction;
31 import org.apache.cayenne.query.SQLActionVisitor;
32 import org.apache.cayenne.query.SQLResultSetMapping;
33 import org.apache.cayenne.reflect.ClassDescriptor;
34
35 /**
36  * A query that allows DataContext to retrieve parent DataDomain through a chain of
37  * decorator DataChannels.
38  *
39  * @author Andrus Adamchik
40  * @since 3.0
41  */

42 class DataDomainQuery implements Query, QueryMetadata {
43
44     public SQLAction createSQLAction(SQLActionVisitor visitor) {
45         throw new UnsupportedOperationException JavaDoc("Not an executable query.");
46     }
47
48     public QueryMetadata getMetaData(EntityResolver resolver) {
49         return this;
50     }
51     
52     public SQLResultSetMapping getResultSetMapping() {
53         return null;
54     }
55
56     public String JavaDoc getName() {
57         return null;
58     }
59
60     public void route(QueryRouter router, EntityResolver resolver, Query substitutedQuery) {
61     }
62
63     public String JavaDoc[] getCacheGroups() {
64         return null;
65     }
66
67     public String JavaDoc getCacheKey() {
68         return null;
69     }
70
71     public String JavaDoc getCachePolicy() {
72         return null;
73     }
74
75     public DataMap getDataMap() {
76         return null;
77     }
78
79     public DbEntity getDbEntity() {
80         return null;
81     }
82
83     public int getFetchLimit() {
84         return 0;
85     }
86
87     public int getFetchStartIndex() {
88         return 0;
89     }
90
91     public ObjEntity getObjEntity() {
92         return null;
93     }
94     
95     public ClassDescriptor getClassDescriptor() {
96         return null;
97     }
98
99     public int getPageSize() {
100         return 0;
101     }
102
103     public PrefetchTreeNode getPrefetchTree() {
104         return null;
105     }
106
107     public Procedure getProcedure() {
108         return null;
109     }
110
111     public boolean isFetchingDataRows() {
112         // must return true, otherwise the stack will attempt DataObject conversion
113
return true;
114     }
115
116     public boolean isRefreshingObjects() {
117         return false;
118     }
119
120     public boolean isResolvingInherited() {
121         return false;
122     }
123 }
124
Popular Tags