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.StringgetActiveWorkspace()Returns the active workspace.java.sql.ConnectiongetConnection()Returns a Connection and throws the appropriate exception if it can not do so.abstract java.sql.ConnectiongetConnectionWihoutWorkspaceHandling()Returns a database connection and throws the appropriate exception if it can not do so.voidsetActiveWorkspace(java.lang.String workspaceName)Sets the active workspace that will be used by the connection.
-
-
-
Method Detail
-
getConnection
public java.sql.Connection getConnection() throws InvalidDBConnectionExceptionDescription copied from interface:NFEDataSourceReturns a Connection and throws the appropriate exception if it can not do so. The connection will use the active workspace.- Specified by:
getConnectionin interfaceNFEDataSource- Returns:
- connection
- Throws:
InvalidDBConnectionException- if the connection is not valid.
-
setActiveWorkspace
public void setActiveWorkspace(java.lang.String workspaceName)
Description copied from interface:NFEDataSourceSets the active workspace that will be used by the connection. Reload the model after to change the active workspace.- Specified by:
setActiveWorkspacein interfaceNFEDataSource- Parameters:
workspaceName- name of the workspace that will be used by the connection
-
getActiveWorkspace
public java.lang.String getActiveWorkspace()
Description copied from interface:NFEDataSourceReturns the active workspace. The method should not return null. If the model is not version enabled then LIVE should be returned.- Specified by:
getActiveWorkspacein interfaceNFEDataSource- Returns:
- active workspace
-
getConnectionWihoutWorkspaceHandling
public abstract java.sql.Connection getConnectionWihoutWorkspaceHandling() throws InvalidDBConnectionExceptionReturns a database connection and throws the appropriate exception if it can not do so.- Returns:
- connection
- Throws:
InvalidDBConnectionException- if the connection is not valid.
-
-