VirtualTable vt = new VirtualTable("riverReduced",
"select a, b, c * %mulparam% \n from table \n where x > 1 %andparam%");
vt.addGeometryMetadatata("geom", LineString.class, 4326);
vt.setPrimaryKeyColumns(Arrays.asList("a", "b"));
vt.addParameter(new VirtualTableParameter("mulparam", "1", new RegexpValidator("\\d+")));
vt.addParameter(new VirtualTableParameter("andparam", null));
FeatureTypeInfo ft = cFactory.createFeatureType();
ft.setStore( ds );
ft.setNamespace( ns );