svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.h2spatial / org.gvsig.h2spatial.h2gis132 / org.gvsig.h2spatial.h2gis132.provider / src / main / java / org / gvsig / fmap / dal / store / h2 / H2SpatialExplorerFactory.java @ 46414
History | View | Annotate | Download (1.41 KB)
1 | 45472 | jjdelcerro | |
---|---|---|---|
2 | package org.gvsig.fmap.dal.store.h2; |
||
3 | |||
4 | import org.gvsig.fmap.dal.DataServerExplorerParameters; |
||
5 | import org.gvsig.fmap.dal.exception.InitializeException; |
||
6 | import org.gvsig.fmap.dal.spi.DataServerExplorerProviderServices; |
||
7 | import org.gvsig.fmap.dal.store.jdbc.JDBCConnectionParameters; |
||
8 | import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters; |
||
9 | import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper; |
||
10 | import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer; |
||
11 | import org.gvsig.fmap.dal.store.jdbc2.impl.JDBCServerExplorerFactory; |
||
12 | |||
13 | |||
14 | public class H2SpatialExplorerFactory extends JDBCServerExplorerFactory { |
||
15 | |||
16 | public H2SpatialExplorerFactory() {
|
||
17 | super(
|
||
18 | H2SpatialLibrary.NAME, |
||
19 | "H2Spatial"
|
||
20 | ); |
||
21 | } |
||
22 | |||
23 | @Override
|
||
24 | public JDBCServerExplorer create(
|
||
25 | DataServerExplorerParameters parameters, |
||
26 | DataServerExplorerProviderServices providerServices |
||
27 | ) throws InitializeException {
|
||
28 | JDBCHelper helper = new H2SpatialHelper((JDBCConnectionParameters) parameters);
|
||
29 | JDBCServerExplorer server = helper.createServerExplorer( |
||
30 | (JDBCServerExplorerParameters) parameters, |
||
31 | providerServices |
||
32 | ); |
||
33 | return server;
|
||
34 | } |
||
35 | |||
36 | |||
37 | @Override
|
||
38 | public JDBCServerExplorerParameters createParameters() {
|
||
39 | JDBCServerExplorerParameters params = new H2SpatialExplorerParameters();
|
||
40 | return params;
|
||
41 | } |
||
42 | |||
43 | } |