Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.db / org.gvsig.fmap.dal.db.jdbc / src / main / java / org / gvsig / fmap / dal / store / jdbc2 / impl / JDBCServerExplorerFactory.java @ 44058

History | View | Annotate | Download (1.91 KB)

1

    
2
package org.gvsig.fmap.dal.store.jdbc2.impl;
3

    
4
import org.gvsig.fmap.dal.store.jdbc2.JDBCLibrary;
5
import org.gvsig.fmap.dal.DataServerExplorerParameters;
6
import org.gvsig.fmap.dal.exception.InitializeException;
7
import org.gvsig.fmap.dal.spi.AbstractDataServerExplorerFactory;
8
import org.gvsig.fmap.dal.spi.DataServerExplorerProviderServices;
9
import org.gvsig.fmap.dal.store.jdbc.JDBCConnectionParameters;
10
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
11
import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper;
12
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
13
import org.gvsig.fmap.dal.store.jdbc2.spi.JDBCHelperBase;
14

    
15

    
16
public class JDBCServerExplorerFactory extends AbstractDataServerExplorerFactory {
17

    
18
    private static final String NAME = JDBCLibrary.NAME;
19

    
20
    public JDBCServerExplorerFactory() {
21
        this(
22
                NAME,
23
                "JDBC generic server (2)"
24
        );
25
    }
26
    
27
    protected JDBCServerExplorerFactory(String name, String description) {
28
        super(name,description);
29
    }
30
    
31
    protected JDBCServerExplorerFactory(String name, String description, boolean hidden) {
32
        super(name,description, hidden);
33
    }
34

    
35
    @Override
36
    public JDBCServerExplorer create(
37
            DataServerExplorerParameters parameters, 
38
            DataServerExplorerProviderServices providerServices
39
        ) throws InitializeException {
40
        JDBCHelper helper = new JDBCHelperBase((JDBCConnectionParameters) parameters);
41
        JDBCServerExplorer server = helper.createServerExplorer(
42
                (JDBCServerExplorerParameters) parameters, 
43
                providerServices
44
        );
45
        return server;
46
    }
47
        
48
    @Override
49
    public JDBCServerExplorerParameters createParameters() {
50
        JDBCServerExplorerParameters params = new JDBCServerExplorerParameters(
51
                NAME + "ServerExplorerParameters",
52
                NAME 
53
        );
54
        return params;    
55
    }
56

    
57

    
58
}