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 / JDBCStoreProviderFactory.java @ 44058

History | View | Annotate | Download (3.02 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or modify it under
7
 * the terms of the GNU General Public License as published by the Free Software
8
 * Foundation; either version 3 of the License, or (at your option) any later
9
 * version.
10
 *
11
 * This program is distributed in the hope that it will be useful, but WITHOUT
12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14
 * details.
15
 *
16
 * You should have received a copy of the GNU General Public License along with
17
 * this program; if not, write to the Free Software Foundation, Inc., 51
18
 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
 *
20
 * For any additional information, do not hesitate to contact us at info AT
21
 * gvsig.com, or visit our website www.gvsig.com.
22
 */
23
package org.gvsig.fmap.dal.store.jdbc2.impl;
24

    
25
import org.gvsig.fmap.dal.store.jdbc2.JDBCLibrary;
26

    
27
import org.gvsig.fmap.dal.DataParameters;
28
import org.gvsig.fmap.dal.exception.InitializeException;
29
import org.gvsig.fmap.dal.feature.spi.AbstractFeatureStoreProviderFactory;
30
import org.gvsig.fmap.dal.spi.DataStoreProviderServices;
31
import org.gvsig.fmap.dal.store.jdbc.JDBCConnectionParameters;
32
import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters;
33
import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper;
34
import org.gvsig.fmap.dal.store.jdbc2.JDBCStoreProvider;
35
import org.gvsig.fmap.dal.store.jdbc2.spi.JDBCHelperBase;
36

    
37
public class JDBCStoreProviderFactory 
38
    extends AbstractFeatureStoreProviderFactory 
39
    {
40

    
41
    private static final String NAME = JDBCLibrary.NAME;
42
    
43
    public JDBCStoreProviderFactory() {
44
        this(
45
                NAME, 
46
                "JDBC generic store (2)"
47
        );
48
    }
49
    
50
    @Override
51
    public int hasTabularSupport() {
52
        return YES;
53
    }    
54
    
55
    protected JDBCStoreProviderFactory(String name, String description) {
56
        super(name, description);
57
    }
58
    
59
    protected JDBCStoreProviderFactory(String name, String description, boolean hidden) {
60
        super(name, description, hidden);
61
    }
62

    
63
    @Override
64
    public JDBCStoreProvider createProvider(
65
            DataParameters parameters,
66
            DataStoreProviderServices providerServices
67
    ) throws InitializeException {
68
        JDBCHelper helper = new JDBCHelperBase((JDBCConnectionParameters) parameters);
69
        JDBCStoreProvider provider = helper.createProvider(
70
                (JDBCStoreParameters) parameters, 
71
                providerServices
72
        );
73
        return provider;
74
    }
75
    
76
    @Override
77
    public JDBCStoreParameters createParameters() {
78
        JDBCStoreParameters params = new JDBCStoreParameters(
79
                NAME + "StoreParameters",
80
                NAME 
81
        );
82
        return params;
83
    }
84

    
85
    @Override
86
    public int isOptimalRecoverFeaturesByReference() {
87
        return NO;
88
    }
89

    
90
    public int useLocalIndexesCanImprovePerformance() {
91
        return NO;
92
    }
93
    
94
}