Package org.gvsig.fmap.dal.store.jdbc2
Interface JDBCServerExplorer
- All Superinterfaces:
DataFactoryUnit,DataServerExplorer,DataServerExplorer_v2,org.gvsig.tools.dispose.Disposable,JDBCServerExplorer,org.gvsig.tools.util.PropertiesSupport,ResourceConsumer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intstatic final intstatic final intFields inherited from interface org.gvsig.fmap.dal.DataServerExplorer
FILESYSTEM_SERVER_EXPLORER_NAME, MODE_ALL, MODE_FEATURE, MODE_GEOMETRY, MODE_RASTER -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(String providerName, NewDataStoreParameters theParams, boolean overwrite) Creates a new DataStore in this server.booleancanAdd()Indicates whether this DataServerExplorer can create a new DataStore in the server.voidbooleanexists()Check if the explorer defined by this parameters reference to a database.getCreateTableSQLs(String databaseName, String schemaName, String tableName, FeatureType type) Return the list of provider names that this server allow.getFeatureType(DataStoreParameters theParams) Returns this DataServerExplorer parametersReturns the DataServerExplorer's nameorg.gvsig.tools.resourcesstorage.ResourcesStoragegetResourcesStorage(String name) list(int mode) Provides a list of available stores in the server of a type.list(int mode, int tablesOrViews) Provides a list of available stores in the server of a type.open(DataStoreParameters params) Open a store defined bydspvoidremove(DataStoreParameters theParams) Removes a store from the server given its DataStoreParameters.voidsetCustomResources(String tableName, String resourcesTableName) voidsetCustomResources(String tableName, String resourcesTableName, boolean readonly) voidupdateTableStatistics(String database, String schema, String table) Methods inherited from interface org.gvsig.fmap.dal.DataServerExplorer
canAdd, exists, getAddParameters, getResourcePath, getResourcesStorage, getResourcesStorage, getResourcesStorage, listMethods inherited from interface org.gvsig.fmap.dal.DataServerExplorer_v2
close, createSQLBuilder, openMethods inherited from interface org.gvsig.tools.dispose.Disposable
disposeMethods inherited from interface org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorer
executeMethods inherited from interface org.gvsig.tools.util.PropertiesSupport
getProperties, getProperty, setPropertyMethods inherited from interface org.gvsig.fmap.dal.resource.spi.ResourceConsumer
closeResourceRequested, resourceChanged
-
Field Details
-
QUERY_DONT_ADD_PRIMARY_KEY_IN_THE_ORDER
- See Also:
-
SHOW_TABLES_AND_VIEWS
static final int SHOW_TABLES_AND_VIEWS- See Also:
-
SHOW_TABLES
static final int SHOW_TABLES- See Also:
-
SHOW_VIEWS
static final int SHOW_VIEWS- See Also:
-
-
Method Details
-
getParameters
JDBCServerExplorerParameters getParameters()Description copied from interface:DataServerExplorerReturns this DataServerExplorer parameters- Specified by:
getParametersin interfaceDataServerExplorer- Returns:
- an instance of DataServerExplorerParameters containing this DataServerExplorer parameters.
-
getProviderName
String getProviderName()Description copied from interface:DataServerExplorerReturns the DataServerExplorer's name- Specified by:
getProviderNamein interfaceDataServerExplorer- Specified by:
getProviderNamein interfaceJDBCServerExplorer- Returns:
- String containing this DataServerExplorer's name
-
getStoreName
String getStoreName()- Specified by:
getStoreNamein interfaceJDBCServerExplorer
-
canAdd
boolean canAdd()Description copied from interface:DataServerExplorerIndicates whether this DataServerExplorer can create a new DataStore in the server.- Specified by:
canAddin interfaceDataServerExplorer- Specified by:
canAddin interfaceJDBCServerExplorer- Returns:
- true if this DataServerExplorer can be created or false otherwise.
-
add
boolean add(String providerName, NewDataStoreParameters theParams, boolean overwrite) throws DataException Description copied from interface:DataServerExplorerCreates a new DataStore in this server.- Specified by:
addin interfaceDataServerExplorer- Specified by:
addin interfaceJDBCServerExplorer- Parameters:
providerName-theParams- , an instance of DataStoreParameters fromDataServerExplorer.getAddParameters(String)that describes the new DataStore.overwrite- if the store already exists- Returns:
- true if the DataStoreParameters were successfully added, false otherwise.
- Throws:
DataException
-
list
Description copied from interface:DataServerExplorerProvides a list of available stores in the server of a type.- Specified by:
listin interfaceDataServerExplorer- Specified by:
listin interfaceJDBCServerExplorer- Parameters:
mode- , filter store from a type:DataServerExplorer.MODE_ALL,DataServerExplorer.MODE_FEATURE,,invalid reference
#MODE_FEATURE_GEOMETRYDataServerExplorer.MODE_RASTER- Returns:
- list of DataStoreParameters
- Throws:
DataException
-
open
Description copied from interface:DataServerExplorer_v2Open a store defined bydsp- Specified by:
openin interfaceDataServerExplorer_v2- Specified by:
openin interfaceJDBCServerExplorer- Parameters:
params-- Returns:
- Throws:
DataException
-
open
- Throws:
DataException
-
remove
Description copied from interface:DataServerExplorerRemoves a store from the server given its DataStoreParameters. If the store is a file then this method deletes the file, if it is a table in a database then this method drops the table, and so on.- Specified by:
removein interfaceDataServerExplorer- Specified by:
removein interfaceJDBCServerExplorer- Parameters:
theParams-- Throws:
RemoveException
-
updateTableStatistics
- Specified by:
updateTableStatisticsin interfaceJDBCServerExplorer- Throws:
JDBCException
-
getAddParameters
- Specified by:
getAddParametersin interfaceJDBCServerExplorer- Throws:
DataException
-
getOpenParameters
- Specified by:
getOpenParametersin interfaceJDBCServerExplorer- Throws:
DataException
-
get
- Specified by:
getin interfaceDataServerExplorer- Specified by:
getin interfaceJDBCServerExplorer- Throws:
DataException
-
getDataStoreProviderNames
List getDataStoreProviderNames()Description copied from interface:DataServerExplorerReturn the list of provider names that this server allow.- Specified by:
getDataStoreProviderNamesin interfaceDataServerExplorer- Specified by:
getDataStoreProviderNamesin interfaceJDBCServerExplorer- Returns:
- List of provider names
-
getFeatureType
- Specified by:
getFeatureTypein interfaceJDBCServerExplorer- Throws:
DataException
-
setCustomResources
-
setCustomResources
-
list
Provides a list of available stores in the server of a type.- Parameters:
mode- , filter store from a type:DataServerExplorer.MODE_ALL,DataServerExplorer.MODE_FEATURE,,invalid reference
#MODE_FEATURE_GEOMETRYDataServerExplorer.MODE_RASTERtablesOrViews- , filter store between tables and views:SHOW_TABLES_AND_VIEWS,SHOW_TABLES,SHOW_VIEWS- Returns:
- list of DataStoreParameters
- Throws:
DataException
-
exists
boolean exists()Check if the explorer defined by this parameters reference to a database.- Returns:
- true if database exists, false if not.
-
getConnectionProviderStatus
String getConnectionProviderStatus() -
getResourcesStorage
-
dropCaches
void dropCaches() -
getCreateTableSQLs
List<String> getCreateTableSQLs(String databaseName, String schemaName, String tableName, FeatureType type) throws DataException - Throws:
DataException
-