Mercurial > dive4elements > gnv-client
comparison geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/SDEResultSet.java @ 130:e4eacd613356
Implementierung Datenzugriff auf die ArcSDE über java.sql. Methodiken
ChangeLog wird nachgereicht da SubversionClientincompatiblitäten vorhanden sind.
geo-backend/trunk@7 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Wed, 02 Sep 2009 15:15:52 +0000 |
parents | 110e3ac1b7d2 |
children | 5a583cff97ea |
comparison
equal
deleted
inserted
replaced
129:110e3ac1b7d2 | 130:e4eacd613356 |
---|---|
13 * CVS State: $State: Exp $ | 13 * CVS State: $State: Exp $ |
14 * Project: $ProjectName$ | 14 * Project: $ProjectName$ |
15 */ | 15 */ |
16 package de.intevation.gnv.geobackend.sde.datasources; | 16 package de.intevation.gnv.geobackend.sde.datasources; |
17 | 17 |
18 import java.io.InputStream; | |
19 import java.io.Reader; | |
20 import java.math.BigDecimal; | |
21 import java.net.URL; | |
22 import java.sql.Array; | |
23 import java.sql.Blob; | |
24 import java.sql.Clob; | |
25 import java.sql.Date; | |
26 import java.sql.Ref; | |
27 import java.sql.ResultSetMetaData; | |
28 import java.sql.SQLException; | |
29 import java.sql.SQLWarning; | |
30 import java.sql.Statement; | |
31 import java.sql.Time; | |
32 import java.sql.Timestamp; | |
18 import java.util.ArrayList; | 33 import java.util.ArrayList; |
34 import java.util.Calendar; | |
19 import java.util.Collections; | 35 import java.util.Collections; |
20 import java.util.List; | 36 import java.util.List; |
37 import java.util.Map; | |
21 | 38 |
22 import org.apache.log4j.Logger; | 39 import org.apache.log4j.Logger; |
40 | |
41 import de.intevation.gnv.geobackend.sde.datasources.exception.TechnicalException; | |
23 | 42 |
24 /** | 43 /** |
25 * @author blume | 44 * @author blume |
26 * @version 1.0 | 45 * @version 1.0 |
27 * @serial 1.0 | 46 * @serial 1.0 |
28 * @see | 47 * @see |
29 * @since 21.11.2007 11:01:27 | 48 * @since 21.11.2007 11:01:27 |
30 */ | 49 */ |
31 public class SDEResultSet extends ResultSet { | 50 public class SDEResultSet extends ResultSet { |
32 | 51 |
33 /** | 52 /** |
34 * Default Logging instance | 53 * Default Logging instance |
35 */ | 54 */ |
36 private static Logger sLogger = Logger.getLogger(SDEResultSet.class); | 55 private static Logger log = Logger.getLogger(SDEResultSet.class); |
37 | 56 |
38 | 57 private List<Row> mRows = Collections.synchronizedList(new ArrayList<Row>()); |
39 private List<Row> mRows = Collections.synchronizedList(new ArrayList<Row>()); | 58 private List<ColDefinition> mCols = Collections.synchronizedList(new ArrayList<ColDefinition>()); |
40 private List<ColDefinition> mCols = Collections.synchronizedList(new ArrayList<ColDefinition>()); | 59 |
41 | 60 private Row currentRow = null; |
42 public SDEResultSet() { | 61 private int cursor = 0; |
43 } | 62 |
44 | 63 public SDEResultSet() { |
45 public int getCount() { | 64 } |
46 return mRows.size(); | 65 |
47 } | 66 public int getCount() { |
48 | 67 return mRows.size(); |
49 public int getNumberOfColumns() { | 68 } |
50 return mCols.size(); | 69 |
51 } | 70 public int getNumberOfColumns() { |
52 | 71 return mCols.size(); |
53 public ColDefinition[] getColumnDefinitions() { | 72 } |
54 ColDefinition[] lColDefinitions = new ColDefinition[mCols.size()]; | 73 |
55 return mCols.toArray(lColDefinitions); | 74 public ColDefinition[] getColumnDefinitions() { |
56 } | 75 ColDefinition[] lColDefinitions = new ColDefinition[mCols.size()]; |
57 | 76 return mCols.toArray(lColDefinitions); |
58 public Row[] getResults() { | 77 } |
59 Row[] lRows = new Row[mRows.size()]; | 78 |
60 return mRows.toArray(lRows); | 79 public Row[] getResults() { |
61 } | 80 Row[] lRows = new Row[mRows.size()]; |
62 | 81 return mRows.toArray(lRows); |
63 public void addRow(Row pRow) { | 82 } |
64 mRows.add(pRow); | 83 |
65 } | 84 public void addRow(Row pRow) { |
66 | 85 mRows.add(pRow); |
67 public void addCol(ColDefinition pColDefinition) { | 86 } |
68 mCols.add(pColDefinition); | 87 |
69 } | 88 public void addCol(ColDefinition pColDefinition) { |
89 mCols.add(pColDefinition); | |
90 } | |
91 | |
92 /** | |
93 * @see java.sql.ResultSet#absolute(int) | |
94 */ | |
95 public boolean absolute(int row) throws SQLException { | |
96 | |
97 return false; | |
98 } | |
99 | |
100 /** | |
101 * @see java.sql.ResultSet#afterLast() | |
102 */ | |
103 public void afterLast() throws SQLException { | |
104 } | |
105 | |
106 /** | |
107 * @see java.sql.ResultSet#beforeFirst() | |
108 */ | |
109 public void beforeFirst() throws SQLException { | |
110 } | |
111 | |
112 /** | |
113 * @see java.sql.ResultSet#cancelRowUpdates() | |
114 */ | |
115 public void cancelRowUpdates() throws SQLException { | |
116 } | |
117 | |
118 /** | |
119 * @see java.sql.ResultSet#clearWarnings() | |
120 */ | |
121 public void clearWarnings() throws SQLException { | |
122 } | |
123 | |
124 /** | |
125 * @see java.sql.ResultSet#close() | |
126 */ | |
127 public void close() throws SQLException { | |
128 } | |
129 | |
130 /** | |
131 * @see java.sql.ResultSet#deleteRow() | |
132 */ | |
133 public void deleteRow() throws SQLException { | |
134 } | |
135 | |
136 /** | |
137 * @see java.sql.ResultSet#findColumn(java.lang.String) | |
138 */ | |
139 public int findColumn(String columnName) throws SQLException { | |
140 | |
141 return 0; | |
142 } | |
143 | |
144 /** | |
145 * @see java.sql.ResultSet#first() | |
146 */ | |
147 public boolean first() throws SQLException { | |
148 | |
149 return false; | |
150 } | |
151 | |
152 /** | |
153 * @see java.sql.ResultSet#getArray(int) | |
154 */ | |
155 public Array getArray(int i) throws SQLException { | |
156 | |
157 return null; | |
158 } | |
159 | |
160 /** | |
161 * @see java.sql.ResultSet#getArray(java.lang.String) | |
162 */ | |
163 public Array getArray(String colName) throws SQLException { | |
164 | |
165 return null; | |
166 } | |
167 | |
168 /** | |
169 * @see java.sql.ResultSet#getAsciiStream(int) | |
170 */ | |
171 public InputStream getAsciiStream(int columnIndex) throws SQLException { | |
172 | |
173 return null; | |
174 } | |
175 | |
176 /** | |
177 * @see java.sql.ResultSet#getAsciiStream(java.lang.String) | |
178 */ | |
179 public InputStream getAsciiStream(String columnName) throws SQLException { | |
180 | |
181 return null; | |
182 } | |
183 | |
184 /** | |
185 * @see java.sql.ResultSet#getBigDecimal(int) | |
186 */ | |
187 public BigDecimal getBigDecimal(int columnIndex) throws SQLException { | |
188 | |
189 return null; | |
190 } | |
191 | |
192 /** | |
193 * @see java.sql.ResultSet#getBigDecimal(java.lang.String) | |
194 */ | |
195 public BigDecimal getBigDecimal(String columnName) throws SQLException { | |
196 | |
197 return null; | |
198 } | |
199 | |
200 /** | |
201 * @see java.sql.ResultSet#getBigDecimal(int, int) | |
202 */ | |
203 public BigDecimal getBigDecimal(int columnIndex, int scale) | |
204 throws SQLException { | |
205 | |
206 return null; | |
207 } | |
208 | |
209 /** | |
210 * @see java.sql.ResultSet#getBigDecimal(java.lang.String, int) | |
211 */ | |
212 public BigDecimal getBigDecimal(String columnName, int scale) | |
213 throws SQLException { | |
214 | |
215 return null; | |
216 } | |
217 | |
218 /** | |
219 * @see java.sql.ResultSet#getBinaryStream(int) | |
220 */ | |
221 public InputStream getBinaryStream(int columnIndex) throws SQLException { | |
222 | |
223 return null; | |
224 } | |
225 | |
226 /** | |
227 * @see java.sql.ResultSet#getBinaryStream(java.lang.String) | |
228 */ | |
229 public InputStream getBinaryStream(String columnName) throws SQLException { | |
230 | |
231 return null; | |
232 } | |
233 | |
234 /** | |
235 * @see java.sql.ResultSet#getBlob(int) | |
236 */ | |
237 public Blob getBlob(int i) throws SQLException { | |
238 | |
239 return null; | |
240 } | |
241 | |
242 /** | |
243 * @see java.sql.ResultSet#getBlob(java.lang.String) | |
244 */ | |
245 public Blob getBlob(String colName) throws SQLException { | |
246 | |
247 return null; | |
248 } | |
249 | |
250 /** | |
251 * @see java.sql.ResultSet#getBoolean(int) | |
252 */ | |
253 public boolean getBoolean(int columnIndex) throws SQLException { | |
254 | |
255 return false; | |
256 } | |
257 | |
258 /** | |
259 * @see java.sql.ResultSet#getBoolean(java.lang.String) | |
260 */ | |
261 public boolean getBoolean(String columnName) throws SQLException { | |
262 | |
263 return false; | |
264 } | |
265 | |
266 /** | |
267 * @see java.sql.ResultSet#getByte(int) | |
268 */ | |
269 public byte getByte(int columnIndex) throws SQLException { | |
270 | |
271 return 0; | |
272 } | |
273 | |
274 /** | |
275 * @see java.sql.ResultSet#getByte(java.lang.String) | |
276 */ | |
277 public byte getByte(String columnName) throws SQLException { | |
278 | |
279 return 0; | |
280 } | |
281 | |
282 /** | |
283 * @see java.sql.ResultSet#getBytes(int) | |
284 */ | |
285 public byte[] getBytes(int columnIndex) throws SQLException { | |
286 | |
287 return null; | |
288 } | |
289 | |
290 /** | |
291 * @see java.sql.ResultSet#getBytes(java.lang.String) | |
292 */ | |
293 public byte[] getBytes(String columnName) throws SQLException { | |
294 | |
295 return null; | |
296 } | |
297 | |
298 /** | |
299 * @see java.sql.ResultSet#getCharacterStream(int) | |
300 */ | |
301 public Reader getCharacterStream(int columnIndex) throws SQLException { | |
302 | |
303 return null; | |
304 } | |
305 | |
306 /** | |
307 * @see java.sql.ResultSet#getCharacterStream(java.lang.String) | |
308 */ | |
309 public Reader getCharacterStream(String columnName) throws SQLException { | |
310 | |
311 return null; | |
312 } | |
313 | |
314 /** | |
315 * @see java.sql.ResultSet#getClob(int) | |
316 */ | |
317 public Clob getClob(int i) throws SQLException { | |
318 | |
319 return null; | |
320 } | |
321 | |
322 /** | |
323 * @see java.sql.ResultSet#getClob(java.lang.String) | |
324 */ | |
325 public Clob getClob(String colName) throws SQLException { | |
326 | |
327 return null; | |
328 } | |
329 | |
330 /** | |
331 * @see java.sql.ResultSet#getConcurrency() | |
332 */ | |
333 public int getConcurrency() throws SQLException { | |
334 | |
335 return 0; | |
336 } | |
337 | |
338 /** | |
339 * @see java.sql.ResultSet#getCursorName() | |
340 */ | |
341 public String getCursorName() throws SQLException { | |
342 | |
343 return null; | |
344 } | |
345 | |
346 /** | |
347 * @see java.sql.ResultSet#getDate(int) | |
348 */ | |
349 public Date getDate(int columnIndex) throws SQLException { | |
350 try { | |
351 return new java.sql.Date(this.currentRow.getDateValue(columnIndex-1).getTime()); | |
352 } catch (TechnicalException e) { | |
353 log.error(e,e); | |
354 throw new SQLException(e.getMessage()); | |
355 } | |
356 } | |
357 | |
358 /** | |
359 * @see java.sql.ResultSet#getDate(java.lang.String) | |
360 */ | |
361 public Date getDate(String columnName) throws SQLException { | |
362 int columnIndex = this.getColumnIndex(columnName); | |
363 return this.getDate(columnIndex); | |
364 } | |
365 | |
366 /** | |
367 * @see java.sql.ResultSet#getDate(int, java.util.Calendar) | |
368 */ | |
369 public Date getDate(int columnIndex, Calendar cal) throws SQLException { | |
370 | |
371 return null; | |
372 } | |
373 | |
374 /** | |
375 * @see java.sql.ResultSet#getDate(java.lang.String, java.util.Calendar) | |
376 */ | |
377 public Date getDate(String columnName, Calendar cal) throws SQLException { | |
378 | |
379 return null; | |
380 } | |
381 | |
382 /** | |
383 * @see java.sql.ResultSet#getDouble(int) | |
384 */ | |
385 public double getDouble(int columnIndex) throws SQLException { | |
386 try { | |
387 return this.currentRow.getDoubleValue(columnIndex-1); | |
388 } catch (TechnicalException e) { | |
389 log.error(e,e); | |
390 throw new SQLException(e.getMessage()); | |
391 } | |
392 } | |
393 | |
394 /** | |
395 * @see java.sql.ResultSet#getDouble(java.lang.String) | |
396 */ | |
397 public double getDouble(String columnName) throws SQLException { | |
398 int columnIndex = this.getColumnIndex(columnName); | |
399 return this.getDouble(columnIndex); | |
400 } | |
401 | |
402 /** | |
403 * @see java.sql.ResultSet#getFetchDirection() | |
404 */ | |
405 public int getFetchDirection() throws SQLException { | |
406 | |
407 return 0; | |
408 } | |
409 | |
410 /** | |
411 * @see java.sql.ResultSet#getFetchSize() | |
412 */ | |
413 public int getFetchSize() throws SQLException { | |
414 | |
415 return 0; | |
416 } | |
417 | |
418 /** | |
419 * @see java.sql.ResultSet#getFloat(int) | |
420 */ | |
421 public float getFloat(int columnIndex) throws SQLException { | |
422 try { | |
423 return this.currentRow.getFloatValue(columnIndex-1); | |
424 } catch (TechnicalException e) { | |
425 log.error(e,e); | |
426 throw new SQLException(e.getMessage()); | |
427 } | |
428 } | |
429 | |
430 /** | |
431 * @see java.sql.ResultSet#getFloat(java.lang.String) | |
432 */ | |
433 public float getFloat(String columnName) throws SQLException { | |
434 int columnIndex = this.getColumnIndex(columnName); | |
435 return this.getFloat(columnIndex); | |
436 } | |
437 | |
438 /** | |
439 * @see java.sql.ResultSet#getInt(int) | |
440 */ | |
441 public int getInt(int columnIndex) throws SQLException { | |
442 | |
443 try { | |
444 return this.currentRow.getIntValue(columnIndex-1); | |
445 } catch (TechnicalException e) { | |
446 log.error(e,e); | |
447 throw new SQLException(e.getMessage()); | |
448 } | |
449 } | |
450 | |
451 /** | |
452 * @see java.sql.ResultSet#getInt(java.lang.String) | |
453 */ | |
454 public int getInt(String columnName) throws SQLException { | |
455 int columnIndex = this.getColumnIndex(columnName); | |
456 return this.getInt(columnIndex); | |
457 } | |
458 | |
459 /** | |
460 * @see java.sql.ResultSet#getLong(int) | |
461 */ | |
462 public long getLong(int columnIndex) throws SQLException { | |
463 | |
464 return 0; | |
465 } | |
466 | |
467 /** | |
468 * @see java.sql.ResultSet#getLong(java.lang.String) | |
469 */ | |
470 public long getLong(String columnName) throws SQLException { | |
471 | |
472 return 0; | |
473 } | |
474 | |
475 /** | |
476 * @see java.sql.ResultSet#getMetaData() | |
477 */ | |
478 public ResultSetMetaData getMetaData() throws SQLException { | |
479 | |
480 return null; | |
481 } | |
482 | |
483 /** | |
484 * @see java.sql.ResultSet#getObject(int) | |
485 */ | |
486 public Object getObject(int columnIndex) throws SQLException { | |
487 try { | |
488 return this.currentRow.getValue(columnIndex-1); | |
489 } catch (TechnicalException e) { | |
490 log.error(e,e); | |
491 throw new SQLException(e.getMessage()); | |
492 } | |
493 } | |
494 | |
495 /** | |
496 * @see java.sql.ResultSet#getObject(java.lang.String) | |
497 */ | |
498 public Object getObject(String columnName) throws SQLException { | |
499 int columnIndex = this.getColumnIndex(columnName); | |
500 return this.getObject(columnIndex); | |
501 } | |
502 | |
503 /** | |
504 * @see java.sql.ResultSet#getObject(int, java.util.Map) | |
505 */ | |
506 public Object getObject(int i, Map<String, Class<?>> map) | |
507 throws SQLException { | |
508 | |
509 return null; | |
510 } | |
511 | |
512 /** | |
513 * @see java.sql.ResultSet#getObject(java.lang.String, java.util.Map) | |
514 */ | |
515 public Object getObject(String colName, Map<String, Class<?>> map) | |
516 throws SQLException { | |
517 | |
518 return null; | |
519 } | |
520 | |
521 /** | |
522 * @see java.sql.ResultSet#getRef(int) | |
523 */ | |
524 public Ref getRef(int i) throws SQLException { | |
525 | |
526 return null; | |
527 } | |
528 | |
529 /** | |
530 * @see java.sql.ResultSet#getRef(java.lang.String) | |
531 */ | |
532 public Ref getRef(String colName) throws SQLException { | |
533 | |
534 return null; | |
535 } | |
536 | |
537 /** | |
538 * @see java.sql.ResultSet#getRow() | |
539 */ | |
540 public int getRow() throws SQLException { | |
541 | |
542 return 0; | |
543 } | |
544 | |
545 /** | |
546 * @see java.sql.ResultSet#getShort(int) | |
547 */ | |
548 public short getShort(int columnIndex) throws SQLException { | |
549 | |
550 return 0; | |
551 } | |
552 | |
553 /** | |
554 * @see java.sql.ResultSet#getShort(java.lang.String) | |
555 */ | |
556 public short getShort(String columnName) throws SQLException { | |
557 | |
558 return 0; | |
559 } | |
560 | |
561 /** | |
562 * @see java.sql.ResultSet#getStatement() | |
563 */ | |
564 public Statement getStatement() throws SQLException { | |
565 | |
566 return null; | |
567 } | |
568 | |
569 /** | |
570 * @see java.sql.ResultSet#getString(int) | |
571 */ | |
572 public String getString(int columnIndex) throws SQLException { | |
573 | |
574 try { | |
575 return this.currentRow.getStringValue(columnIndex-1); | |
576 } catch (TechnicalException e) { | |
577 log.error(e,e); | |
578 throw new SQLException(e.getMessage()); | |
579 } | |
580 } | |
581 | |
582 /** | |
583 * @see java.sql.ResultSet#getString(java.lang.String) | |
584 */ | |
585 public String getString(String columnName) throws SQLException { | |
586 int columnIndex = this.getColumnIndex(columnName); | |
587 return this.getString(columnIndex); | |
588 } | |
589 | |
590 /** | |
591 * @see java.sql.ResultSet#getTime(int) | |
592 */ | |
593 public Time getTime(int columnIndex) throws SQLException { | |
594 | |
595 return null; | |
596 } | |
597 | |
598 /** | |
599 * @see java.sql.ResultSet#getTime(java.lang.String) | |
600 */ | |
601 public Time getTime(String columnName) throws SQLException { | |
602 | |
603 return null; | |
604 } | |
605 | |
606 /** | |
607 * @see java.sql.ResultSet#getTime(int, java.util.Calendar) | |
608 */ | |
609 public Time getTime(int columnIndex, Calendar cal) throws SQLException { | |
610 | |
611 return null; | |
612 } | |
613 | |
614 /** | |
615 * @see java.sql.ResultSet#getTime(java.lang.String, java.util.Calendar) | |
616 */ | |
617 public Time getTime(String columnName, Calendar cal) throws SQLException { | |
618 | |
619 return null; | |
620 } | |
621 | |
622 /** | |
623 * @see java.sql.ResultSet#getTimestamp(int) | |
624 */ | |
625 public Timestamp getTimestamp(int columnIndex) throws SQLException { | |
626 | |
627 return null; | |
628 } | |
629 | |
630 /** | |
631 * @see java.sql.ResultSet#getTimestamp(java.lang.String) | |
632 */ | |
633 public Timestamp getTimestamp(String columnName) throws SQLException { | |
634 | |
635 return null; | |
636 } | |
637 | |
638 /** | |
639 * @see java.sql.ResultSet#getTimestamp(int, java.util.Calendar) | |
640 */ | |
641 public Timestamp getTimestamp(int columnIndex, Calendar cal) | |
642 throws SQLException { | |
643 | |
644 return null; | |
645 } | |
646 | |
647 /** | |
648 * @see java.sql.ResultSet#getTimestamp(java.lang.String, | |
649 * java.util.Calendar) | |
650 */ | |
651 public Timestamp getTimestamp(String columnName, Calendar cal) | |
652 throws SQLException { | |
653 | |
654 return null; | |
655 } | |
656 | |
657 /** | |
658 * @see java.sql.ResultSet#getType() | |
659 */ | |
660 public int getType() throws SQLException { | |
661 | |
662 return 0; | |
663 } | |
664 | |
665 /** | |
666 * @see java.sql.ResultSet#getURL(int) | |
667 */ | |
668 public URL getURL(int columnIndex) throws SQLException { | |
669 | |
670 return null; | |
671 } | |
672 | |
673 /** | |
674 * @see java.sql.ResultSet#getURL(java.lang.String) | |
675 */ | |
676 public URL getURL(String columnName) throws SQLException { | |
677 | |
678 return null; | |
679 } | |
680 | |
681 /** | |
682 * @see java.sql.ResultSet#getUnicodeStream(int) | |
683 */ | |
684 public InputStream getUnicodeStream(int columnIndex) throws SQLException { | |
685 | |
686 return null; | |
687 } | |
688 | |
689 /** | |
690 * @see java.sql.ResultSet#getUnicodeStream(java.lang.String) | |
691 */ | |
692 public InputStream getUnicodeStream(String columnName) throws SQLException { | |
693 | |
694 return null; | |
695 } | |
696 | |
697 /** | |
698 * @see java.sql.ResultSet#getWarnings() | |
699 */ | |
700 public SQLWarning getWarnings() throws SQLException { | |
701 | |
702 return null; | |
703 } | |
704 | |
705 /** | |
706 * @see java.sql.ResultSet#insertRow() | |
707 */ | |
708 public void insertRow() throws SQLException { | |
709 } | |
710 | |
711 /** | |
712 * @see java.sql.ResultSet#isAfterLast() | |
713 */ | |
714 public boolean isAfterLast() throws SQLException { | |
715 | |
716 return false; | |
717 } | |
718 | |
719 /** | |
720 * @see java.sql.ResultSet#isBeforeFirst() | |
721 */ | |
722 public boolean isBeforeFirst() throws SQLException { | |
723 | |
724 return false; | |
725 } | |
726 | |
727 /** | |
728 * @see java.sql.ResultSet#isFirst() | |
729 */ | |
730 public boolean isFirst() throws SQLException { | |
731 | |
732 return false; | |
733 } | |
734 | |
735 /** | |
736 * @see java.sql.ResultSet#isLast() | |
737 */ | |
738 public boolean isLast() throws SQLException { | |
739 | |
740 return false; | |
741 } | |
742 | |
743 /** | |
744 * @see java.sql.ResultSet#last() | |
745 */ | |
746 public boolean last() throws SQLException { | |
747 | |
748 return false; | |
749 } | |
750 | |
751 /** | |
752 * @see java.sql.ResultSet#moveToCurrentRow() | |
753 */ | |
754 public void moveToCurrentRow() throws SQLException { | |
755 } | |
756 | |
757 /** | |
758 * @see java.sql.ResultSet#moveToInsertRow() | |
759 */ | |
760 public void moveToInsertRow() throws SQLException { | |
761 } | |
762 | |
763 /** | |
764 * @see java.sql.ResultSet#next() | |
765 */ | |
766 public boolean next() throws SQLException { | |
767 | |
768 boolean next = this.mRows.size() > this.cursor; | |
769 if (next){ | |
770 log.debug("Zeile "+(cursor+1)+" von "+this.mRows.size()+" wird angesteuert."); | |
771 this.currentRow = this.mRows.get(this.cursor); | |
772 this.cursor++; | |
773 }else{ | |
774 this.currentRow = null; | |
775 } | |
776 return next; | |
777 } | |
778 | |
779 /** | |
780 * @see java.sql.ResultSet#previous() | |
781 */ | |
782 public boolean previous() throws SQLException { | |
783 | |
784 return false; | |
785 } | |
786 | |
787 /** | |
788 * @see java.sql.ResultSet#refreshRow() | |
789 */ | |
790 public void refreshRow() throws SQLException { | |
791 } | |
792 | |
793 /** | |
794 * @see java.sql.ResultSet#relative(int) | |
795 */ | |
796 public boolean relative(int rows) throws SQLException { | |
797 | |
798 return false; | |
799 } | |
800 | |
801 /** | |
802 * @see java.sql.ResultSet#rowDeleted() | |
803 */ | |
804 public boolean rowDeleted() throws SQLException { | |
805 | |
806 return false; | |
807 } | |
808 | |
809 /** | |
810 * @see java.sql.ResultSet#rowInserted() | |
811 */ | |
812 public boolean rowInserted() throws SQLException { | |
813 | |
814 return false; | |
815 } | |
816 | |
817 /** | |
818 * @see java.sql.ResultSet#rowUpdated() | |
819 */ | |
820 public boolean rowUpdated() throws SQLException { | |
821 | |
822 return false; | |
823 } | |
824 | |
825 /** | |
826 * @see java.sql.ResultSet#setFetchDirection(int) | |
827 */ | |
828 public void setFetchDirection(int direction) throws SQLException { | |
829 } | |
830 | |
831 /** | |
832 * @see java.sql.ResultSet#setFetchSize(int) | |
833 */ | |
834 public void setFetchSize(int rows) throws SQLException { | |
835 } | |
836 | |
837 /** | |
838 * @see java.sql.ResultSet#updateArray(int, java.sql.Array) | |
839 */ | |
840 public void updateArray(int columnIndex, Array x) throws SQLException { | |
841 } | |
842 | |
843 /** | |
844 * @see java.sql.ResultSet#updateArray(java.lang.String, java.sql.Array) | |
845 */ | |
846 public void updateArray(String columnName, Array x) throws SQLException { | |
847 } | |
848 | |
849 /** | |
850 * @see java.sql.ResultSet#updateAsciiStream(int, java.io.InputStream, int) | |
851 */ | |
852 public void updateAsciiStream(int columnIndex, InputStream x, int length) | |
853 throws SQLException { | |
854 } | |
855 | |
856 /** | |
857 * @see java.sql.ResultSet#updateAsciiStream(java.lang.String, | |
858 * java.io.InputStream, int) | |
859 */ | |
860 public void updateAsciiStream(String columnName, InputStream x, int length) | |
861 throws SQLException { | |
862 } | |
863 | |
864 /** | |
865 * @see java.sql.ResultSet#updateBigDecimal(int, java.math.BigDecimal) | |
866 */ | |
867 public void updateBigDecimal(int columnIndex, BigDecimal x) | |
868 throws SQLException { | |
869 } | |
870 | |
871 /** | |
872 * @see java.sql.ResultSet#updateBigDecimal(java.lang.String, | |
873 * java.math.BigDecimal) | |
874 */ | |
875 public void updateBigDecimal(String columnName, BigDecimal x) | |
876 throws SQLException { | |
877 } | |
878 | |
879 /** | |
880 * @see java.sql.ResultSet#updateBinaryStream(int, java.io.InputStream, int) | |
881 */ | |
882 public void updateBinaryStream(int columnIndex, InputStream x, int length) | |
883 throws SQLException { | |
884 } | |
885 | |
886 /** | |
887 * @see java.sql.ResultSet#updateBinaryStream(java.lang.String, | |
888 * java.io.InputStream, int) | |
889 */ | |
890 public void updateBinaryStream(String columnName, InputStream x, int length) | |
891 throws SQLException { | |
892 } | |
893 | |
894 /** | |
895 * @see java.sql.ResultSet#updateBlob(int, java.sql.Blob) | |
896 */ | |
897 public void updateBlob(int columnIndex, Blob x) throws SQLException { | |
898 } | |
899 | |
900 /** | |
901 * @see java.sql.ResultSet#updateBlob(java.lang.String, java.sql.Blob) | |
902 */ | |
903 public void updateBlob(String columnName, Blob x) throws SQLException { | |
904 } | |
905 | |
906 /** | |
907 * @see java.sql.ResultSet#updateBoolean(int, boolean) | |
908 */ | |
909 public void updateBoolean(int columnIndex, boolean x) throws SQLException { | |
910 } | |
911 | |
912 /** | |
913 * @see java.sql.ResultSet#updateBoolean(java.lang.String, boolean) | |
914 */ | |
915 public void updateBoolean(String columnName, boolean x) throws SQLException { | |
916 } | |
917 | |
918 /** | |
919 * @see java.sql.ResultSet#updateByte(int, byte) | |
920 */ | |
921 public void updateByte(int columnIndex, byte x) throws SQLException { | |
922 } | |
923 | |
924 /** | |
925 * @see java.sql.ResultSet#updateByte(java.lang.String, byte) | |
926 */ | |
927 public void updateByte(String columnName, byte x) throws SQLException { | |
928 } | |
929 | |
930 /** | |
931 * @see java.sql.ResultSet#updateBytes(int, byte[]) | |
932 */ | |
933 public void updateBytes(int columnIndex, byte[] x) throws SQLException { | |
934 } | |
935 | |
936 /** | |
937 * @see java.sql.ResultSet#updateBytes(java.lang.String, byte[]) | |
938 */ | |
939 public void updateBytes(String columnName, byte[] x) throws SQLException { | |
940 } | |
941 | |
942 /** | |
943 * @see java.sql.ResultSet#updateCharacterStream(int, java.io.Reader, int) | |
944 */ | |
945 public void updateCharacterStream(int columnIndex, Reader x, int length) | |
946 throws SQLException { | |
947 } | |
948 | |
949 /** | |
950 * @see java.sql.ResultSet#updateCharacterStream(java.lang.String, | |
951 * java.io.Reader, int) | |
952 */ | |
953 public void updateCharacterStream(String columnName, Reader reader, | |
954 int length) throws SQLException { | |
955 } | |
956 | |
957 /** | |
958 * @see java.sql.ResultSet#updateClob(int, java.sql.Clob) | |
959 */ | |
960 public void updateClob(int columnIndex, Clob x) throws SQLException { | |
961 } | |
962 | |
963 /** | |
964 * @see java.sql.ResultSet#updateClob(java.lang.String, java.sql.Clob) | |
965 */ | |
966 public void updateClob(String columnName, Clob x) throws SQLException { | |
967 } | |
968 | |
969 /** | |
970 * @see java.sql.ResultSet#updateDate(int, java.sql.Date) | |
971 */ | |
972 public void updateDate(int columnIndex, Date x) throws SQLException { | |
973 } | |
974 | |
975 /** | |
976 * @see java.sql.ResultSet#updateDate(java.lang.String, java.sql.Date) | |
977 */ | |
978 public void updateDate(String columnName, Date x) throws SQLException { | |
979 } | |
980 | |
981 /** | |
982 * @see java.sql.ResultSet#updateDouble(int, double) | |
983 */ | |
984 public void updateDouble(int columnIndex, double x) throws SQLException { | |
985 } | |
986 | |
987 /** | |
988 * @see java.sql.ResultSet#updateDouble(java.lang.String, double) | |
989 */ | |
990 public void updateDouble(String columnName, double x) throws SQLException { | |
991 } | |
992 | |
993 /** | |
994 * @see java.sql.ResultSet#updateFloat(int, float) | |
995 */ | |
996 public void updateFloat(int columnIndex, float x) throws SQLException { | |
997 } | |
998 | |
999 /** | |
1000 * @see java.sql.ResultSet#updateFloat(java.lang.String, float) | |
1001 */ | |
1002 public void updateFloat(String columnName, float x) throws SQLException { | |
1003 } | |
1004 | |
1005 /** | |
1006 * @see java.sql.ResultSet#updateInt(int, int) | |
1007 */ | |
1008 public void updateInt(int columnIndex, int x) throws SQLException { | |
1009 } | |
1010 | |
1011 /** | |
1012 * @see java.sql.ResultSet#updateInt(java.lang.String, int) | |
1013 */ | |
1014 public void updateInt(String columnName, int x) throws SQLException { | |
1015 } | |
1016 | |
1017 /** | |
1018 * @see java.sql.ResultSet#updateLong(int, long) | |
1019 */ | |
1020 public void updateLong(int columnIndex, long x) throws SQLException { | |
1021 } | |
1022 | |
1023 /** | |
1024 * @see java.sql.ResultSet#updateLong(java.lang.String, long) | |
1025 */ | |
1026 public void updateLong(String columnName, long x) throws SQLException { | |
1027 } | |
1028 | |
1029 /** | |
1030 * @see java.sql.ResultSet#updateNull(int) | |
1031 */ | |
1032 public void updateNull(int columnIndex) throws SQLException { | |
1033 } | |
1034 | |
1035 /** | |
1036 * @see java.sql.ResultSet#updateNull(java.lang.String) | |
1037 */ | |
1038 public void updateNull(String columnName) throws SQLException { | |
1039 } | |
1040 | |
1041 /** | |
1042 * @see java.sql.ResultSet#updateObject(int, java.lang.Object) | |
1043 */ | |
1044 public void updateObject(int columnIndex, Object x) throws SQLException { | |
1045 } | |
1046 | |
1047 /** | |
1048 * @see java.sql.ResultSet#updateObject(java.lang.String, java.lang.Object) | |
1049 */ | |
1050 public void updateObject(String columnName, Object x) throws SQLException { | |
1051 } | |
1052 | |
1053 /** | |
1054 * @see java.sql.ResultSet#updateObject(int, java.lang.Object, int) | |
1055 */ | |
1056 public void updateObject(int columnIndex, Object x, int scale) | |
1057 throws SQLException { | |
1058 } | |
1059 | |
1060 /** | |
1061 * @see java.sql.ResultSet#updateObject(java.lang.String, java.lang.Object, | |
1062 * int) | |
1063 */ | |
1064 public void updateObject(String columnName, Object x, int scale) | |
1065 throws SQLException { | |
1066 } | |
1067 | |
1068 /** | |
1069 * @see java.sql.ResultSet#updateRef(int, java.sql.Ref) | |
1070 */ | |
1071 public void updateRef(int columnIndex, Ref x) throws SQLException { | |
1072 } | |
1073 | |
1074 /** | |
1075 * @see java.sql.ResultSet#updateRef(java.lang.String, java.sql.Ref) | |
1076 */ | |
1077 public void updateRef(String columnName, Ref x) throws SQLException { | |
1078 } | |
1079 | |
1080 /** | |
1081 * @see java.sql.ResultSet#updateRow() | |
1082 */ | |
1083 public void updateRow() throws SQLException { | |
1084 } | |
1085 | |
1086 /** | |
1087 * @see java.sql.ResultSet#updateShort(int, short) | |
1088 */ | |
1089 public void updateShort(int columnIndex, short x) throws SQLException { | |
1090 } | |
1091 | |
1092 /** | |
1093 * @see java.sql.ResultSet#updateShort(java.lang.String, short) | |
1094 */ | |
1095 public void updateShort(String columnName, short x) throws SQLException { | |
1096 } | |
1097 | |
1098 /** | |
1099 * @see java.sql.ResultSet#updateString(int, java.lang.String) | |
1100 */ | |
1101 public void updateString(int columnIndex, String x) throws SQLException { | |
1102 } | |
1103 | |
1104 /** | |
1105 * @see java.sql.ResultSet#updateString(java.lang.String, java.lang.String) | |
1106 */ | |
1107 public void updateString(String columnName, String x) throws SQLException { | |
1108 } | |
1109 | |
1110 /** | |
1111 * @see java.sql.ResultSet#updateTime(int, java.sql.Time) | |
1112 */ | |
1113 public void updateTime(int columnIndex, Time x) throws SQLException { | |
1114 } | |
1115 | |
1116 /** | |
1117 * @see java.sql.ResultSet#updateTime(java.lang.String, java.sql.Time) | |
1118 */ | |
1119 public void updateTime(String columnName, Time x) throws SQLException { | |
1120 } | |
1121 | |
1122 /** | |
1123 * @see java.sql.ResultSet#updateTimestamp(int, java.sql.Timestamp) | |
1124 */ | |
1125 public void updateTimestamp(int columnIndex, Timestamp x) | |
1126 throws SQLException { | |
1127 } | |
1128 | |
1129 /** | |
1130 * @see java.sql.ResultSet#updateTimestamp(java.lang.String, | |
1131 * java.sql.Timestamp) | |
1132 */ | |
1133 public void updateTimestamp(String columnName, Timestamp x) | |
1134 throws SQLException { | |
1135 } | |
1136 | |
1137 /** | |
1138 * @see java.sql.ResultSet#wasNull() | |
1139 */ | |
1140 public boolean wasNull() throws SQLException { | |
1141 | |
1142 return false; | |
1143 } | |
1144 | |
1145 | |
1146 private int getColumnIndex(String columnName) throws SQLException{ | |
1147 //TODO: Es gibt effizentere Lösungen. Hier noch mal über HashMap nachdenken | |
1148 for (int i = 0 ; i < this.mCols.size();i++){ | |
1149 if(this.mCols.get(i).getName().equalsIgnoreCase(columnName)){ | |
1150 return i +1; // PLUS 1 da SQL-Cursor 1 nasiert sind | |
1151 } | |
1152 } | |
1153 throw new SQLException("Column "+columnName+" does not exist in ResulSet"); | |
1154 | |
1155 } | |
70 | 1156 |
71 } | 1157 } |