|
| 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 |
abort(java.util.concurrent.Executor arg0)
|
|
void |
clearWarnings()
|
|
void |
close()
|
|
void |
commit()
|
|
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()
|
|
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
|
|
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()
The SAS IOM JDBC driver 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()
|
|
int |
getNetworkTimeout()
|
|
protected com.sas.rio.RIOUtil |
getRioUtil()
|
|
java.lang.String |
getSchema()
|
|
int |
getTransactionIsolation()
The MVAConnection implementation of getTransactionIsolation always
returns Connection.TRANSACTION_NONE. |
|
java.util.Map<java.lang.String,java.lang.Class<?>> |
getTypeMap()
The MVAConnection implementation of getTypeMap() always throws a
SQLFeatureNotSupportedException. |
|
java.sql.SQLWarning |
getWarnings()
|
|
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)
|
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql)
|
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
|
|
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)
|
|
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)
|
|
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)
The SAS IOM JDBC driver does not support transactions. |
|
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 |
setNetworkTimeout(java.util.concurrent.Executor arg0,
int arg1)
|
|
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 |
setSchema(java.lang.String arg0)
|
|
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
public java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String sql)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLException
public java.lang.String nativeSQL(java.lang.String sql)
throws java.sql.SQLException
nativeSQL in interface java.sql.Connectionjava.sql.SQLException
public void setAutoCommit(boolean autoCommit)
throws java.sql.SQLException
setAutoCommit(boolean) with a value of false will cause
an exception.
setAutoCommit in interface java.sql.Connectionjava.sql.SQLException
public boolean getAutoCommit()
throws java.sql.SQLException
getAutoCommit()
will always return true.
getAutoCommit in interface java.sql.Connectionjava.sql.SQLException
public void commit()
throws java.sql.SQLException
commit in interface java.sql.Connectionjava.sql.SQLException
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
close in interface java.lang.AutoCloseableclose in interface java.sql.Connectionjava.sql.SQLException
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.Connectionjava.sql.SQLException
public int getTransactionIsolation()
throws java.sql.SQLException
MVAConnection implementation of getTransactionIsolation always
returns Connection.TRANSACTION_NONE. The SAS IOM JDBC driver does not support
transactions.
getTransactionIsolation in interface java.sql.Connectionjava.sql.SQLException
public java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
getWarnings in interface java.sql.Connectionjava.sql.SQLException
public void clearWarnings()
throws java.sql.SQLException
clearWarnings in interface java.sql.Connectionjava.sql.SQLException
public java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLException
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
public void abort(java.util.concurrent.Executor arg0)
throws java.sql.SQLException
abort in interface java.sql.Connectionjava.sql.SQLException
public int getNetworkTimeout()
throws java.sql.SQLException
getNetworkTimeout in interface java.sql.Connectionjava.sql.SQLException
public java.lang.String getSchema()
throws java.sql.SQLException
getSchema in interface java.sql.Connectionjava.sql.SQLException
public void setNetworkTimeout(java.util.concurrent.Executor arg0,
int arg1)
throws java.sql.SQLException
setNetworkTimeout in interface java.sql.Connectionjava.sql.SQLException
public void setSchema(java.lang.String arg0)
throws java.sql.SQLException
setSchema in interface java.sql.Connectionjava.sql.SQLException
|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||