Revision 23842 branches/v2_0_0_prep/libraries/libFMap_dataDB/src-test/org/gvsig/fmap/data/feature/db/jdbc/h2/H2Test.java

View differences:

H2Test.java
17 17
import org.gvsig.fmap.data.feature.AbstractFeature;
18 18
import org.gvsig.fmap.data.feature.Feature;
19 19
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor;
20
import org.gvsig.fmap.data.feature.FeatureCollection;
20
import org.gvsig.fmap.data.feature.FeatureSet;
21 21
import org.gvsig.fmap.data.feature.FeatureStore;
22 22
import org.gvsig.fmap.data.feature.FeatureExplorer;
23 23
import org.gvsig.fmap.data.feature.FeatureType;
......
166 166
//		}
167 167

  
168 168
		FeatureType ft= fs.getDefaultFeatureType();
169
		FeatureCollection featureCollection=null;
169
		FeatureSet featureCollection=null;
170 170
		try {
171
			featureCollection = (FeatureCollection)fs.getDataCollection();
171
			featureCollection = (FeatureSet)fs.getDataSet();
172 172
		} catch (ReadException e2) {
173 173
			// TODO Auto-generated catch block
174 174
			e2.printStackTrace();
......
247 247
//		}
248 248

  
249 249

  
250
		FeatureCollection fc =null;
250
		FeatureSet fc =null;
251 251

  
252 252
		try {
253
			fc = (FeatureCollection)fs.getDataCollection();
253
			fc = (FeatureSet)fs.getDataSet();
254 254
		} catch (ReadException e1) {
255 255
			e1.printStackTrace();
256 256
			fail();
......
271 271

  
272 272
		exc=null;
273 273
		try {
274
			fc = (FeatureCollection)fs.getDataCollection(fs.getDefaultFeatureType(),"NOMBRE like 'B%'",null);
274
			fc = (FeatureSet)fs.getDataCollection(fs.getDefaultFeatureType(),"NOMBRE like 'B%'",null);
275 275
		} catch (ReadException e1) {
276 276
			exc=e1;
277 277
		}
......
279 279

  
280 280
		exc=null;
281 281
		try {
282
			fc = (FeatureCollection)fs.getDataCollection(fs.getDefaultFeatureType(),null,"NOMBRE");
282
			fc = (FeatureSet)fs.getDataCollection(fs.getDefaultFeatureType(),null,"NOMBRE");
283 283
		} catch (ReadException e1) {
284 284
			exc=e1;
285 285
		}
......
376 376
//		}
377 377

  
378 378
		Iterator it;
379
		FeatureCollection fc =null;
379
		FeatureSet fc =null;
380 380
		Comparable v1,v2;
381 381
		Feature feature=null,pfeature=null;
382 382
		long count;
383 383

  
384 384

  
385 385
		try {
386
			fc = (FeatureCollection)fs.getDataCollection();
386
			fc = (FeatureSet)fs.getDataSet();
387 387
		} catch (ReadException e1) {
388 388
			e1.printStackTrace();
389 389
			fail();
......
402 402
		fc.dispose();
403 403

  
404 404
		try {
405
			fc = (FeatureCollection) fs.getDataCollection(
405
			fc = (FeatureSet) fs.getDataCollection(
406 406
					new String[] { "NOMBRE" }, "lower(NOMBRE) like 'b%'", null);
407 407
		} catch (ReadException e1) {
408 408
			e1.printStackTrace();
......
426 426

  
427 427

  
428 428
		try {
429
			fc = (FeatureCollection)fs.getDataCollection(fs.getDefaultFeatureType(),null,"NOMBRE ASC");
429
			fc = (FeatureSet)fs.getDataCollection(fs.getDefaultFeatureType(),null,"NOMBRE ASC");
430 430
		} catch (ReadException e1) {
431 431
			e1.printStackTrace();
432 432
			fail();
......
450 450

  
451 451

  
452 452
		try {
453
			fc = (FeatureCollection)fs.getDataCollection(fs.getDefaultFeatureType(),null,"NOMBRE DESC");
453
			fc = (FeatureSet)fs.getDataCollection(fs.getDefaultFeatureType(),null,"NOMBRE DESC");
454 454
		} catch (ReadException e1) {
455 455
			e1.printStackTrace();
456 456
			fail();
......
476 476

  
477 477

  
478 478
		try {
479
			fc = (FeatureCollection)fs.getDataCollection(fs.getDefaultFeatureType(),"lower(NOMBRE) like 'b%'","NOMBRE");
479
			fc = (FeatureSet)fs.getDataCollection(fs.getDefaultFeatureType(),"lower(NOMBRE) like 'b%'","NOMBRE");
480 480
		} catch (ReadException e1) {
481 481
			e1.printStackTrace();
482 482
			fail();
......
505 505

  
506 506

  
507 507
		try {
508
			fc = (FeatureCollection)fs.getDataCollection(fs.getDefaultFeatureType(),null,"Tipo,lower(NOMBRE) Desc");
508
			fc = (FeatureSet)fs.getDataCollection(fs.getDefaultFeatureType(),null,"Tipo,lower(NOMBRE) Desc");
509 509
		} catch (ReadException e1) {
510 510
			e1.printStackTrace();
511 511
			fail();
......
550 550
		}
551 551

  
552 552
		try {
553
			fc = (FeatureCollection)fs.getDataCollection();
553
			fc = (FeatureSet)fs.getDataSet();
554 554
		} catch (ReadException e1) {
555 555
			e1.printStackTrace();
556 556
			fail();
......
560 560
		fc.dispose();
561 561

  
562 562
		try {
563
			fc = (FeatureCollection)fs.getDataCollection(new String[] {"NOMBRE"},"lower(NOMBRE) like 'b%'",null);
563
			fc = (FeatureSet)fs.getDataCollection(new String[] {"NOMBRE"},"lower(NOMBRE) like 'b%'",null);
564 564
		} catch (ReadException e1) {
565 565
			e1.printStackTrace();
566 566
			fail();
......
581 581

  
582 582

  
583 583
		try {
584
			fc = (FeatureCollection)fs.getDataCollection(fs.getDefaultFeatureType(),null,"NOMBRE ASC");
584
			fc = (FeatureSet)fs.getDataCollection(fs.getDefaultFeatureType(),null,"NOMBRE ASC");
585 585
		} catch (ReadException e1) {
586 586
			e1.printStackTrace();
587 587
			fail();
......
604 604

  
605 605

  
606 606
		try {
607
			fc = (FeatureCollection)fs.getDataCollection(fs.getDefaultFeatureType(),null,"NOMBRE DESC");
607
			fc = (FeatureSet)fs.getDataCollection(fs.getDefaultFeatureType(),null,"NOMBRE DESC");
608 608
		} catch (ReadException e1) {
609 609
			e1.printStackTrace();
610 610
			fail();
......
628 628

  
629 629

  
630 630
		try {
631
			fc = (FeatureCollection)fs.getDataCollection(fs.getDefaultFeatureType(),"lower(NOMBRE) like 'b%'","NOMBRE");
631
			fc = (FeatureSet)fs.getDataCollection(fs.getDefaultFeatureType(),"lower(NOMBRE) like 'b%'","NOMBRE");
632 632
		} catch (ReadException e1) {
633 633
			e1.printStackTrace();
634 634
			fail();
......
657 657

  
658 658

  
659 659
		try {
660
			fc = (FeatureCollection)fs.getDataCollection(fs.getDefaultFeatureType(),null,"Tipo,lower(NOMBRE) Desc");
660
			fc = (FeatureSet)fs.getDataCollection(fs.getDefaultFeatureType(),null,"Tipo,lower(NOMBRE) Desc");
661 661
		} catch (ReadException e1) {
662 662
			e1.printStackTrace();
663 663
			fail();
......
707 707

  
708 708

  
709 709
		try {
710
			fc = (FeatureCollection)fs.getDataCollection(fs.getDefaultFeatureType(),null,"lower(NOMBRE) Desc");
710
			fc = (FeatureSet)fs.getDataCollection(fs.getDefaultFeatureType(),null,"lower(NOMBRE) Desc");
711 711
		} catch (ReadException e1) {
712 712
			e1.printStackTrace();
713 713
			fail();
......
739 739
		}
740 740

  
741 741
		try {
742
			fc = (FeatureCollection) fs.getDataCollection(fs
742
			fc = (FeatureSet) fs.getDataCollection(fs
743 743
					.getDefaultFeatureType(), "NOMBRE like '%__KK__'", null);
744 744
		} catch (ReadException e1) {
745 745
			e1.printStackTrace();
......
757 757
		fc.dispose();
758 758

  
759 759
		try {
760
			fc = (FeatureCollection)fs.getDataCollection(fs.getDefaultFeatureType(),"lower(NOMBRE) = 'burjasot'",null);
760
			fc = (FeatureSet)fs.getDataCollection(fs.getDefaultFeatureType(),"lower(NOMBRE) = 'burjasot'",null);
761 761
		} catch (ReadException e1) {
762 762
			e1.printStackTrace();
763 763
			fail();
......
825 825
		}
826 826

  
827 827
		try {
828
			fc = (FeatureCollection)fs.getDataCollection(fs.getDefaultFeatureType(),"NOMBRE like '%__KK__'",null);
828
			fc = (FeatureSet)fs.getDataCollection(fs.getDefaultFeatureType(),"NOMBRE like '%__KK__'",null);
829 829
		} catch (ReadException e1) {
830 830
			e1.printStackTrace();
831 831
			fail();
......
851 851

  
852 852

  
853 853
		try {
854
			fc = (FeatureCollection)fs.getDataCollection(fs.getDefaultFeatureType(),"NOMBRE like '%__KK__'",null);
854
			fc = (FeatureSet)fs.getDataCollection(fs.getDefaultFeatureType(),"NOMBRE like '%__KK__'",null);
855 855
		} catch (ReadException e1) {
856 856
			e1.printStackTrace();
857 857
			fail();
......
874 874
		fc.dispose();
875 875

  
876 876
		try {
877
			fc = (FeatureCollection) fs.getDataCollection(fs
877
			fc = (FeatureSet) fs.getDataCollection(fs
878 878
					.getDefaultFeatureType(), "NOMBRE like '%__KK__'", null);
879 879
		} catch (ReadException e1) {
880 880
			e1.printStackTrace();
......
902 902
		}
903 903

  
904 904
		try {
905
			fc = (FeatureCollection)fs.getDataCollection();
905
			fc = (FeatureSet)fs.getDataSet();
906 906
		} catch (ReadException e1) {
907 907
			e1.printStackTrace();
908 908
			fail();
......
920 920
//		}
921 921

  
922 922
		try {
923
			fc = (FeatureCollection) fs.getDataCollection(fs
923
			fc = (FeatureSet) fs.getDataCollection(fs
924 924
					.getDefaultFeatureType(), "NOMBRE = 'NOEXISTE'", null);
925 925
		} catch (ReadException e1) {
926 926
			e1.printStackTrace();

Also available in: Unified diff