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 @ 46120

History | View | Annotate | Download (4.05 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
    @Override
72
    public void remove(DataStoreParameters theParams) throws RemoveException;
73

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

    
80
    @Override
81
    public JDBCStoreParameters getOpenParameters() throws DataException;
82

    
83
    @Override
84
    public JDBCStoreParameters get(String name) throws DataException;
85

    
86
    @Override
87
    public List getDataStoreProviderNames();
88

    
89
    @Override
90
    public FeatureType getFeatureType(DataStoreParameters theParams) throws DataException;
91

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