1 21 package oracle.toplink.essentials.queryframework; 23 24 import oracle.toplink.essentials.internal.sessions.AbstractRecord; 25 import oracle.toplink.essentials.internal.sessions.AbstractSession; 26 27 39 public abstract class ReadQuery extends DatabaseQuery { 40 41 42 protected int maxRows; 43 44 45 protected int firstResult; 46 47 52 protected long queryId; 53 54 58 public ReadQuery() { 59 this.maxRows = 0; 60 this.firstResult = 0; 61 this.queryId = 0; 62 } 63 64 69 public Object buildObject(AbstractRecord row) { 70 return row; 71 } 72 73 78 protected void clonedQueryExecutionComplete(DatabaseQuery query, AbstractSession session) { 79 } 81 82 86 public int getFirstResult() { 87 return firstResult; 88 } 89 90 98 public long getQueryId() { 99 return this.queryId; 100 } 101 102 106 public int getMaxRows() { 107 return this.maxRows; 108 } 109 110 114 public boolean isReadQuery() { 115 return true; 116 } 117 118 126 public void setFirstResult(int firstResult) { 127 this.firstResult = firstResult; 128 setIsPrepared(false); 129 } 130 131 139 public void setQueryId(long id) { 140 this.queryId = id; 141 } 142 143 149 public void setMaxRows(int maxRows) { 150 this.maxRows = maxRows; 151 setIsPrepared(false); 152 } 153 } 154 | Popular Tags |