Class NFEAbstractDataSource
- java.lang.Object
-
- oracle.spatial.network.nfe.io.jdbc.NFEAbstractDataSource
-
- All Implemented Interfaces:
NFEDataSource
- Direct Known Subclasses:
JdbcDataSource
public abstract class NFEAbstractDataSource extends java.lang.Object implements NFEDataSource
This class provides an implementation of the NFEDataSource interface that will return a connection already bind to the workspace specified by the method setActiveWorkspace. The method getConnectionWihoutWorkspaceHandling has to return a simple connection that will be used by the implementation of getConnection. LIVE is used as default workspace.
-
-
Constructor Summary
Constructors Constructor Description NFEAbstractDataSource()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getActiveWorkspace()
Returns the active workspace.java.sql.Connection
getConnection()
Returns a Connection and throws the appropriate exception if it can not do so.abstract java.sql.Connection
getConnectionWihoutWorkspaceHandling()
Returns a database connection and throws the appropriate exception if it can not do so.void
setActiveWorkspace(java.lang.String workspaceName)
Sets the active workspace that will be used by the connection.
-
-
-
Method Detail
-
getConnection
public java.sql.Connection getConnection() throws InvalidDBConnectionException
Description copied from interface:NFEDataSource
Returns a Connection and throws the appropriate exception if it can not do so. The connection will use the active workspace.- Specified by:
getConnection
in interfaceNFEDataSource
- Returns:
- connection
- Throws:
InvalidDBConnectionException
- if the connection is not valid.
-
setActiveWorkspace
public void setActiveWorkspace(java.lang.String workspaceName)
Description copied from interface:NFEDataSource
Sets the active workspace that will be used by the connection. Reload the model after to change the active workspace.- Specified by:
setActiveWorkspace
in interfaceNFEDataSource
- Parameters:
workspaceName
- name of the workspace that will be used by the connection
-
getActiveWorkspace
public java.lang.String getActiveWorkspace()
Description copied from interface:NFEDataSource
Returns the active workspace. The method should not return null. If the model is not version enabled then LIVE should be returned.- Specified by:
getActiveWorkspace
in interfaceNFEDataSource
- Returns:
- active workspace
-
getConnectionWihoutWorkspaceHandling
public abstract java.sql.Connection getConnectionWihoutWorkspaceHandling() throws InvalidDBConnectionException
Returns a database connection and throws the appropriate exception if it can not do so.- Returns:
- connection
- Throws:
InvalidDBConnectionException
- if the connection is not valid.
-
-