1 package org.apache.ojb.broker.query; 2 3 17 18 import java.io.Serializable ; 19 import java.util.List ; 20 21 27 public abstract class AbstractQueryImpl implements Query, Serializable 28 { 29 static final long serialVersionUID = -6265085604410295816L; 30 31 private int m_startAtIndex = Query.NO_START_AT_INDEX; 32 private int m_endAtIndex = Query.NO_END_AT_INDEX; 33 private int m_fullSize = 0; 34 private int fetchSize; 35 protected Class m_searchClass; 36 protected Class m_baseClass; 37 private boolean m_withExtents = true; 38 39 public AbstractQueryImpl() 40 { 41 } 42 43 public AbstractQueryImpl(Class aSearchClass) 44 { 45 m_searchClass = aSearchClass; 46 m_baseClass = aSearchClass; 47 } 48 49 public int getStartAtIndex() 50 { 51 return m_startAtIndex; 52 } 53 54 public void setStartAtIndex(int startAtIndex) 55 { 56 m_startAtIndex = startAtIndex; 57 } 58 59 public int getEndAtIndex() 60 { 61 return m_endAtIndex; 62 } 63 64 public void setEndAtIndex(int endAtIndex) 65 { 66 m_endAtIndex = endAtIndex; 67 } 68 69 public void fullSize(int size) 70 { 71 m_fullSize = size; 72 } 73 74 public int fullSize() 75 { 76 return m_fullSize; 77 } 78 79 public void setWithExtents(boolean withExtents) 80 { 81 m_withExtents = withExtents; 82 } 83 84 public boolean getWithExtents() 85 { 86 return m_withExtents; 87 } 88 89 92 public Class getSearchClass() 93 { 94 return m_searchClass; 95 } 96 97 100 public Class getBaseClass() 101 { 102 return m_baseClass; 103 } 104 105 108 public List getGroupBy() 109 { 110 return null; 111 } 112 113 116 public List getOrderBy() 117 { 118 return null; 119 } 120 121 124 public List getPrefetchedRelationships() 125 { 126 return null; 127 } 128 129 130 131 134 public Criteria getCriteria() 135 { 136 return null; 137 } 138 139 142 public Object getExampleObject() 143 { 144 return null; 145 } 146 147 150 public Criteria getHavingCriteria() 151 { 152 return null; 153 } 154 155 158 public boolean isDistinct() 159 { 160 return false; 161 } 162 163 public boolean usePaging() 164 { 165 return getEndAtIndex() > NO_END_AT_INDEX 166 || getStartAtIndex() > NO_START_AT_INDEX; 167 } 168 169 public void setFetchSize(int fetchSize) 170 { 171 this.fetchSize = fetchSize; 172 } 173 174 public int getFetchSize() 175 { 176 return fetchSize; 177 } 178 179 } 180 | Popular Tags |