| A DataStoreFactory that produces any
org.geotools.data.sql.SqlDataStore , whose
only purpose is to simplify the process of defining in-process views by
specifying them as plain SQL SELECT statements in the Map of parameters.
The only mandatory parameter to use this factory is "wrapper.type" , whose
value must be the fixed literal "sql" . Though a bunch of other parameters
will be needed to actually find the surrogate datastore, those parameters are
dependent on the parameters expected by the surrogate datastore factory.
To prevent parameter name clashes and the surrogate being found prior to this
factory in the lookup process, all surrogate datastre's parameters must be
prepended by the literal "surrogate." , as in the following example:
wrapper.type=SQL
surrogate.property1=...
surrogate.property2=...
surrogate.property3=...
surrogate.property4=...
sqlView.1.typeName = ViewType1
sqlView.1.sqlQuery = select gid, the_geom, table2.someField \
from table1, table2 \
where table1.gid = table2.table1_id
sqlView.2.typeName = ViewType2
sqlView.2.sqlQuery = select ...
As noted above, apart from the surrogate parameters you'll have to specify
which SQL queries to use as FeatureType "views". The process is quite simple:
prepend "sqlView.N." to "typeName" and "sqlQuery"
for each view you want to define.
author: Gabriel Roldan, Axios Engineering version: $id$ since: 2.3.x |