public class JDBCServerExplorerBase extends AbstractDBServerExplorer implements JDBCServerExplorer, SupportTransactions
| Modifier and Type | Field and Description |
|---|---|
protected JDBCHelper |
helper |
LOGGERQUERY_DONT_ADD_PRIMARY_KEY_IN_THE_ORDER, SHOW_TABLES, SHOW_TABLES_AND_VIEWS, SHOW_VIEWSFILESYSTEM_SERVER_EXPLORER_NAME, MODE_ALL, MODE_FEATURE, MODE_GEOMETRY, MODE_RASTER| Constructor and Description |
|---|
JDBCServerExplorerBase(JDBCServerExplorerParameters parameters,
DataServerExplorerProviderServices services,
JDBCHelper helper) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(java.lang.String providerName,
NewDataStoreParameters theParams,
boolean overwrite)
Creates a new DataStore in this server.
|
java.lang.String |
buildKeyForCachedTables(int mode,
JDBCServerExplorerParameters params,
boolean informationTables,
int tablesOrViews) |
boolean |
canAdd()
Indicates whether this DataServerExplorer can create a new DataStore in
the server.
|
protected void |
checkIsMine(DataStoreParameters dsp) |
void |
close()
Close connection to the server
|
boolean |
closeResourceRequested(ResourceProvider resource) |
SQLBuilder |
createSQLBuilder() |
protected void |
doDispose()
Internal implementation for the
AbstractDisposable.dispose() method, to be
implemented by child classes. |
void |
dropCaches() |
java.lang.Object |
execute(java.lang.String sql) |
boolean |
exists()
Check if the explorer defined by this parameters reference to a database.
|
boolean |
exists(DataStoreParameters parameters) |
JDBCStoreParameters |
get(java.lang.String name) |
JDBCNewStoreParameters |
getAddParameters()
Return a instance of
NewDataStoreParameters to fill |
NewDataStoreParameters |
getAddParameters(java.lang.String storeName)
Given the store's name, returns its parameters for creation.
|
java.lang.String |
getConnectionProviderStatus() |
java.util.List |
getDataStoreProviderNames()
Return the list of provider names that this server allow.
|
FeatureType |
getFeatureType(DataStoreParameters theParams)
Return the
FeatureType of the store of dsp store |
protected JDBCHelper |
getHelper() |
protected ResourcesStorage |
getLocalResourcesStorage(DataStoreParameters parameters,
java.lang.String storeName) |
protected DataManagerProviderServices |
getManager() |
JDBCStoreParameters |
getOpenParameters() |
protected OperationsFactory |
getOperations() |
JDBCServerExplorerParameters |
getParameters()
Returns this DataServerExplorer parameters
|
java.lang.String |
getProviderName()
Returns the DataServerExplorer's name
|
ResourcesStorage |
getResourcesStorage() |
ResourcesStorage |
getResourcesStorage(DataStore dataStore) |
ResourcesStorage |
getResourcesStorage(DataStoreParameters parameters) |
ResourcesStorage |
getResourcesStorage(java.lang.String name) |
java.lang.String |
getStoreName()
Return the name of
DataStoreProvider returned by this
ServerExplorer |
DataTransaction |
getTransaction() |
java.util.List |
list(int mode)
Provides a list of available stores in the server of a type.
|
java.util.List |
list(int mode,
int tablesOrViews)
Provides a list of available stores in the server of a type.
|
void |
open()
Open connection to the server
|
DataStore |
open(DataStoreParameters params)
Open a store defined by
dsp |
DataStore |
open(java.lang.String tableName) |
void |
remove(DataStoreParameters theParams)
Removes a store from the server given its DataStoreParameters.
|
void |
resourceChanged(ResourceProvider resource) |
void |
setCustomResources(java.lang.String tableName,
java.lang.String resourcesTableName) |
void |
setCustomResources(java.lang.String tableName,
java.lang.String resourcesTableName,
boolean readonly) |
void |
setTransaction(DataTransaction transaction) |
void |
updateTableStatistics(java.lang.String database,
java.lang.String schema,
java.lang.String table) |
canAdd, listgetProperties, getProperty, getResourcePath, getServerExplorerProviderServices, setPropertydispose, disposeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanAdd, getResourcePath, listdisposegetProperties, getProperty, setPropertygetServerExplorerProviderServicesprotected JDBCHelper helper
public JDBCServerExplorerBase(JDBCServerExplorerParameters parameters, DataServerExplorerProviderServices services, JDBCHelper helper) throws InitializeException
InitializeExceptionpublic java.lang.String getProviderName()
DataServerExplorergetProviderName in interface DataServerExplorergetProviderName in interface JDBCServerExplorerpublic java.lang.String getStoreName()
AbstractDBServerExplorerDataStoreProvider returned by this
ServerExplorergetStoreName in interface JDBCServerExplorergetStoreName in class AbstractDBServerExplorerprotected DataManagerProviderServices getManager()
public JDBCServerExplorerParameters getParameters()
DataServerExplorergetParameters in interface DataServerExplorergetParameters in class AbstractDataServerExplorerpublic boolean closeResourceRequested(ResourceProvider resource)
closeResourceRequested in interface ResourceConsumerpublic void resourceChanged(ResourceProvider resource)
resourceChanged in interface ResourceConsumerprotected JDBCHelper getHelper()
protected OperationsFactory getOperations()
public DataStore open(DataStoreParameters params) throws DataException
DataServerExplorer_v2dspopen in interface DataServerExplorer_v2open in interface DBServerExploreropen in interface JDBCServerExploreropen in class AbstractDBServerExplorerDataExceptionpublic DataStore open(java.lang.String tableName) throws DataException
DataExceptionpublic java.util.List list(int mode)
throws DataException
DataServerExplorerlist in interface DataServerExplorerlist in interface JDBCServerExplorermode - , filter store from a type: DataServerExplorer.MODE_ALL,
DataServerExplorer.MODE_FEATURE, #MODE_FEATURE_GEOMETRY,
DataServerExplorer.MODE_RASTERDataExceptionpublic java.util.List list(int mode,
int tablesOrViews)
throws DataException
JDBCServerExplorermode - , filter store from a type: DataServerExplorer.MODE_ALL,
DataServerExplorer.MODE_FEATURE, #MODE_FEATURE_GEOMETRY,
DataServerExplorer.MODE_RASTERtablesOrViews - , filter store between tables and views: JDBCServerExplorer.SHOW_TABLES_AND_VIEWS,
JDBCServerExplorer.SHOW_TABLES, JDBCServerExplorer.SHOW_VIEWSDataExceptionpublic java.lang.String buildKeyForCachedTables(int mode,
JDBCServerExplorerParameters params,
boolean informationTables,
int tablesOrViews)
public void remove(DataStoreParameters theParams) throws RemoveException
DataServerExplorerremove in interface DataServerExplorerremove in interface JDBCServerExplorerRemoveExceptionpublic JDBCStoreParameters getOpenParameters() throws DataException
getOpenParameters in interface JDBCServerExplorerDataExceptionpublic NewDataStoreParameters getAddParameters(java.lang.String storeName) throws DataException
DataServerExplorergetAddParameters in interface DataServerExplorergetAddParameters in class AbstractDBServerExplorerDataExceptionpublic JDBCNewStoreParameters getAddParameters() throws DataException
DBServerExplorerNewDataStoreParameters to fillgetAddParameters in interface DBServerExplorergetAddParameters in interface JDBCServerExplorerDataExceptionprotected void checkIsMine(DataStoreParameters dsp)
public void open()
throws OpenException
DataServerExplorer_v2open in interface DataServerExplorer_v2open in interface DBServerExploreropen in class AbstractDataServerExplorerOpenExceptionpublic void close()
throws CloseException
DataServerExplorer_v2close in interface DataServerExplorer_v2close in interface DBServerExplorerclose in class AbstractDataServerExplorerCloseExceptionprotected void doDispose()
throws BaseException
AbstractDisposableAbstractDisposable.dispose() method, to be
implemented by child classes.doDispose in class AbstractDataServerExplorerBaseExceptionAbstractDisposable.dispose()public boolean canAdd()
DataServerExplorercanAdd in interface DataServerExplorercanAdd in interface JDBCServerExplorerpublic FeatureType getFeatureType(DataStoreParameters theParams) throws DataException
DBServerExplorerFeatureType of the store of dsp storegetFeatureType in interface DBServerExplorergetFeatureType in interface JDBCServerExplorerDataExceptionpublic boolean add(java.lang.String providerName,
NewDataStoreParameters theParams,
boolean overwrite)
throws DataException
DataServerExploreradd in interface DataServerExploreradd in interface JDBCServerExplorertheParams - , an instance of DataStoreParameters from
DataServerExplorer.getAddParameters(String) that describes the
new DataStore.overwrite - if the store already existsDataExceptionpublic void dropCaches()
public java.util.List getDataStoreProviderNames()
DataServerExplorergetDataStoreProviderNames in interface DataServerExplorergetDataStoreProviderNames in interface JDBCServerExplorerpublic void updateTableStatistics(java.lang.String database,
java.lang.String schema,
java.lang.String table)
throws JDBCExecuteSQLException
updateTableStatistics in interface JDBCServerExplorerJDBCExecuteSQLExceptionpublic java.lang.Object execute(java.lang.String sql)
execute in interface JDBCServerExplorerpublic JDBCStoreParameters get(java.lang.String name) throws DataException
get in interface DataServerExplorerget in interface JDBCServerExplorerget in class AbstractDataServerExplorerDataExceptionpublic SQLBuilder createSQLBuilder()
createSQLBuilder in interface DataServerExplorer_v2createSQLBuilder in class AbstractDataServerExplorerprotected ResourcesStorage getLocalResourcesStorage(DataStoreParameters parameters, java.lang.String storeName)
public ResourcesStorage getResourcesStorage(java.lang.String name)
public ResourcesStorage getResourcesStorage()
getResourcesStorage in interface DataServerExplorergetResourcesStorage in class AbstractDataServerExplorerpublic ResourcesStorage getResourcesStorage(DataStoreParameters parameters)
getResourcesStorage in interface DataServerExplorergetResourcesStorage in class AbstractDataServerExplorerpublic ResourcesStorage getResourcesStorage(DataStore dataStore)
getResourcesStorage in interface DataServerExplorergetResourcesStorage in class AbstractDataServerExplorerpublic boolean exists(DataStoreParameters parameters) throws DataException
exists in interface DataServerExplorerexists in class AbstractDataServerExplorerDataExceptionpublic void setCustomResources(java.lang.String tableName,
java.lang.String resourcesTableName)
public void setCustomResources(java.lang.String tableName,
java.lang.String resourcesTableName,
boolean readonly)
public boolean exists()
JDBCServerExplorerpublic java.lang.String getConnectionProviderStatus()
public void setTransaction(DataTransaction transaction)
setTransaction in interface SupportTransactionspublic DataTransaction getTransaction()
getTransaction in interface SupportTransactions