|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.rio.MVAConnection
public class MVAConnection
A Connection represents a session with a specific database. Within the context of a Connection, SQL statements are executed and results are returned.
A Connection's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this connection, etc. This information is obtained with the getMetaData method.
Note: By default the Connection automatically commits changes after executing each statement. If auto commit has been disabled, an explicit commit must be done or database changes will not be saved.
DriverManager.getConnection(java.lang.String, java.util.Properties),
Statement,
ResultSet,
DatabaseMetaData| Field Summary | |
|---|---|
protected int |
resultSetConcurrency
|
protected int |
resultSetType
|
| Constructor Summary | |
|---|---|
MVAConnection(com.sas.iom.SAS.IDataService sasDataService,
java.util.Properties info)
Constructs an MVAConnection object. |
|
MVAConnection(com.sas.iom.SAS.IWorkspace sasWorkspace,
java.util.Properties info)
Constructs an MVAConnection object. |
|
MVAConnection(com.sas.rio.RIOUtil x,
java.util.Properties info)
|
|
MVAConnection(java.lang.String url,
java.util.Properties info)
Constructs an MVAConnection object. |
|
| Method Summary | ||
|---|---|---|
void |
clearWarnings()
Clears the warnings. |
|
void |
close()
In some cases, it is desirable to immediately release a Connection's database and JDBC resources instead of waiting for them to be automatically released; the close method provides this immediate release. |
|
void |
commit()
Closes all the open Statement and PreparedStatement objects that are associated with this object. |
|
java.sql.Array |
createArrayOf(java.lang.String typeName,
java.lang.Object[] elements)
This method is not supported. |
|
java.sql.Blob |
createBlob()
This method is not supported. |
|
java.sql.Clob |
createClob()
This method is not supported. |
|
java.sql.NClob |
createNClob()
This method is not supported. |
|
java.sql.SQLXML |
createSQLXML()
This method is not supported. |
|
java.sql.Statement |
createStatement()
Creates a Statement object. |
|
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
Same as createStatement() above, but allows the default result set type and result set concurrency type to be overridden. |
|
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
The MVAConnection implementation of
createStatement(int, int, int) throws a
SQLFeatureNotSupportedException if the value provided for
resultSetHoldability is not
ResultSet.CLOSE_CURSORS_AT_COMMIT. |
|
java.sql.Struct |
createStruct(java.lang.String typeName,
java.lang.Object[] attributes)
The MVAConnection implementation of
createStruct(String, Object[]) always throws a
SQLFeatureNotSupportedException. |
|
boolean |
getAutoCommit()
SAS software does not support transactions. |
|
java.lang.String |
getCatalog()
The MVAConnection implementation of getCatalog always
returns . |
|
java.util.Properties |
getClientInfo()
The MVAConnection implementation of getClientInfo always
returns an empty properties object. |
|
java.lang.String |
getClientInfo(java.lang.String name)
The MVAConnection implementation of getClientInfo(String)
always returns null. |
|
int |
getHoldability()
|
|
java.lang.String |
getIdForLogger()
|
|
java.sql.DatabaseMetaData |
getMetaData()
|
|
protected com.sas.rio.RIOUtil |
getRioUtil()
|
|
int |
getTransactionIsolation()
SAS software does not support transactions. |
|
java.util.Map<java.lang.String,java.lang.Class<?>> |
getTypeMap()
The MVAConnection implementation of getTypeMap() always throws a
SQLFeatureNotSupportedException. |
|
java.sql.SQLWarning |
getWarnings()
Gets the warning reported by calls on this Connection. |
|
boolean |
isClosed()
|
|
boolean |
isReadOnly()
The MVAConnection implementation of getReadOnly() always
returns false. |
|
boolean |
isValid(int timeout)
|
|
boolean |
isWrapperFor(java.lang.Class<?> iface)
|
|
java.lang.String |
nativeSQL(java.lang.String sql)
Returns the input string. |
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql)
Creates a CallableStatement object. |
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
Same as prepareCall() above, but allows the default result set type and result set concurrency type to be overridden. |
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency. |
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
Creates a PreparedStatement object. |
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
The MVAConnection implementation of
prepareStatement(String, int) always throws
SQLFeatureNotSupportedException. |
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] columnIndexes)
The MVAConnection implementation of
prepareStatement(String, int[]) always throws
SQLFeatureNotSupportedException. |
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
Same as prepareStatement() above, but allows the default result set type and result set concurrency type to be overridden. |
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
The MVAConnection implementation of
prepareStatement(String, String[]) always throws
SQLFeatureNotSupportedException. |
|
void |
releaseSavepoint(java.sql.Savepoint savepoint)
The MVAConnection implementation of releaseSavepoint
always throws SQLFeatureNotSupportedException. |
|
void |
rollback()
SAS software does not support transactions. |
|
void |
rollback(java.sql.Savepoint savepoint)
The MVAConnection implementation of rollback always
throws SQLFeatureNotSupportedException. |
|
void |
setAutoCommit(boolean autoCommit)
Sets the auto-commit state. |
|
void |
setCatalog(java.lang.String catalog)
The MVAConnection implementation of setCatalog silently
ignores the value provided for catalog. |
|
void |
setClientInfo(java.util.Properties properties)
The MVAConnection implementation of
setClientInfo(Properties) adds a warning to the
Connection object for all properties provided. |
|
void |
setClientInfo(java.lang.String name,
java.lang.String value)
The MVAConnection implementation of
setClientInfo(String, String) adds a warning to the
Connection object for any property provided. |
|
void |
setHoldability(int holdability)
The MVAConnection implementation of setHoldability(int)
only supports ResultSet.CLOSE_CURSORS_AT_COMMIT for holdability. |
|
void |
setReadOnly(boolean readOnly)
The MVAConnection implementation of setReadOnly(boolean)
ignores the value of readOnly. |
|
java.sql.Savepoint |
setSavepoint()
The MVAConnection implementation of setSavepoint() always throws
SQLFeatureNotSupportedException. |
|
java.sql.Savepoint |
setSavepoint(java.lang.String name)
The MVAConnection implementation of setSavepoint(String) always
throws SQLFeatureNotSupportedException. |
|
void |
setTransactionIsolation(int level)
SAS software does not support transactions. |
|
void |
setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
The MVAConnection implementation of setTypeMap() always throws a
SQLFeatureNotSupportedException. |
|
|
unwrap(java.lang.Class<T> iface)
|
|
| Field Detail |
|---|
protected int resultSetType
protected int resultSetConcurrency
| Constructor Detail |
|---|
public MVAConnection(java.lang.String url,
java.util.Properties info)
throws java.sql.SQLException
url - initial input url containing host and port information.info - java.util.Properties object which contains:
applyFormats
segmentLength
Note that the server's encryption policy is, by default, optional so no special action is needed to prepare an IOM BRIDGE server to use encryption. However, it is possible to set up the server so that encryption is required. Consult IOM BRIDGE server documentation for details.
java.sql.SQLException - This exception is thrown if a ShareNetException
is detected.
public MVAConnection(com.sas.iom.SAS.IDataService sasDataService,
java.util.Properties info)
throws java.sql.SQLException
sasDataService - IDataService object.info - java.util.Properties object which contains:
java.sql.SQLException - This exception is thrown if a ShareNetException
is detected.
public MVAConnection(com.sas.iom.SAS.IWorkspace sasWorkspace,
java.util.Properties info)
throws java.sql.SQLException
sasWorkspace - IWorkspace object.info - java.util.Properties object which contains:
java.sql.SQLException - This exception is thrown if a ShareNetException
is detected.
public MVAConnection(com.sas.rio.RIOUtil x,
java.util.Properties info)
throws java.sql.SQLException
java.sql.SQLException| Method Detail |
|---|
public java.lang.String getIdForLogger()
public java.sql.Statement createStatement()
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLException - This exception is thrown if an MVAStatement
object cannot be created.
public java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionsql - A SQL statement that may contain one or more '?' IN parameter
placeholders.
java.sql.SQLException - This exception is thrown if a PreparedStatement
object cannot be created.
public java.sql.CallableStatement prepareCall(java.lang.String sql)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionsql - A SQL statement that may contain one or more '?' parameter
place holders. Typically this statement is a JDBC function call
escape string.
java.sql.SQLException - This exception is required by the interface but
it is never thrown.
public java.lang.String nativeSQL(java.lang.String sql)
throws java.sql.SQLException
nativeSQL in interface java.sql.Connectionsql - An input SQL string for optimization.
java.sql.SQLException - This exception is required by the interface, but
it is never thrown.
public void setAutoCommit(boolean autoCommit)
throws java.sql.SQLException
setAutoCommit in interface java.sql.ConnectionautoCommit - This value must be True. SAS software does not support
transactions.
java.sql.SQLException - This exception is thrown if the value for
autoCommit is False.
public boolean getAutoCommit()
throws java.sql.SQLException
getAutoCommit in interface java.sql.ConnectionSLQException - this exception is required by the interface, but it
is never thrown.
java.sql.SQLException
public void commit()
throws java.sql.SQLException
commit in interface java.sql.Connectionjava.sql.SQLException - This exception is thrown if an exception occurred
while outstanding statements were being closed.
public void rollback()
throws java.sql.SQLException
rollback in interface java.sql.Connectionjava.sql.SQLException - This exception is always thrown.
public void close()
throws java.sql.SQLException
Note: A Connection is automatically closed when it is garbage collected. Certain fatal errors also result in a closed Connection.
close in interface java.sql.Connectionjava.sql.SQLException - This exception is thrown if an error condition is
detected.
public boolean isClosed()
throws java.sql.SQLException
isClosed in interface java.sql.Connectionjava.sql.SQLException
public java.sql.DatabaseMetaData getMetaData()
throws java.sql.SQLException
getMetaData in interface java.sql.Connectionjava.sql.SQLException
public void setReadOnly(boolean readOnly)
throws java.sql.SQLException
MVAConnection implementation of setReadOnly(boolean)
ignores the value of readOnly. The IOM JDBC Driver does not support read
only connections.
setReadOnly in interface java.sql.Connectionjava.sql.SQLException
public boolean isReadOnly()
throws java.sql.SQLException
MVAConnection implementation of getReadOnly() always
returns false. The IOM JDBC Driver does not support read only
connections.
isReadOnly in interface java.sql.Connectionjava.sql.SQLException
public void setCatalog(java.lang.String catalog)
throws java.sql.SQLException
MVAConnection implementation of setCatalog silently
ignores the value provided for catalog. The IOM JDBC Driver does
not support catalogs.
setCatalog in interface java.sql.Connectionjava.sql.SQLException
public java.lang.String getCatalog()
throws java.sql.SQLException
MVAConnection implementation of getCatalog always
returns . The IOM JDBC Driver does not support catalogs.
getCatalog in interface java.sql.Connectionjava.sql.SQLException
public void setTransactionIsolation(int level)
throws java.sql.SQLException
setTransactionIsolation in interface java.sql.Connectionlevel - The transaction level.
java.sql.SQLException - This exception is thrown if the value of level is
not valid.
public int getTransactionIsolation()
throws java.sql.SQLException
getTransactionIsolation in interface java.sql.Connectionjava.sql.SQLException - This exception is required by the interface, but
it is never thrown.
public java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
Note: Subsequent warnings will be chained to this SQLWarning.
getWarnings in interface java.sql.Connectionjava.sql.SQLException - This exception is required by the interface but
it is never thrown.
public void clearWarnings()
throws java.sql.SQLException
clearWarnings in interface java.sql.Connectionjava.sql.SQLException - This exception is required by the interface but
it is never thrown.
public java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
createStatement in interface java.sql.ConnectionresultSetType - a result set type, see ResultSet.TYPE_XXXresultSetConcurrency - a concurrency type, see ResultSet.CONCUR_XXX
java.sql.SQLException - This exception is thrown if a Statement object
cannot be created.
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
prepareStatement in interface java.sql.ConnectionresultSetType - a result set type, see ResultSet.TYPE_XXXresultSetConcurrency - a concurrency type, see ResultSet.CONCUR_XXX
java.sql.SQLException - This exception is thrown if a PreparedStatement
object cannot be created.
public java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
prepareCall in interface java.sql.ConnectionresultSetType - a result set type, see ResultSet.TYPE_XXXresultSetConcurrency - a concurrency type, see ResultSet.CONCUR_XXX
java.sql.SQLException - This exception is thrown if a CallableStatement
object cannot be created.
public java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap()
throws java.sql.SQLException
getTypeMap() always throws a
SQLFeatureNotSupportedException. Base SAS does not support SQL
structured types.
getTypeMap in interface java.sql.Connectionjava.sql.SQLException
public void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
setTypeMap() always throws a
SQLFeatureNotSupportedException. Base SAS does not support SQL
structured types.
setTypeMap in interface java.sql.Connectionjava.sql.SQLExceptionprotected com.sas.rio.RIOUtil getRioUtil()
public java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
MVAConnection implementation of
createStatement(int, int, int) throws a
SQLFeatureNotSupportedException if the value provided for
resultSetHoldability is not
ResultSet.CLOSE_CURSORS_AT_COMMIT.
createStatement in interface java.sql.Connectionjava.sql.SQLException
public int getHoldability()
throws java.sql.SQLException
getHoldability in interface java.sql.Connectionjava.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLException - This exception is always thrown to indicate the
method is not implemented.
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
throws java.sql.SQLException
MVAConnection implementation of
prepareStatement(String, int) always throws
SQLFeatureNotSupportedException. The IOM JDBC driver does not
support auto-generated keys.
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int[] columnIndexes)
throws java.sql.SQLException
MVAConnection implementation of
prepareStatement(String, int[]) always throws
SQLFeatureNotSupportedException. The IOM JDBC driver does not
support auto-generated keys.
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
MVAConnection implementation of
prepareStatement(String, String[]) always throws
SQLFeatureNotSupportedException. The IOM JDBC driver does not
support auto-generated keys.
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
public void releaseSavepoint(java.sql.Savepoint savepoint)
throws java.sql.SQLException
MVAConnection implementation of releaseSavepoint
always throws SQLFeatureNotSupportedException. The IOM JDBC
driver does not support transactions.
releaseSavepoint in interface java.sql.Connectionjava.sql.SQLException
public void rollback(java.sql.Savepoint savepoint)
throws java.sql.SQLException
MVAConnection implementation of rollback always
throws SQLFeatureNotSupportedException. The IOM JDBC driver does
not support transactions.
rollback in interface java.sql.Connectionjava.sql.SQLException
public void setHoldability(int holdability)
throws java.sql.SQLException
MVAConnection implementation of setHoldability(int)
only supports ResultSet.CLOSE_CURSORS_AT_COMMIT for holdability.
setHoldability in interface java.sql.Connectionjava.sql.SQLException
public java.sql.Savepoint setSavepoint()
throws java.sql.SQLException
setSavepoint() always throws
SQLFeatureNotSupportedException. The IOM JDBC driver does not
support transactions.
setSavepoint in interface java.sql.Connectionjava.sql.SQLException
public java.sql.Savepoint setSavepoint(java.lang.String name)
throws java.sql.SQLException
setSavepoint(String) always
throws SQLFeatureNotSupportedException. The IOM JDBC driver does
not support transactions.
setSavepoint in interface java.sql.Connectionjava.sql.SQLException
public java.sql.Clob createClob()
throws java.sql.SQLException
Constructs an object that implements the Clob interface. The
object returned initially contains no data. The
setAsciiStream, setCharacterStream and
setString methods of the Clob interface may be
used to add data to the Clob.
createClob in interface java.sql.Connectionjava.sql.SQLException - Always thrown, to indicate that this method is
not implemented.
public java.sql.Blob createBlob()
throws java.sql.SQLException
Constructs an object that implements the Blob interface. The
object returned initially contains no data. The
setBinaryStream and setBytes methods of the
Blob interface may be used to add data to the
Blob.
createBlob in interface java.sql.Connectionjava.sql.SQLException - Always thrown, to indicate that this method is
not implemented.
public java.sql.NClob createNClob()
throws java.sql.SQLException
Constructs an object that implements the NClob interface.
The object returned initially contains no data. The
setAsciiStream, setCharacterStream and
setString methods of the NClob interface may be
used to add data to the NClob.
createNClob in interface java.sql.Connectionjava.sql.SQLException - Always thrown, to indicate that this method is
not implemented.
public java.sql.SQLXML createSQLXML()
throws java.sql.SQLException
Constructs an object that implements the SQLXML interface.
The object returned initially contains no data. The
createXmlStreamWriter object and setString
method of the SQLXML interface may be used to add data to
the SQLXML object.
createSQLXML in interface java.sql.Connectionjava.sql.SQLException - Always thrown, to indicate that this method is
not implemented.
public boolean isValid(int timeout)
throws java.sql.SQLException
isValid in interface java.sql.Connectionjava.sql.SQLException
public void setClientInfo(java.lang.String name,
java.lang.String value)
throws java.sql.SQLClientInfoException
MVAConnection implementation of
setClientInfo(String, String) adds a warning to the
Connection object for any property provided. The IOM JDBC Driver
does not support the ability to set or retrieve client info properties.
setClientInfo in interface java.sql.Connectionjava.sql.SQLClientInfoException
public void setClientInfo(java.util.Properties properties)
throws java.sql.SQLClientInfoException
MVAConnection implementation of
setClientInfo(Properties) adds a warning to the
Connection object for all properties provided. The IOM JDBC
Driver does not support the ability to set or retrieve client info
properties.
setClientInfo in interface java.sql.Connectionjava.sql.SQLClientInfoException
public java.lang.String getClientInfo(java.lang.String name)
throws java.sql.SQLException
MVAConnection implementation of getClientInfo(String)
always returns null. The IOM JDBC Driver does not support the ability to
set or retrieve client info properties.
getClientInfo in interface java.sql.Connectionjava.sql.SQLException
public java.util.Properties getClientInfo()
throws java.sql.SQLException
MVAConnection implementation of getClientInfo always
returns an empty properties object. The IOM JDBC Driver does not support
the ability to set or retrieve client info properties.
getClientInfo in interface java.sql.Connectionjava.sql.SQLException
public java.sql.Array createArrayOf(java.lang.String typeName,
java.lang.Object[] elements)
throws java.sql.SQLException
Factory method for creating Array objects.
Note: When createArrayOf is used to create an array
object that maps to a primitive data type, then it is
implementation-defined whether the Array object is an array
of that primitive data type or an array of Object.
Note: The JDBC driver is responsible for mapping the elements
Object array to the default JDBC SQL type defined in
java.sql.Types for the given class of Object. The default
mapping is specified in Appendix B of the JDBC specification. If the
resulting JDBC type is not the appropriate type for the given typeName
then it is implementation defined whether an SQLException is
thrown or the driver supports the resulting conversion.
createArrayOf in interface java.sql.ConnectiontypeName - the SQL name of the type the elements of the array map
to. The typeName is a database-specific name which may be the name
of a built-in type, a user-defined type or a standard SQL type
supported by this database. This is the value returned by
Array.getBaseTypeNameelements - the elements that populate the returned object
java.sql.SQLException - Always thrown, to indicate that this method is
not implemented.
public java.sql.Struct createStruct(java.lang.String typeName,
java.lang.Object[] attributes)
throws java.sql.SQLException
MVAConnection implementation of
createStruct(String, Object[]) always throws a
SQLFeatureNotSupportedException. Base SAS does not support SQL
structured types.
createStruct in interface java.sql.Connectionjava.sql.SQLException
public <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
unwrap in interface java.sql.Wrapperjava.sql.SQLException
public boolean isWrapperFor(java.lang.Class<?> iface)
throws java.sql.SQLException
isWrapperFor in interface java.sql.Wrapperjava.sql.SQLException
|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||