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 / JDBCServerExplorer.java @ 46208

History | View | Annotate | Download (4.12 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.exception.DataException;
31
import org.gvsig.fmap.dal.exception.RemoveException;
32
import org.gvsig.fmap.dal.feature.FeatureType;
33
import org.gvsig.fmap.dal.resource.spi.ResourceConsumer;
34
import org.gvsig.fmap.dal.store.jdbc.JDBCNewStoreParameters;
35
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
36
import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters;
37
import org.gvsig.fmap.dal.store.jdbc.exception.JDBCExecuteSQLException;
38

    
39

    
40
public interface JDBCServerExplorer extends ResourceConsumer, org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorer  {
41
    
42
    public static int SHOW_TABLES_AND_VIEWS = 0;
43
    public static int SHOW_TABLES = 1;
44
    public static int SHOW_VIEWS = 2;
45

    
46
    @Override
47
    public JDBCServerExplorerParameters getParameters();
48

    
49
    @Override
50
    public String getProviderName();
51

    
52
    @Override
53
    public String getStoreName();
54

    
55
    @Override
56
    public boolean canAdd();
57

    
58
    @Override
59
    public boolean add(
60
            String providerName, 
61
            NewDataStoreParameters theParams, 
62
            boolean overwrite
63
    ) throws DataException;
64

    
65
    @Override
66
    public List<DataStoreParameters> list(int mode) throws DataException;
67

    
68
    @Override
69
    public DataStore open(DataStoreParameters params) throws DataException;
70

    
71
    public DataStore open(String tableName) throws DataException;
72
    
73
    @Override
74
    public void remove(DataStoreParameters theParams) throws RemoveException;
75

    
76
    @Override
77
    public void updateTableStatistics(String database, String schema, String table) throws JDBCExecuteSQLException;
78
   
79
    @Override
80
    public JDBCNewStoreParameters getAddParameters() throws DataException;
81

    
82
    @Override
83
    public JDBCStoreParameters getOpenParameters() throws DataException;
84

    
85
    @Override
86
    public JDBCStoreParameters get(String name) throws DataException;
87

    
88
    @Override
89
    public List getDataStoreProviderNames();
90

    
91
    @Override
92
    public FeatureType getFeatureType(DataStoreParameters theParams) throws DataException;
93

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