1
2
3
4 package com.github.smokestack.jdbc;
5
6 import static org.hamcrest.MatcherAssert.assertThat;
7
8 import java.io.InputStream;
9 import java.io.Reader;
10 import java.math.BigDecimal;
11 import java.net.URL;
12 import java.sql.Array;
13 import java.sql.Blob;
14 import java.sql.Clob;
15 import java.sql.Date;
16 import java.sql.Ref;
17 import java.sql.ResultSet;
18 import java.sql.ResultSetMetaData;
19 import java.sql.SQLException;
20 import java.sql.SQLWarning;
21 import java.sql.Statement;
22 import java.sql.Time;
23 import java.sql.Timestamp;
24 import java.util.Calendar;
25 import java.util.HashMap;
26 import java.util.Map;
27
28 import com.github.smokestack.exception.NeedsMockDefinitionException;
29
30 import org.apache.commons.lang.builder.ReflectionToStringBuilder;
31 import org.apache.commons.lang.builder.ToStringStyle;
32 import org.hamcrest.core.AnyOf;
33 import org.hamcrest.core.Is;
34 import org.hamcrest.core.IsNot;
35
36
37
38
39
40 public class MockResultSet implements ResultSet {
41
42 public enum ResultSetState {NEW, CLOSE, AUTOCLOSE};
43
44 protected ResultSetState mockState=ResultSetState.NEW;
45
46 private String sql;
47
48 private MockStatement parent;
49
50 private int fetchDirection;
51
52 private int fetchSize;
53
54 private int concurrency;
55
56 private Map<Object,Object> rsValues = new HashMap<Object,Object>();
57
58 public MockResultSet(String sql) {
59 this.sql=sql;
60 }
61
62
63
64
65 public boolean absolute(int row) throws SQLException {
66 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
67 return _absolute(row);
68 }
69
70 public boolean _absolute(int row) {
71 throw new NeedsMockDefinitionException();
72 }
73
74
75
76
77 public void afterLast() throws SQLException {
78 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
79 _afterLast();
80 }
81
82 public void _afterLast() {
83 throw new NeedsMockDefinitionException();
84 }
85
86
87
88
89 public void beforeFirst() throws SQLException {
90 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
91 _beforeFirst();
92 }
93
94 public void _beforeFirst() {
95 throw new NeedsMockDefinitionException();
96 }
97
98
99
100
101 public void cancelRowUpdates() throws SQLException {
102 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
103 _cancelRowUpdates();
104 }
105
106 public void _cancelRowUpdates() {
107 throw new NeedsMockDefinitionException();
108 }
109
110
111
112
113 public void clearWarnings() throws SQLException {
114 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
115 _clearWarnings();
116 }
117
118 public void _clearWarnings() {
119 throw new NeedsMockDefinitionException();
120 }
121
122
123
124
125 public void close() throws SQLException {
126 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
127 _close();
128 mockState=ResultSetState.CLOSE;
129 parent.complete();
130 }
131
132 public void _close() {
133 }
134
135
136
137
138 public void deleteRow() throws SQLException {
139 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
140 _deleteRow();
141 }
142
143 public void _deleteRow() {
144 throw new NeedsMockDefinitionException();
145 }
146
147
148
149
150 public int findColumn(String columnName) throws SQLException {
151 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
152 return _findColumn(columnName);
153 }
154
155 public int _findColumn(String columnName) {
156 throw new NeedsMockDefinitionException();
157 }
158
159
160
161
162 public boolean first() throws SQLException {
163 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
164 return _first();
165 }
166
167 public boolean _first() {
168 throw new NeedsMockDefinitionException();
169 }
170
171
172
173
174 public Array getArray(int i) throws SQLException {
175 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
176 return _getArray(i);
177 }
178
179 public Array _getArray(int i) {
180 throw new NeedsMockDefinitionException();
181 }
182
183
184
185
186 public Array getArray(String colName) throws SQLException {
187 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
188 return _getArray(colName);
189 }
190
191 public Array _getArray(String colName) {
192 throw new NeedsMockDefinitionException();
193 }
194
195
196
197
198 public InputStream getAsciiStream(int columnIndex) throws SQLException {
199 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
200 return _getAsciiStream(columnIndex);
201 }
202
203 public InputStream _getAsciiStream(int columnIndex) {
204 throw new NeedsMockDefinitionException();
205 }
206
207
208
209
210 public InputStream getAsciiStream(String columnName) throws SQLException {
211 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
212 return _getAsciiStream(columnName);
213 }
214
215 public InputStream _getAsciiStream(String columnName) {
216 throw new NeedsMockDefinitionException();
217 }
218
219
220
221
222 public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
223 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
224 return _getBigDecimal(columnIndex);
225 }
226
227 public BigDecimal _getBigDecimal(int columnIndex) {
228 throw new NeedsMockDefinitionException();
229 }
230
231
232
233
234 public BigDecimal getBigDecimal(String columnName) throws SQLException {
235 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
236 return _getBigDecimal(columnName);
237 }
238
239 public BigDecimal _getBigDecimal(String columnName) {
240 throw new NeedsMockDefinitionException();
241 }
242
243
244
245
246 public BigDecimal getBigDecimal(int columnIndex, int scale)
247 throws SQLException {
248 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
249 return _getBigDecimal(columnIndex, scale);
250 }
251
252 public BigDecimal _getBigDecimal(int columnIndex, int scale) {
253 throw new NeedsMockDefinitionException();
254 }
255
256
257
258
259 public BigDecimal getBigDecimal(String columnName, int scale)
260 throws SQLException {
261 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
262 return _getBigDecimal(columnName, scale);
263 }
264
265 public BigDecimal _getBigDecimal(String columnName, int scale) {
266 throw new NeedsMockDefinitionException();
267 }
268
269
270
271
272 public InputStream getBinaryStream(int columnIndex) throws SQLException {
273 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
274 return _getBinaryStream(columnIndex);
275 }
276
277 public InputStream _getBinaryStream(int columnIndex) {
278 throw new NeedsMockDefinitionException();
279 }
280
281
282
283
284 public InputStream getBinaryStream(String columnName) throws SQLException {
285 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
286 return _getBinaryStream(columnName);
287 }
288
289 public InputStream _getBinaryStream(String columnName) {
290 throw new NeedsMockDefinitionException();
291 }
292
293
294
295
296 public Blob getBlob(int i) throws SQLException {
297 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
298 return _getBlob(i);
299 }
300
301 public Blob _getBlob(int i) {
302 throw new NeedsMockDefinitionException();
303 }
304
305
306
307
308 public Blob getBlob(String colName) throws SQLException {
309 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
310 return _getBlob(colName);
311 }
312
313 public Blob _getBlob(String colName) {
314 throw new NeedsMockDefinitionException();
315 }
316
317
318
319
320 public boolean getBoolean(int columnIndex) throws SQLException {
321 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
322 return _getBoolean(columnIndex);
323 }
324
325 public boolean _getBoolean(int columnIndex) {
326 throw new NeedsMockDefinitionException();
327 }
328
329
330
331
332 public boolean getBoolean(String columnName) throws SQLException {
333 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
334 return _getBoolean(columnName);
335 }
336
337 public boolean _getBoolean(String columnName) {
338 throw new NeedsMockDefinitionException();
339 }
340
341
342
343
344 public byte getByte(int columnIndex) throws SQLException {
345 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
346 return _getByte(columnIndex);
347 }
348
349 public byte _getByte(int columnIndex) {
350 throw new NeedsMockDefinitionException();
351 }
352
353
354
355
356 public byte getByte(String columnName) throws SQLException {
357 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
358 return _getByte(columnName);
359 }
360
361 public byte _getByte(String columnName) {
362 throw new NeedsMockDefinitionException();
363 }
364
365
366
367
368 public byte[] getBytes(int columnIndex) throws SQLException {
369 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
370 return _getBytes(columnIndex);
371 }
372
373 public byte[] _getBytes(int columnIndex) {
374 throw new NeedsMockDefinitionException();
375 }
376
377
378
379
380 public byte[] getBytes(String columnName) throws SQLException {
381 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
382 return _getBytes(columnName);
383 }
384
385 public byte[] _getBytes(String columnName) {
386 throw new NeedsMockDefinitionException();
387 }
388
389
390
391
392 public Reader getCharacterStream(int columnIndex) throws SQLException {
393 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
394 return _getCharacterStream(columnIndex);
395 }
396
397 public Reader _getCharacterStream(int columnIndex) {
398 throw new NeedsMockDefinitionException();
399 }
400
401
402
403
404 public Reader getCharacterStream(String columnName) throws SQLException {
405 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
406 return _getCharacterStream(columnName);
407 }
408
409 public Reader _getCharacterStream(String columnName) {
410 throw new NeedsMockDefinitionException();
411 }
412
413
414
415
416 public Clob getClob(int i) throws SQLException {
417 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
418 return _getClob(i);
419 }
420
421 public Clob _getClob(int i) {
422 throw new NeedsMockDefinitionException();
423 }
424
425
426
427
428 public Clob getClob(String colName) throws SQLException {
429 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
430 return _getClob(colName);
431 }
432
433 public Clob _getClob(String colName) {
434 throw new NeedsMockDefinitionException();
435 }
436
437
438
439
440 public int getConcurrency() throws SQLException {
441 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
442 _getConcurrency();
443 return concurrency;
444 }
445
446 public int _getConcurrency() {
447 return -1;
448 }
449
450
451
452
453 public String getCursorName() throws SQLException {
454 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
455 return _getCursorName();
456 }
457
458 public String _getCursorName() {
459 throw new NeedsMockDefinitionException();
460 }
461
462
463
464
465 public Date getDate(int columnIndex) throws SQLException {
466 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
467 return _getDate(columnIndex);
468 }
469
470 public Date _getDate(int columnIndex) {
471 throw new NeedsMockDefinitionException();
472 }
473
474
475
476
477 public Date getDate(String columnName) throws SQLException {
478 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
479 return _getDate(columnName);
480 }
481
482 public Date _getDate(String columnName) {
483 throw new NeedsMockDefinitionException();
484 }
485
486
487
488
489 public Date getDate(int columnIndex, Calendar cal) throws SQLException {
490 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
491 return _getDate(columnIndex, cal);
492 }
493
494 public Date _getDate(int columnIndex, Calendar cal) {
495 throw new NeedsMockDefinitionException();
496 }
497
498
499
500
501 public Date getDate(String columnName, Calendar cal) throws SQLException {
502 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
503 return _getDate(columnName, cal);
504 }
505
506 public Date _getDate(String columnName, Calendar cal) {
507 throw new NeedsMockDefinitionException();
508 }
509
510
511
512
513 public double getDouble(int columnIndex) throws SQLException {
514 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
515 return _getDouble(columnIndex);
516 }
517
518 public double _getDouble(int columnIndex) {
519 throw new NeedsMockDefinitionException();
520 }
521
522
523
524
525 public double getDouble(String columnName) throws SQLException {
526 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
527 return _getDouble(columnName);
528 }
529
530 public double _getDouble(String columnName) {
531 throw new NeedsMockDefinitionException();
532 }
533
534
535
536
537 public int getFetchDirection() throws SQLException {
538 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
539 _getFetchDirection();
540 return fetchDirection;
541 }
542
543 public int _getFetchDirection() {
544 return -1;
545 }
546
547
548
549
550 public int getFetchSize() throws SQLException {
551 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
552 _getFetchSize();
553 return fetchSize;
554 }
555
556 public int _getFetchSize() {
557 return -1;
558 }
559
560
561
562
563 public float getFloat(int columnIndex) throws SQLException {
564 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
565 return _getFloat(columnIndex);
566 }
567
568 public float _getFloat(int columnIndex) {
569 throw new NeedsMockDefinitionException();
570 }
571
572
573
574
575 public float getFloat(String columnName) throws SQLException {
576 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
577 return _getFloat(columnName);
578 }
579
580 public float _getFloat(String columnName) {
581 throw new NeedsMockDefinitionException();
582 }
583
584
585
586
587 public int getInt(int columnIndex) throws SQLException {
588 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
589 return _getInt(columnIndex);
590 }
591
592 public int _getInt(int columnIndex) {
593 throw new NeedsMockDefinitionException();
594 }
595
596
597
598
599 public int getInt(String columnName) throws SQLException {
600 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
601 return _getInt(columnName);
602 }
603
604 public int _getInt(String columnName) {
605 throw new NeedsMockDefinitionException();
606 }
607
608
609
610
611 public long getLong(int columnIndex) throws SQLException {
612 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
613 return _getLong(columnIndex);
614 }
615
616 public long _getLong(int i) {
617 throw new NeedsMockDefinitionException();
618 }
619
620
621
622
623 public long getLong(String columnName) throws SQLException {
624 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
625 return _getLong(columnName);
626 }
627
628 public long _getLong(String columnName) {
629 throw new NeedsMockDefinitionException();
630 }
631
632
633
634
635 public ResultSetMetaData getMetaData() throws SQLException {
636 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
637 return _getMetaData();
638 }
639
640 public ResultSetMetaData _getMetaData() {
641 throw new NeedsMockDefinitionException();
642 }
643
644
645
646
647 public Object getObject(int columnIndex) throws SQLException {
648 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
649 return _getObject(columnIndex);
650 }
651
652 public Object _getObject(int columnIndex) {
653 throw new NeedsMockDefinitionException();
654 }
655
656
657
658
659 public Object getObject(String columnName) throws SQLException {
660 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
661 return _getObject(columnName);
662 }
663
664 public Object _getObject(String columnName) {
665 throw new NeedsMockDefinitionException();
666 }
667
668
669
670
671 public Object getObject(int i, Map<String, Class<?>> map)
672 throws SQLException {
673 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
674 return _getObject(i, map);
675 }
676
677 public Object _getObject(int i, Map<String, Class<?>> map) {
678 throw new NeedsMockDefinitionException();
679 }
680
681
682
683
684 public Object getObject(String colName, Map<String, Class<?>> map)
685 throws SQLException {
686 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
687 return _getObject(colName, map);
688 }
689
690 public Object _getObject(String colName, Map<String, Class<?>> map) {
691 throw new NeedsMockDefinitionException();
692 }
693
694
695
696
697 public Ref getRef(int i) throws SQLException {
698 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
699 return _getRef(i);
700 }
701
702 public Ref _getRef(int i) {
703 throw new NeedsMockDefinitionException();
704 }
705
706
707
708
709 public Ref getRef(String colName) throws SQLException {
710 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
711 return _getRef(colName);
712 }
713
714 public Ref _getRef(String colName) {
715 throw new NeedsMockDefinitionException();
716 }
717
718
719
720
721 public int getRow() throws SQLException {
722 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
723 return _getRow();
724 }
725
726 public int _getRow() {
727 throw new NeedsMockDefinitionException();
728 }
729
730
731
732
733 public short getShort(int columnIndex) throws SQLException {
734 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
735 return _getShort(columnIndex);
736 }
737
738 public short _getShort(int columnIndex) {
739 throw new NeedsMockDefinitionException();
740 }
741
742
743
744
745 public short getShort(String columnName) throws SQLException {
746 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
747 return _getShort(columnName);
748 }
749
750 public short _getShort(String columnName) {
751 throw new NeedsMockDefinitionException();
752 }
753
754
755
756
757 public Statement getStatement() throws SQLException {
758 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
759 return _getStatement();
760 }
761
762 public Statement _getStatement() {
763 throw new NeedsMockDefinitionException();
764 }
765
766
767
768
769 public String getString(int columnIndex) throws SQLException {
770 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
771 return _getString(columnIndex);
772 }
773
774
775
776
777 public String _getString(int columnIndex) throws SQLException {
778 throw new NeedsMockDefinitionException();
779 }
780
781
782
783
784 public String getString(String columnName) throws SQLException {
785 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
786 return _getString(columnName);
787 }
788
789
790
791
792 public String _getString(String columnName) throws SQLException {
793 throw new NeedsMockDefinitionException();
794 }
795
796
797
798
799 public Time getTime(int columnIndex) throws SQLException {
800 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
801 return _getTime(columnIndex);
802 }
803
804 public Time _getTime(int columnIndex) {
805 throw new NeedsMockDefinitionException();
806 }
807
808
809
810
811 public Time getTime(String columnName) throws SQLException {
812 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
813 return _getTime(columnName);
814 }
815
816 public Time _getTime(String columnName) {
817 throw new NeedsMockDefinitionException();
818 }
819
820
821
822
823 public Time getTime(int columnIndex, Calendar cal) throws SQLException {
824 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
825 return _getTime(columnIndex, cal);
826 }
827
828 public Time _getTime(int columnIndex, Calendar cal) {
829 throw new NeedsMockDefinitionException();
830 }
831
832
833
834
835 public Time getTime(String columnName, Calendar cal) throws SQLException {
836 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
837 return _getTime(columnName, cal);
838 }
839
840 public Time _getTime(String columnName, Calendar cal) {
841 throw new NeedsMockDefinitionException();
842 }
843
844
845
846
847 public Timestamp getTimestamp(int columnIndex) throws SQLException {
848 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
849 return _getTimestamp(columnIndex);
850 }
851
852 public Timestamp _getTimestamp(int columnIndex) {
853 throw new NeedsMockDefinitionException();
854 }
855
856
857
858
859 public Timestamp getTimestamp(String columnName) throws SQLException {
860 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
861 return _getTimestamp(columnName);
862 }
863
864 public Timestamp _getTimestamp(String columnName) {
865 throw new NeedsMockDefinitionException();
866 }
867
868
869
870
871 public Timestamp getTimestamp(int columnIndex, Calendar cal)
872 throws SQLException {
873 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
874 return _getTimestamp(columnIndex, cal);
875 }
876
877 public Timestamp _getTimestamp(int columnIndex, Calendar cal) {
878 throw new NeedsMockDefinitionException();
879 }
880
881
882
883
884 public Timestamp getTimestamp(String columnName, Calendar cal)
885 throws SQLException {
886 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
887 return _getTimestamp(columnName, cal);
888 }
889
890 public Timestamp _getTimestamp(String columnName, Calendar cal) {
891 throw new NeedsMockDefinitionException();
892 }
893
894
895
896
897 public int getType() throws SQLException {
898
899 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
900 return _getType();
901 }
902
903 public int _getType() {
904 throw new NeedsMockDefinitionException();
905 }
906
907
908
909
910 public URL getURL(int columnIndex) throws SQLException {
911 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
912 return _getURL(columnIndex);
913 }
914
915 public URL _getURL(int columnIndex) {
916 throw new NeedsMockDefinitionException();
917 }
918
919
920
921
922 public URL getURL(String columnName) throws SQLException {
923 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
924 return _getURL(columnName);
925 }
926
927 public URL _getURL(String columnName) {
928 throw new NeedsMockDefinitionException();
929 }
930
931
932
933
934 public InputStream getUnicodeStream(int columnIndex) throws SQLException {
935 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
936 return _getUnicodeStream(columnIndex);
937 }
938
939 public InputStream _getUnicodeStream(int columnIndex) {
940 throw new NeedsMockDefinitionException();
941 }
942
943
944
945
946 public InputStream getUnicodeStream(String columnName) throws SQLException {
947 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
948 return _getUnicodeStream(columnName);
949 }
950
951 public InputStream _getUnicodeStream(String columnName) {
952 throw new NeedsMockDefinitionException();
953 }
954
955
956
957
958 public SQLWarning getWarnings() throws SQLException {
959 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
960 return _getWarnings();
961 }
962
963 public SQLWarning _getWarnings() {
964 throw new NeedsMockDefinitionException();
965 }
966
967
968
969
970 public void insertRow() throws SQLException {
971 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
972 _insertRow();
973 }
974
975 public void _insertRow() {
976 throw new NeedsMockDefinitionException();
977 }
978
979
980
981
982 public boolean isAfterLast() throws SQLException {
983 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
984 return _isAfterLast();
985 }
986
987 public boolean _isAfterLast() {
988 throw new NeedsMockDefinitionException();
989 }
990
991
992
993
994 public boolean isBeforeFirst() throws SQLException {
995 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
996 return _isBeforeFirst();
997 }
998
999 public boolean _isBeforeFirst() {
1000 throw new NeedsMockDefinitionException();
1001 }
1002
1003
1004
1005
1006 public boolean isFirst() throws SQLException {
1007 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1008 return _isFirst();
1009 }
1010
1011 public boolean _isFirst() {
1012 throw new NeedsMockDefinitionException();
1013 }
1014
1015
1016
1017
1018 public boolean isLast() throws SQLException {
1019 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1020 return _isLast();
1021 }
1022
1023 public boolean _isLast() {
1024 throw new NeedsMockDefinitionException();
1025 }
1026
1027
1028
1029
1030 public boolean last() throws SQLException {
1031 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1032 return _last();
1033 }
1034
1035 public boolean _last() {
1036 throw new NeedsMockDefinitionException();
1037 }
1038
1039
1040
1041
1042 public void moveToCurrentRow() throws SQLException {
1043 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1044 _moveToCurrentRow();
1045 }
1046
1047 public void _moveToCurrentRow() {
1048 throw new NeedsMockDefinitionException();
1049 }
1050
1051
1052
1053
1054 public void moveToInsertRow() throws SQLException {
1055 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1056 _moveToInsertRow();
1057 }
1058
1059 public void _moveToInsertRow() {
1060 throw new NeedsMockDefinitionException();
1061 }
1062
1063
1064
1065
1066 public boolean next() throws SQLException {
1067 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1068 boolean b = _next();
1069 if(!b){
1070 parent.complete();
1071 }
1072 return b;
1073 }
1074
1075
1076
1077
1078 public boolean _next() throws SQLException {
1079 throw new NeedsMockDefinitionException();
1080 }
1081
1082
1083
1084
1085 public boolean previous() throws SQLException {
1086 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1087 return _previous();
1088 }
1089
1090 public boolean _previous() {
1091 throw new NeedsMockDefinitionException();
1092 }
1093
1094
1095
1096
1097 public void refreshRow() throws SQLException {
1098 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1099 _refreshRow();
1100 }
1101
1102 public void _refreshRow() {
1103 throw new NeedsMockDefinitionException();
1104 }
1105
1106
1107
1108
1109 public boolean relative(int rows) throws SQLException {
1110 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1111 return _relative(rows);
1112 }
1113
1114 public boolean _relative(int rows) {
1115 throw new NeedsMockDefinitionException();
1116 }
1117
1118
1119
1120
1121 public boolean rowDeleted() throws SQLException {
1122 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1123 return _rowDeleted();
1124 }
1125
1126 public boolean _rowDeleted() {
1127 throw new NeedsMockDefinitionException();
1128 }
1129
1130
1131
1132
1133 public boolean rowInserted() throws SQLException {
1134 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1135 return _rowInserted();
1136 }
1137
1138
1139
1140
1141 public boolean _rowInserted() {
1142 throw new NeedsMockDefinitionException();
1143 }
1144
1145 public boolean rowUpdated() throws SQLException {
1146 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1147 return _rowUpdated();
1148 }
1149
1150 public boolean _rowUpdated() {
1151 throw new NeedsMockDefinitionException();
1152 }
1153
1154
1155
1156
1157 public void setFetchDirection(int direction) throws SQLException {
1158 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1159 _setFetchDirection(direction);
1160 this.fetchDirection = direction;
1161 }
1162
1163 public void _setFetchDirection(int direction) {
1164 }
1165
1166
1167
1168
1169 public void setFetchSize(int rows) throws SQLException {
1170 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1171 _setFetchSize(rows);
1172 this.fetchSize = rows;
1173 }
1174
1175 public void _setFetchSize(int rows) {
1176 }
1177
1178
1179
1180
1181 public void updateArray(int columnIndex, Array x) throws SQLException {
1182 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1183 _updateArray(columnIndex, x);
1184 }
1185
1186
1187
1188
1189 public void _updateArray(int columnIndex, Array x) {
1190 throw new NeedsMockDefinitionException();
1191 }
1192
1193 public void updateArray(String columnName, Array x) throws SQLException {
1194 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1195 _updateArray(columnName, x);
1196 }
1197
1198 public void _updateArray(String columnName, Array x) {
1199 throw new NeedsMockDefinitionException();
1200 }
1201
1202
1203
1204
1205 public void updateAsciiStream(int columnIndex, InputStream x, int length)
1206 throws SQLException {
1207 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1208 _updateAsciiStream(columnIndex, x, length);
1209 }
1210
1211
1212
1213
1214 public void _updateAsciiStream(int columnIndex, InputStream x, int length) {
1215 throw new NeedsMockDefinitionException();
1216 }
1217
1218 public void updateAsciiStream(String columnName, InputStream x, int length)
1219 throws SQLException {
1220 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1221 _updateAsciiStream(columnName, x, length);
1222 }
1223
1224
1225
1226
1227 public void _updateAsciiStream(String columnName, InputStream x, int length) {
1228 throw new NeedsMockDefinitionException();
1229 }
1230
1231 public void updateBigDecimal(int columnIndex, BigDecimal x)
1232 throws SQLException {
1233 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1234 _updateBigDecimal(columnIndex, x);
1235 }
1236
1237
1238
1239
1240 public void _updateBigDecimal(int columnIndex, BigDecimal x) {
1241 throw new NeedsMockDefinitionException();
1242 }
1243
1244 public void updateBigDecimal(String columnName, BigDecimal x)
1245 throws SQLException {
1246 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1247 _updateBigDecimal(columnName, x);
1248 }
1249
1250
1251
1252
1253 public void _updateBigDecimal(String columnName, BigDecimal x) {
1254 throw new NeedsMockDefinitionException();
1255 }
1256
1257 public void updateBinaryStream(int columnIndex, InputStream x, int length)
1258 throws SQLException {
1259 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1260 _updateBinaryStream(columnIndex, x, length);
1261 }
1262
1263
1264
1265
1266 public void _updateBinaryStream(int columnIndex, InputStream x, int length) {
1267 throw new NeedsMockDefinitionException();
1268 }
1269
1270 public void updateBinaryStream(String columnName, InputStream x, int length)
1271 throws SQLException {
1272 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1273 _updateBinaryStream(columnName, x, length);
1274 }
1275
1276
1277
1278
1279 public void _updateBinaryStream(String columnName, InputStream x,
1280 int length) {
1281 throw new NeedsMockDefinitionException();
1282 }
1283
1284 public void updateBlob(int columnIndex, Blob x) throws SQLException {
1285 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1286 _updateBlob(columnIndex, x);
1287 }
1288
1289
1290
1291
1292 public void _updateBlob(int columnIndex, Blob x) {
1293 throw new NeedsMockDefinitionException();
1294 }
1295
1296 public void updateBlob(String columnName, Blob x) throws SQLException {
1297
1298 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1299 _updateBlob(columnName, x);
1300 }
1301
1302 public void _updateBlob(String columnName, Blob x) {
1303 throw new NeedsMockDefinitionException();
1304 }
1305
1306
1307
1308
1309 public void updateBoolean(int columnIndex, boolean x) throws SQLException {
1310 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1311 _updateBoolean(columnIndex, x);
1312 }
1313
1314 public void _updateBoolean(int columnIndex, boolean x) {
1315 throw new NeedsMockDefinitionException();
1316 }
1317
1318
1319
1320
1321 public void updateBoolean(String columnName, boolean x) throws SQLException {
1322 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1323 _updateBoolean(columnName, x);
1324 }
1325
1326 public void _updateBoolean(String columnName, boolean x) {
1327 throw new NeedsMockDefinitionException();
1328 }
1329
1330
1331
1332
1333 public void updateByte(int columnIndex, byte x) throws SQLException {
1334 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1335 _updateByte(columnIndex, x);
1336 }
1337
1338 public void _updateByte(int columnIndex, byte x) {
1339 throw new NeedsMockDefinitionException();
1340 }
1341
1342
1343
1344
1345 public void updateByte(String columnName, byte x) throws SQLException {
1346 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1347 _updateByte(columnName, x);
1348 }
1349
1350 public void _updateByte(String columnName, byte x) {
1351 throw new NeedsMockDefinitionException();
1352 }
1353
1354
1355
1356
1357 public void updateBytes(int columnIndex, byte[] x) throws SQLException {
1358 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1359 _updateBytes(columnIndex, x);
1360 }
1361
1362 public void _updateBytes(int columnIndex, byte[] x) {
1363 throw new NeedsMockDefinitionException();
1364 }
1365
1366
1367
1368
1369 public void updateBytes(String columnName, byte[] x) throws SQLException {
1370 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1371 _updateBytes(columnName, x);
1372 }
1373
1374 public void _updateBytes(String columnName, byte[] x) {
1375 throw new NeedsMockDefinitionException();
1376 }
1377
1378
1379
1380
1381 public void updateCharacterStream(int columnIndex, Reader x, int length)
1382 throws SQLException {
1383 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1384 _updateCharacterStream(columnIndex, x, length);
1385 }
1386
1387 public void _updateCharacterStream(int columnIndex, Reader x, int length) {
1388 throw new NeedsMockDefinitionException();
1389 }
1390
1391
1392
1393
1394 public void updateCharacterStream(String columnName, Reader reader,
1395 int length) throws SQLException {
1396 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1397 _updateCharacterStream(columnName, reader, length);
1398 }
1399
1400 public void _updateCharacterStream(String columnName, Reader reader,
1401 int length) {
1402 throw new NeedsMockDefinitionException();
1403 }
1404
1405
1406
1407
1408 public void updateClob(int columnIndex, Clob x) throws SQLException {
1409 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1410 _updateClob(columnIndex, x);
1411 }
1412
1413 public void _updateClob(int columnIndex, Clob x) {
1414 throw new NeedsMockDefinitionException();
1415 }
1416
1417
1418
1419
1420 public void updateClob(String columnName, Clob x) throws SQLException {
1421 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1422 _updateClob(columnName, x);
1423 }
1424
1425 public void _updateClob(String columnName, Clob x) {
1426 throw new NeedsMockDefinitionException();
1427 }
1428
1429
1430
1431
1432 public void updateDate(int columnIndex, Date x) throws SQLException {
1433 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1434 _updateDate(columnIndex, x);
1435 }
1436
1437 public void _updateDate(int columnIndex, Date x) {
1438 throw new NeedsMockDefinitionException();
1439 }
1440
1441
1442
1443
1444 public void updateDate(String columnName, Date x) throws SQLException {
1445 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1446 _updateDate(columnName, x);
1447 }
1448
1449 public void _updateDate(String columnName, Date x) {
1450 throw new NeedsMockDefinitionException();
1451 }
1452
1453
1454
1455
1456 public void updateDouble(int columnIndex, double x) throws SQLException {
1457 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1458 _updateDouble(columnIndex, x);
1459 }
1460
1461 public void _updateDouble(int columnIndex, double x) {
1462 throw new NeedsMockDefinitionException();
1463 }
1464
1465
1466
1467
1468 public void updateDouble(String columnName, double x) throws SQLException {
1469 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1470 _updateDouble(columnName, x);
1471 }
1472
1473 public void _updateDouble(String columnName, double x) {
1474 throw new NeedsMockDefinitionException();
1475 }
1476
1477
1478
1479
1480 public void updateFloat(int columnIndex, float x) throws SQLException {
1481 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1482 _updateFloat(columnIndex, x);
1483 }
1484
1485 public void _updateFloat(int columnIndex, float x) {
1486 throw new NeedsMockDefinitionException();
1487 }
1488
1489
1490
1491
1492 public void updateFloat(String columnName, float x) throws SQLException {
1493 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1494 _updateFloat(columnName, x);
1495 }
1496
1497 public void _updateFloat(String columnName, float x) {
1498 throw new NeedsMockDefinitionException();
1499 }
1500
1501
1502
1503
1504 public void updateInt(int columnIndex, int x) throws SQLException {
1505 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1506 _updateInt(columnIndex, x);
1507 }
1508
1509 public void _updateInt(int columnIndex, int x) {
1510 throw new NeedsMockDefinitionException();
1511 }
1512
1513
1514
1515
1516 public void updateInt(String columnName, int x) throws SQLException {
1517 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1518 _updateInt(columnName, x);
1519 }
1520
1521 public void _updateInt(String columnName, int x) {
1522 throw new NeedsMockDefinitionException();
1523 }
1524
1525
1526
1527
1528 public void updateLong(int columnIndex, long x) throws SQLException {
1529 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1530 _updateLong(columnIndex, x);
1531 }
1532
1533 public void _updateLong(int columnIndex, long x) {
1534 throw new NeedsMockDefinitionException();
1535 }
1536
1537
1538
1539
1540 public void updateLong(String columnName, long x) throws SQLException {
1541 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1542 _updateLong(columnName, x);
1543 }
1544
1545 public void _updateLong(String columnName, long x) {
1546 throw new NeedsMockDefinitionException();
1547 }
1548
1549
1550
1551
1552 public void updateNull(int columnIndex) throws SQLException {
1553 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1554 _updateNull(columnIndex);
1555 }
1556
1557 public void _updateNull(int columnIndex) {
1558 throw new NeedsMockDefinitionException();
1559 }
1560
1561
1562
1563
1564 public void updateNull(String columnName) throws SQLException {
1565 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1566 _updateNull(columnName);
1567 }
1568
1569 public void _updateNull(String columnName) {
1570 throw new NeedsMockDefinitionException();
1571 }
1572
1573
1574
1575
1576 public void updateObject(int columnIndex, Object x) throws SQLException {
1577 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1578 _updateObject(columnIndex, x);
1579 }
1580
1581 public void _updateObject(int columnIndex, Object x) {
1582 throw new NeedsMockDefinitionException();
1583 }
1584
1585
1586
1587
1588 public void updateObject(String columnName, Object x) throws SQLException {
1589 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1590 _updateObject(columnName, x);
1591 }
1592
1593 public void _updateObject(String columnName, Object x) {
1594 throw new NeedsMockDefinitionException();
1595 }
1596
1597
1598
1599
1600 public void updateObject(int columnIndex, Object x, int scale)
1601 throws SQLException {
1602 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1603 _updateObject(columnIndex, x, scale);
1604 }
1605
1606 public void _updateObject(int columnIndex, Object x, int scale) {
1607 throw new NeedsMockDefinitionException();
1608 }
1609
1610
1611
1612
1613 public void updateObject(String columnName, Object x, int scale)
1614 throws SQLException {
1615 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1616 _updateObject(columnName, x, scale);
1617 }
1618
1619 public void _updateObject(String columnName, Object x, int scale) {
1620 throw new NeedsMockDefinitionException();
1621 }
1622
1623
1624
1625
1626 public void updateRef(int columnIndex, Ref x) throws SQLException {
1627 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1628 _updateRef(columnIndex, x);
1629 }
1630
1631 public void _updateRef(int columnIndex, Ref x) {
1632 throw new NeedsMockDefinitionException();
1633 }
1634
1635
1636
1637
1638 public void updateRef(String columnName, Ref x) throws SQLException {
1639 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1640 _updateRef(columnName, x);
1641 }
1642
1643 public void _updateRef(String columnName, Ref x) {
1644 throw new NeedsMockDefinitionException();
1645 }
1646
1647
1648
1649
1650 public void updateRow() throws SQLException {
1651 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1652 _updateRow();
1653 }
1654
1655 public void _updateRow() {
1656 throw new NeedsMockDefinitionException();
1657 }
1658
1659
1660
1661
1662 public void updateShort(int columnIndex, short x) throws SQLException {
1663 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1664 _updateShort(columnIndex, x);
1665 }
1666
1667 public void _updateShort(int columnIndex, short x) {
1668 throw new NeedsMockDefinitionException();
1669 }
1670
1671
1672
1673
1674 public void updateShort(String columnName, short x) throws SQLException {
1675 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1676 _updateShort(columnName, x);
1677 }
1678
1679 public void _updateShort(String columnName, short x) {
1680 throw new NeedsMockDefinitionException();
1681 }
1682
1683
1684
1685
1686 public void updateString(int columnIndex, String x) throws SQLException {
1687 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1688 _updateString(columnIndex, x);
1689 }
1690
1691 public void _updateString(int columnIndex, String x) {
1692 throw new NeedsMockDefinitionException();
1693 }
1694
1695
1696
1697
1698 public void updateString(String columnName, String x) throws SQLException {
1699 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1700 _updateString(columnName, x);
1701 }
1702
1703 public void _updateString(String columnName, String x) {
1704 throw new NeedsMockDefinitionException();
1705 }
1706
1707
1708
1709
1710 public void updateTime(int columnIndex, Time x) throws SQLException {
1711 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1712 _updateTime(columnIndex, x);
1713 }
1714
1715 public void _updateTime(int columnIndex, Time x) {
1716 throw new NeedsMockDefinitionException();
1717 }
1718
1719
1720
1721
1722 public void updateTime(String columnName, Time x) throws SQLException {
1723 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1724 _updateTime(columnName, x);
1725 }
1726
1727 public void _updateTime(String columnName, Time x) {
1728 throw new NeedsMockDefinitionException();
1729 }
1730
1731
1732
1733
1734 public void updateTimestamp(int columnIndex, Timestamp x)
1735 throws SQLException {
1736 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1737 _updateTimestamp(columnIndex, x);
1738 }
1739
1740 public void _updateTimestamp(int columnIndex, Timestamp x) {
1741 throw new NeedsMockDefinitionException();
1742 }
1743
1744
1745
1746
1747 public void updateTimestamp(String columnName, Timestamp x)
1748 throws SQLException {
1749 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1750 _updateTimestamp(columnName, x);
1751 }
1752
1753 public void _updateTimestamp(String columnName, Timestamp x) {
1754 throw new NeedsMockDefinitionException();
1755 }
1756
1757
1758
1759
1760 public boolean wasNull() throws SQLException {
1761 assertThat(mockState, AnyOf.anyOf(IsNot.not(ResultSetState.CLOSE), IsNot.not(ResultSetState.AUTOCLOSE)));
1762 return _wasNull();
1763 }
1764
1765 public boolean _wasNull() {
1766 throw new NeedsMockDefinitionException();
1767 }
1768
1769 protected void autoClose() {
1770 if(mockState != ResultSetState.CLOSE){
1771 this.mockState=ResultSetState.AUTOCLOSE;
1772 }
1773 }
1774
1775 public void assertClosed() {
1776 assertThat(mockState, AnyOf.anyOf(Is.is(ResultSetState.CLOSE), Is.is(ResultSetState.AUTOCLOSE)));
1777 }
1778
1779 public void assertExplicitClose() {
1780 assertThat(mockState, Is.is(ResultSetState.CLOSE));
1781 }
1782
1783 public void setParent(MockStatement mockStatement) {
1784 this.parent = mockStatement;
1785
1786 }
1787
1788 @Override
1789 public String toString(){
1790 return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
1791 }
1792 }