1 19 20 package org.apache.cayenne.query; 21 22 import org.apache.cayenne.map.DataMap; 23 import org.apache.cayenne.map.DbEntity; 24 import org.apache.cayenne.map.ObjEntity; 25 import org.apache.cayenne.map.Procedure; 26 import org.apache.cayenne.reflect.ClassDescriptor; 27 28 34 class DefaultQueryMetadata implements QueryMetadata { 35 36 static final QueryMetadata defaultMetadata = new DefaultQueryMetadata(); 37 38 42 public DataMap getDataMap() { 43 if (getObjEntity() != null) { 44 return getObjEntity().getDataMap(); 45 } 46 47 if (getDbEntity() != null) { 48 return getDbEntity().getDataMap(); 49 } 50 51 if (getProcedure() != null) { 52 return getProcedure().getDataMap(); 53 } 54 55 return null; 56 } 57 58 61 public SQLResultSetMapping getResultSetMapping() { 62 return null; 63 } 64 65 public DbEntity getDbEntity() { 66 return null; 67 } 68 69 public ObjEntity getObjEntity() { 70 return null; 71 } 72 73 public ClassDescriptor getClassDescriptor() { 74 return null; 75 } 76 77 public Procedure getProcedure() { 78 return null; 79 } 80 81 public String getCacheKey() { 82 return null; 83 } 84 85 public String [] getCacheGroups() { 86 return null; 87 } 88 89 public String getCachePolicy() { 90 return QueryMetadata.CACHE_POLICY_DEFAULT; 91 } 92 93 public boolean isFetchingDataRows() { 94 return QueryMetadata.FETCHING_DATA_ROWS_DEFAULT; 95 } 96 97 public boolean isRefreshingObjects() { 98 return QueryMetadata.REFRESHING_OBJECTS_DEFAULT; 99 } 100 101 public boolean isResolvingInherited() { 102 return QueryMetadata.RESOLVING_INHERITED_DEFAULT; 103 } 104 105 public int getPageSize() { 106 return QueryMetadata.PAGE_SIZE_DEFAULT; 107 } 108 109 public int getFetchStartIndex() { 110 return -1; 111 } 112 113 public int getFetchLimit() { 114 return QueryMetadata.FETCH_LIMIT_DEFAULT; 115 } 116 117 public PrefetchTreeNode getPrefetchTree() { 118 return null; 119 } 120 } 121 | Popular Tags |