Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.api / src / main / java / org / gvsig / fmap / dal / store / jdbc2 / JDBCServerExplorer.java @ 46542

History | View | Annotate | Download (4.28 KB)

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

    
26
import java.util.List;
27
import org.gvsig.fmap.dal.DataStore;
28
import org.gvsig.fmap.dal.DataStoreParameters;
29
import org.gvsig.fmap.dal.NewDataStoreParameters;
30
import org.gvsig.fmap.dal.SupportTransactions;
31
import org.gvsig.fmap.dal.exception.DataException;
32
import org.gvsig.fmap.dal.exception.RemoveException;
33
import org.gvsig.fmap.dal.feature.FeatureType;
34
import org.gvsig.fmap.dal.resource.spi.ResourceConsumer;
35
import org.gvsig.fmap.dal.store.jdbc.JDBCNewStoreParameters;
36
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
37
import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters;
38
import org.gvsig.fmap.dal.store.jdbc.exception.JDBCException;
39

    
40

    
41
public interface JDBCServerExplorer extends ResourceConsumer, org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorer, SupportTransactions  {
42
    
43
    public static final String QUERY_DONT_ADD_PRIMARY_KEY_IN_THE_ORDER = "DONT_ADD_PRIMARY_KEY_IN_THE_ORDER";
44
    
45
    public static int SHOW_TABLES_AND_VIEWS = 0;
46
    public static int SHOW_TABLES = 1;
47
    public static int SHOW_VIEWS = 2;
48

    
49
    @Override
50
    public JDBCServerExplorerParameters getParameters();
51

    
52
    @Override
53
    public String getProviderName();
54

    
55
    @Override
56
    public String getStoreName();
57

    
58
    @Override
59
    public boolean canAdd();
60

    
61
    @Override
62
    public boolean add(
63
            String providerName, 
64
            NewDataStoreParameters theParams, 
65
            boolean overwrite
66
    ) throws DataException;
67

    
68
    @Override
69
    public List<DataStoreParameters> list(int mode) throws DataException;
70

    
71
    @Override
72
    public DataStore open(DataStoreParameters params) throws DataException;
73

    
74
    public DataStore open(String tableName) throws DataException;
75
    
76
    @Override
77
    public void remove(DataStoreParameters theParams) throws RemoveException;
78

    
79
    @Override
80
    public void updateTableStatistics(String database, String schema, String table) throws JDBCException;
81
   
82
    @Override
83
    public JDBCNewStoreParameters getAddParameters() throws DataException;
84

    
85
    @Override
86
    public JDBCStoreParameters getOpenParameters() throws DataException;
87

    
88
    @Override
89
    public JDBCStoreParameters get(String name) throws DataException;
90

    
91
    @Override
92
    public List getDataStoreProviderNames();
93

    
94
    @Override
95
    public FeatureType getFeatureType(DataStoreParameters theParams) throws DataException;
96

    
97
    public void setCustomResources(String tableName, String resourcesTableName);
98
    
99
    public void setCustomResources(String tableName, String resourcesTableName, boolean readonly);
100
    
101
    /**
102
     * Provides a list of available stores in the server of a type.
103
     *
104
     * @param mode , filter store from a type: {@link #MODE_ALL},
105
     *            {@link #MODE_FEATURE}, {@link #MODE_FEATURE_GEOMETRY},
106
     *            {@link #MODE_RASTER}
107
     *
108
     * @param tablesOrViews , filter store between tables and views: {@link #SHOW_TABLES_AND_VIEWS},
109
     *            {@link #SHOW_TABLES}, {@link #SHOW_VIEWS}
110
     *
111
     * @return list of DataStoreParameters
112
     *
113
     * @throws DataException
114
     */
115
    public List<DataStoreParameters> list(int mode, int tablesOrViews) throws DataException;
116
    
117
    /**
118
     * Check if the explorer defined by this parameters reference to a database.
119
     * @return true if database exists, false if not.
120
     */
121
    public boolean exists();
122
    
123
    public String getConnectionProviderStatus();
124
}