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

History | View | Annotate | Download (4.42 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
import org.gvsig.tools.resourcesstorage.ResourcesStorage;
40

    
41

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

    
50
    @Override
51
    public JDBCServerExplorerParameters getParameters();
52

    
53
    @Override
54
    public String getProviderName();
55

    
56
    @Override
57
    public String getStoreName();
58

    
59
    @Override
60
    public boolean canAdd();
61

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

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

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

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

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

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

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

    
92
    @Override
93
    public List getDataStoreProviderNames();
94

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

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