public class JDBCServerExplorerBase extends AbstractDBServerExplorer implements JDBCHelperUser, JDBCServerExplorer
Modifier and Type | Field and Description |
---|---|
protected JDBCHelper |
helper |
static String |
NAME |
MODE_ALL, MODE_FEATURE, MODE_GEOMETRY, MODE_RASTER
Constructor and Description |
---|
JDBCServerExplorerBase(JDBCServerExplorerParameters parameters,
DataServerExplorerProviderServices services) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(String providerName,
NewDataStoreParameters ndsp,
boolean overwrite)
Creates a new DataStore in this server.
|
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
|
void |
closeDone()
Called when the resource was close
|
boolean |
closeResourceRequested(ResourceProvider resource) |
protected boolean |
compare(Object str1,
Object str2) |
protected JDBCHelper |
createHelper() |
protected JDBCStoreParameters |
createStoreParams() |
protected void |
doDispose()
Internal implementation for the
AbstractDisposable.dispose() method, to be
implemented by child classes. |
void |
execute(String sql) |
DataStoreParameters |
get(String name) |
NewDataStoreParameters |
getAddParameters()
Return a instance of
NewDataStoreParameters to fill |
List |
getDataStoreProviderNames()
Return the list of provider names that this server allow.
|
FeatureType |
getFeatureType(DataStoreParameters dsp)
Return the
FeatureType of the store of dsp store |
protected JDBCHelper |
getHelper() |
protected JDBCServerExplorerParameters |
getJDBCParameters() |
protected DataManagerProviderServices |
getManager() |
DataStoreParameters |
getOpenParameters() |
String |
getProviderName()
Get the user name
|
String |
getStoreName()
Return the name of
DataStoreProvider returned by this
ServerExplorer |
boolean |
hasGeometrySupport() |
List |
list()
Provides a list of available stores in the server.
|
List |
list(boolean showInformationDBTables) |
List |
list(int mode)
Provides a list of available stores in the server of a type.
|
List |
list(int mode,
boolean showInformationDBTables) |
void |
open()
Open connection to the server
|
DataStore |
open(DataStoreParameters dsp)
Open a store defined by
dsp |
void |
opendDone()
Called when the resource was open
|
void |
remove(DataStoreParameters dsp)
Removes a store from the server given its DataStoreParameters.
|
void |
resourceChanged(ResourceProvider resource) |
void |
updateTableStatistics(String database,
String schema,
String table) |
canAdd, getAddParameters
createSQLBuilder, getParameters, getResourcePath, getServerExplorerProviderServices
dispose, dispose
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createSQLBuilder
canAdd, getAddParameters, getParameters, getResourcePath
dispose
getServerExplorerProviderServices
public static final String NAME
protected JDBCHelper helper
public JDBCServerExplorerBase(JDBCServerExplorerParameters parameters, DataServerExplorerProviderServices services) throws InitializeException
InitializeException
protected JDBCServerExplorerParameters getJDBCParameters()
protected JDBCHelper createHelper() throws InitializeException
InitializeException
protected JDBCHelper getHelper()
public List list() throws DataException
DataServerExplorer
list
in interface DataServerExplorer
list
in class AbstractDBServerExplorer
DataException
public List list(boolean showInformationDBTables) throws DataException
DataException
public List list(int mode) throws DataException
DataServerExplorer
list
in interface DataServerExplorer
list
in interface JDBCServerExplorer
mode
- , filter store from a type: DataServerExplorer.MODE_ALL
,
DataServerExplorer.MODE_FEATURE
, #MODE_FEATURE_GEOMETRY
,
DataServerExplorer.MODE_RASTER
DataException
protected DataManagerProviderServices getManager()
public boolean hasGeometrySupport()
public boolean closeResourceRequested(ResourceProvider resource)
closeResourceRequested
in interface ResourceConsumer
public void resourceChanged(ResourceProvider resource)
resourceChanged
in interface ResourceConsumer
public void remove(DataStoreParameters dsp) throws RemoveException
DataServerExplorer
remove
in interface DataServerExplorer
remove
in interface JDBCServerExplorer
RemoveException
public DataStoreParameters getOpenParameters() throws DataException
getOpenParameters
in interface JDBCServerExplorer
DataException
public NewDataStoreParameters getAddParameters() throws DataException
DBServerExplorer
NewDataStoreParameters
to fillgetAddParameters
in interface DBServerExplorer
getAddParameters
in interface JDBCServerExplorer
DataException
public void closeDone() throws DataException
JDBCHelperUser
closeDone
in interface JDBCHelperUser
DataException
public void opendDone() throws DataException
JDBCHelperUser
opendDone
in interface JDBCHelperUser
DataException
public DataStore open(DataStoreParameters dsp) throws DataException
DBServerExplorer
dsp
open
in interface DBServerExplorer
open
in interface JDBCServerExplorer
open
in class AbstractDBServerExplorer
DataException
protected void checkIsMine(DataStoreParameters dsp)
protected JDBCStoreParameters createStoreParams() throws InitializeException, ProviderNotRegisteredException
public List list(int mode, boolean showInformationDBTables) throws DataException
DataException
public void open() throws OpenException
DBServerExplorer
open
in interface DBServerExplorer
OpenException
public void close() throws CloseException
DBServerExplorer
close
in interface DBServerExplorer
CloseException
protected void doDispose() throws BaseException
AbstractDisposable
AbstractDisposable.dispose()
method, to be
implemented by child classes.doDispose
in class AbstractDataServerExplorer
BaseException
AbstractDisposable.dispose()
public String getProviderName()
JDBCHelperUser
getProviderName
in interface DataServerExplorer
getProviderName
in interface JDBCHelperUser
getProviderName
in interface JDBCServerExplorer
public String getStoreName()
AbstractDBServerExplorer
DataStoreProvider
returned by this
ServerExplorergetStoreName
in interface JDBCServerExplorer
getStoreName
in class AbstractDBServerExplorer
public boolean canAdd()
DataServerExplorer
canAdd
in interface DataServerExplorer
canAdd
in interface JDBCServerExplorer
public FeatureType getFeatureType(DataStoreParameters dsp) throws DataException
DBServerExplorer
FeatureType
of the store of dsp
storegetFeatureType
in interface DBServerExplorer
getFeatureType
in interface JDBCServerExplorer
DataException
public boolean add(String providerName, NewDataStoreParameters ndsp, boolean overwrite) throws DataException
DataServerExplorer
add
in interface DataServerExplorer
add
in interface JDBCServerExplorer
ndsp
- , an instance of DataStoreParameters from
DataServerExplorer.getAddParameters(String)
that
describes the new DataStore.overwrite
- if the store already existsDataException
public List getDataStoreProviderNames()
DataServerExplorer
getDataStoreProviderNames
in interface DataServerExplorer
getDataStoreProviderNames
in interface JDBCServerExplorer
public void updateTableStatistics(String database, String schema, String table) throws JDBCExecuteSQLException
updateTableStatistics
in interface JDBCServerExplorer
JDBCExecuteSQLException
public DataStoreParameters get(String name) throws DataException
get
in interface DataServerExplorer
get
in interface JDBCServerExplorer
get
in class AbstractDataServerExplorer
DataException
public void execute(String sql)
execute
in interface JDBCServerExplorer