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 @ 46391
History | View | Annotate | Download (4.34 KB)
1 | 45065 | jjdelcerro | /**
|
---|---|---|---|
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 | 43020 | jjdelcerro | 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 | 46315 | jjdelcerro | import org.gvsig.fmap.dal.SupportTransactions; |
31 | 43020 | jjdelcerro | 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.JDBCExecuteSQLException; |
||
39 | 46315 | jjdelcerro | import org.omg.IOP.TransactionService; |
40 | 43020 | jjdelcerro | |
41 | |||
42 | 46315 | jjdelcerro | public interface JDBCServerExplorer extends ResourceConsumer, org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorer, SupportTransactions { |
43 | 45627 | fdiaz | |
44 | 46324 | jjdelcerro | public static final String QUERY_DONT_ADD_PRIMARY_KEY_IN_THE_ORDER = "DONT_ADD_PRIMARY_KEY_IN_THE_ORDER"; |
45 | |||
46 | 45627 | fdiaz | public static int SHOW_TABLES_AND_VIEWS = 0; |
47 | public static int SHOW_TABLES = 1; |
||
48 | public static int SHOW_VIEWS = 2; |
||
49 | 43020 | jjdelcerro | |
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 | 44297 | jjdelcerro | public List<DataStoreParameters> list(int mode) throws DataException; |
71 | 43020 | jjdelcerro | |
72 | @Override
|
||
73 | public DataStore open(DataStoreParameters params) throws DataException; |
||
74 | |||
75 | 46208 | jjdelcerro | public DataStore open(String tableName) throws DataException; |
76 | |||
77 | 43020 | jjdelcerro | @Override
|
78 | public void remove(DataStoreParameters theParams) throws RemoveException; |
||
79 | |||
80 | @Override
|
||
81 | public void updateTableStatistics(String database, String schema, String table) throws JDBCExecuteSQLException; |
||
82 | |||
83 | @Override
|
||
84 | public JDBCNewStoreParameters getAddParameters() throws DataException; |
||
85 | |||
86 | @Override
|
||
87 | public JDBCStoreParameters getOpenParameters() throws DataException; |
||
88 | |||
89 | @Override
|
||
90 | 44297 | jjdelcerro | public JDBCStoreParameters get(String name) throws DataException; |
91 | 43020 | jjdelcerro | |
92 | @Override
|
||
93 | public List getDataStoreProviderNames(); |
||
94 | |||
95 | @Override
|
||
96 | public FeatureType getFeatureType(DataStoreParameters theParams) throws DataException; |
||
97 | 45578 | jjdelcerro | |
98 | public void setCustomResources(String tableName, String resourcesTableName); |
||
99 | 45627 | fdiaz | |
100 | 45697 | jjdelcerro | public void setCustomResources(String tableName, String resourcesTableName, boolean readonly); |
101 | |||
102 | 45627 | fdiaz | /**
|
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 | 45867 | jjdelcerro | /**
|
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 | 46120 | jjdelcerro | |
124 | public String getConnectionProviderStatus(); |
||
125 | 43020 | jjdelcerro | } |