|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.net.sharenet.ShareNetConnection
@SASScope(value="ALL") public class ShareNetConnection
This class establishes a session with a SAS/SHARE server.
DriverManager.getConnection(java.lang.String, java.util.Properties),
Statement,
ResultSet,
DatabaseMetaData| Field Summary | |
|---|---|
protected com.sas.net.sharenet.Wqecon |
con
|
protected com.sas.net.sharenet.Defdestroy |
defdes
|
protected com.sas.net.sharenet.Tcpmsg |
msg
|
protected int |
resultSetConcurrency
|
protected int |
resultSetType
|
protected int |
sharenetType
|
protected java.lang.String |
version_msg
|
java.sql.SQLWarning |
warnings
|
protected com.sas.net.sharenet.Xherscon |
xher1
|
| Constructor Summary | |
|---|---|
ShareNetConnection(java.lang.String host,
int port,
java.util.Properties info,
com.sas.net.sharenet.Wqecon con)
Constructs a ShareNetConnection object. |
|
ShareNetConnection(java.lang.String url,
java.util.Properties info)
Constructs a ShareNetConnection object. |
|
| Method Summary | ||
|---|---|---|
void |
abort(java.util.concurrent.Executor executor)
This method is not supported and will always throw a SQLException. |
|
void |
clearWarnings()
|
|
void |
close()
Closes all the ShareNetStatement and ShareNetPreparedStatement objects that are associated with this object and closes the connection to the server. |
|
void |
commit()
|
|
protected void |
connect(java.lang.String myhost,
int port)
Connect to the server. |
|
java.sql.Array |
createArrayOf(java.lang.String typeName,
java.lang.Object[] elements)
This method is not supported and will always throw a SQLException. |
|
java.sql.Blob |
createBlob()
This method is not supported and will always throw a SQLException. |
|
java.sql.Clob |
createClob()
This method is not supported and will always throw a SQLException. |
|
java.sql.NClob |
createNClob()
This method is not supported and will always throw a SQLException. |
|
java.sql.SQLXML |
createSQLXML()
This method is not supported and will always throw a SQLException. |
|
java.sql.Statement |
createStatement()
|
|
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
JDBC 2.0 Creates a Statement object by allowing the default result set type and result set concurrency type to be overridden. |
|
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
This method is not supported and will always throw a SQLException. |
|
java.sql.Struct |
createStruct(java.lang.String typeName,
java.lang.Object[] attributes)
This method is not supported and will always throw a SQLException. |
|
protected void |
deleteStatement(java.lang.Object statement)
Protected method which deletes statements associated with this object. |
|
protected int |
execute(java.lang.String command)
Execute a command on the remote server. |
|
protected void |
finalize()
Protected method which cleans up state associated with this object. |
|
protected static java.lang.String |
formatMsg(int acc,
com.sas.net.sharenet.Ans1 ans1,
com.sas.net.sharenet.Rcmsg rcmsg)
Format the response from the server. |
|
boolean |
getAutoCommit()
SAS software does not support transactions. |
|
java.lang.String |
getCatalog()
SAS software does not support SQL catalogs. |
|
java.util.Properties |
getClientInfo()
The SAS/SHARE JDBC driver does not have any client info properties. |
|
java.lang.String |
getClientInfo(java.lang.String name)
The SAS/SHARE JDBC driver does not have any client info properties. |
|
int |
getHoldability()
This method is not supported and will always throw a SQLException. |
|
java.sql.DatabaseMetaData |
getMetaData()
Creates a ShareNetDatabaseMetaData object. |
|
int |
getNetworkTimeout()
|
|
protected boolean |
getRemarks()
Protected method |
|
java.lang.String |
getSchema()
This method is not supported and will always throw a SQLException. |
|
int |
getTransactionIsolation()
SAS software does not support transactions. |
|
java.util.Map<java.lang.String,java.lang.Class<?>> |
getTypeMap()
This method is not supported and will always throw a SQLException. |
|
protected java.lang.String |
getUrl()
Protected method |
|
protected java.lang.String |
getUser()
Protected method |
|
java.sql.SQLWarning |
getWarnings()
|
|
boolean |
isClosed()
|
|
boolean |
isReadOnly()
SAS software does not support read-only connections. |
|
boolean |
isValid(int timeout)
This method is not supported and will always throw a SQLException. |
|
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)
JDBC 2.0 Creates a CallableStatement object by allowing 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)
This method is not supported and will always throw a SQLException. |
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
|
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
This method is not supported and will always throw a SQLException. |
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] columnIndexes)
This method is not supported and will always throw a SQLException. |
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
JDBC 2.0 Creates a PreparedStatement object by allowing 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)
This method is not supported and will always throw a SQLException. |
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
This method is not supported and will always throw a SQLException. |
|
void |
releaseSavepoint(java.sql.Savepoint savepoint)
This method is not supported and will always throw a SQLException. |
|
void |
rollback()
SAS software does not support transactions. |
|
void |
rollback(java.sql.Savepoint savepoint)
This method is not supported and will always throw a SQLException. |
|
void |
setAutoCommit(boolean autoCommit)
SAS software does not support transactions. |
|
void |
setCatalog(java.lang.String catalog)
SAS software does not support SQL catalogs. |
|
void |
setClientInfo(java.util.Properties properties)
The SAS/SHARE JDBC driver does not have any client info properties. |
|
void |
setClientInfo(java.lang.String name,
java.lang.String value)
The SAS/SHARE JDBC driver does not have any client info properties. |
|
void |
setHoldability(int holdability)
This method is not supported and will always throw a SQLException. |
|
void |
setNetworkTimeout(java.util.concurrent.Executor executor,
int milliseconds)
|
|
void |
setReadOnly(boolean readOnly)
SAS software does not support read-only connections. |
|
java.sql.Savepoint |
setSavepoint()
This method is not supported and will always throw a SQLException. |
|
java.sql.Savepoint |
setSavepoint(java.lang.String name)
This method is not supported and will always throw a SQLException. |
|
void |
setSchema(java.lang.String schema)
This method is not supported and will always throw a SQLException. |
|
void |
setTransactionIsolation(int level)
SAS software does not support transactions. |
|
void |
setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
This method is not supported and will always throw a SQLException. |
|
|
unwrap(java.lang.Class<T> iface)
|
|
| Field Detail |
|---|
public java.sql.SQLWarning warnings
protected com.sas.net.sharenet.Wqecon con
protected com.sas.net.sharenet.Xherscon xher1
protected com.sas.net.sharenet.Defdestroy defdes
protected com.sas.net.sharenet.Tcpmsg msg
protected int sharenetType
protected java.lang.String version_msg
protected int resultSetType
protected int resultSetConcurrency
| Constructor Detail |
|---|
public ShareNetConnection(java.lang.String url,
java.util.Properties info)
throws java.sql.SQLException
url - initial input urlinfo - properties needed to obtain a connection
java.sql.SQLException - This exception is thrown if a ShareNetException is detected.
public ShareNetConnection(java.lang.String host,
int port,
java.util.Properties info,
com.sas.net.sharenet.Wqecon con)
throws java.sql.SQLException
java.sql.SQLException - This exception is thrown if a ShareNetException is detected.| Method Detail |
|---|
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 in interface java.sql.Connectionjava.sql.SQLException
public boolean getAutoCommit()
throws java.sql.SQLException
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 - This exception is thrown if a ShareNetException 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 - This exception is thrown if a ShareNetDatabaseMetaData object cannot be created.
public void setReadOnly(boolean readOnly)
throws java.sql.SQLException
setReadOnly in interface java.sql.ConnectionreadOnly - This parameter is ignored.
java.sql.SQLException - This exception is required by the interface, but it is never thrown.
public boolean isReadOnly()
throws java.sql.SQLException
isReadOnly in interface java.sql.Connectionjava.sql.SQLException - This exception is required by the interface, but it is never thrown.
public void setCatalog(java.lang.String catalog)
throws java.sql.SQLException
setCatalog in interface java.sql.Connectionjava.sql.SQLException
public final java.lang.String getCatalog()
throws java.sql.SQLException
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
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.ConnectionresultSetType - The result set type TYPE_FORWARD_ONLY.resultSetConcurrency - The concurrency type CONCUR_READ_ONLY.
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.Connectionsql - The SQL statement String.resultSetType - The result set type TYPE_FORWARD_ONLY.resultSetConcurrency - The concurrency type CONCUR_READ_ONLY.
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.Connectionsql - The SQL statement String.resultSetType - The result set type TYPE_FORWARD_ONLY.resultSetConcurrency - The concurrency type CONCUR_READ_ONLY.
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 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 in interface java.sql.Connectionjava.sql.SQLException
public void setHoldability(int holdability)
throws java.sql.SQLException
setHoldability 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.Savepoint setSavepoint()
throws java.sql.SQLException
setSavepoint in interface java.sql.Connectionjava.sql.SQLException
public java.sql.Savepoint setSavepoint(java.lang.String name)
throws java.sql.SQLException
setSavepoint in interface java.sql.Connectionjava.sql.SQLException
public void rollback(java.sql.Savepoint savepoint)
throws java.sql.SQLException
rollback in interface java.sql.Connectionjava.sql.SQLException
public void releaseSavepoint(java.sql.Savepoint savepoint)
throws java.sql.SQLException
releaseSavepoint in interface java.sql.Connectionjava.sql.SQLException
public java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
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,
int resultSetHoldability)
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,
int resultSetHoldability)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int[] columnIndexes)
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
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionprotected void deleteStatement(java.lang.Object statement)
statement - statement object to be removed from the statementListprotected java.lang.String getUser()
protected java.lang.String getUrl()
protected boolean getRemarks()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Exception - Throwable is required, but it is never thrown.
java.lang.Throwable
protected void connect(java.lang.String myhost,
int port)
throws ShareNetException
host - host machine nameport - TCP/IP port number
ShareNetException - if an IOException is detected
protected int execute(java.lang.String command)
throws ShareNetException
command - command
ShareNetException - if an IOException is detected
protected static java.lang.String formatMsg(int acc,
com.sas.net.sharenet.Ans1 ans1,
com.sas.net.sharenet.Rcmsg rcmsg)
throws ShareNetException
acc - response code from serverans1 - answer segment one from the serverrcmsg - response message from the server
ShareNetException - if an IOException is detected
public java.sql.Clob createClob()
throws java.sql.SQLException
createClob in interface java.sql.Connectionjava.sql.SQLException
public java.sql.Blob createBlob()
throws java.sql.SQLException
createBlob in interface java.sql.Connectionjava.sql.SQLException
public java.sql.NClob createNClob()
throws java.sql.SQLException
createNClob in interface java.sql.Connectionjava.sql.SQLException
public java.sql.SQLXML createSQLXML()
throws java.sql.SQLException
createSQLXML in interface java.sql.Connectionjava.sql.SQLException
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
setClientInfo in interface java.sql.Connectionjava.sql.SQLClientInfoException
public void setClientInfo(java.util.Properties properties)
throws java.sql.SQLClientInfoException
setClientInfo in interface java.sql.Connectionjava.sql.SQLClientInfoException
public java.lang.String getClientInfo(java.lang.String name)
throws java.sql.SQLException
getClientInfo in interface java.sql.Connectionjava.sql.SQLException
public java.util.Properties getClientInfo()
throws java.sql.SQLException
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
createArrayOf in interface java.sql.Connectionjava.sql.SQLException
public java.sql.Struct createStruct(java.lang.String typeName,
java.lang.Object[] attributes)
throws java.sql.SQLException
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 setSchema(java.lang.String schema)
throws java.sql.SQLException
setSchema 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 abort(java.util.concurrent.Executor executor)
throws java.sql.SQLException
abort in interface java.sql.Connectionjava.sql.SQLException
public void setNetworkTimeout(java.util.concurrent.Executor executor,
int milliseconds)
throws java.sql.SQLException
setNetworkTimeout in interface java.sql.Connectionjava.sql.SQLException
public int getNetworkTimeout()
throws java.sql.SQLException
getNetworkTimeout in interface java.sql.Connectionjava.sql.SQLException
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||