Java Doc for RowSet.java in  » EJB-Server-JBoss-4.2.1 » j2ee » javax » sql » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server JBoss 4.2.1 » j2ee » javax.sql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.sql.RowSet

RowSet
public interface RowSet extends ResultSet(Code)

The RowSet interface adds support to the JDBC API for the JavaBeans(TM) component model. A rowset can be used as a JavaBean in a visual Bean development environment. A RowSet can be created and configured at design time and executed at runtime. The RowSet interface provides a set of JavaBeans properties that allow a RowSet instance to be configured to connect to a JDBC data source and read some data from the data source. A group of setXXX() methods provide a way to pass input parameters to a rowset. The RowSet interface supports JavaBeans events, allowing other components in an application to be notified when an important event on a rowset occurs, such as a change in its value.

The RowSet interface is unique in that it is intended to be implemented using the rest of the JDBC(TM) API. In other words, a RowSet implementation is a layer of software that executes "on top" of a JDBC driver. Implementations of the RowSet interface can be provided by anyone, including JDBC driver vendors who want to provide a RowSet implementation as part of their JDBC products.

Rowsets are easy to use. The RowSet interface extends the standard java.sql.ResultSet interface. The RowSetMetaData interface extends the java.sql.ResultSetMetaData interface. Thus, developers familiar with the JDBC API will have to learn a minimal number of new APIs to use rowsets. In addition, third-party software tools that work with JDBC ResultSets will also easily be made to work with rowsets.





Method Summary
public  voidaddRowSetListener(RowSetListener rowSetListener)
     RowSet listener registration.
public  voidclearParameters()
     In general, parameter values remain in force for repeated use of a RowSet.
public  voidexecute()
     Fills the rowset with data.
public  StringgetCommand()
     Get the rowset's command property.
public  StringgetDataSourceName()
     The JNDI name that identifies a JDBC data source.
public  booleangetEscapeProcessing()
     If escape scanning is on (the default), the driver will do escape substitution before sending the SQL to the database.
public  intgetMaxFieldSize()
     The maxFieldSize limit (in bytes) is the maximum amount of data returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns.
public  intgetMaxRows()
     The maxRows limit is the maximum number of rows that a RowSet can contain.
public  StringgetPassword()
     The password used to create a database connection.
public  intgetQueryTimeout()
     The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute.
public  intgetTransactionIsolation()
     The transaction isolation property contains the JDBC transaction isolation level used.
public  MapgetTypeMap()
     Get the type-map object associated with this rowset.
public  StringgetUrl()
     Get the url used to create a JDBC connection.
public  StringgetUsername()
     The username used to create a database connection.
public  booleanisReadOnly()
     A rowset may be read-only.
public  voidremoveRowSetListener(RowSetListener rowSetListener)
     RowSet listener deregistration.
public  voidsetArray(int i, Array array)
     Set an Array parameter.
public  voidsetAsciiStream(int i, InputStream inputStream, int j)
    

When a very large ASCII value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream.

public  voidsetBigDecimal(int i, BigDecimal bigDecimal)
     Set a parameter to a java.lang.BigDecimal value.
public  voidsetBinaryStream(int i, InputStream inputStream, int j)
    

When a very large binary value is input to a LONGVARBINARY parameter, it may be more practical to send it via a java.io.InputStream.

public  voidsetBlob(int i, Blob blob)
     Set a BLOB parameter.
public  voidsetBoolean(int i, boolean flag)
     Set a parameter to a Java boolean value.
public  voidsetByte(int i, byte b)
     Set a parameter to a Java byte value.
public  voidsetBytes(int i, byte ab)
     Set a parameter to a Java array of bytes.
public  voidsetCharacterStream(int i, Reader reader, int j)
    

When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader.

public  voidsetClob(int i, Clob clob)
     Set a CLOB parameter.
public  voidsetCommand(String string)
     Set the rowset's command property.
public  voidsetConcurrency(int i)
     Set the rowset concurrency.
public  voidsetDataSourceName(String string)
     Set the data source name.
public  voidsetDate(int i, Date date)
     Set a parameter to a java.sql.Date value.
public  voidsetDate(int i, Date date, Calendar calendar)
     Set a parameter to a java.sql.Date value.
public  voidsetDouble(int i, double d)
     Set a parameter to a Java double value.
public  voidsetEscapeProcessing(boolean flag)
     If escape scanning is on (the default), the driver will do escape substitution before sending the SQL to the database.
public  voidsetFloat(int i, float f)
     Set a parameter to a Java float value.
public  voidsetInt(int i, int j)
     Set a parameter to a Java int value.
public  voidsetLong(int i, long j)
     Set a parameter to a Java long value.
public  voidsetMaxFieldSize(int i)
     The maxFieldSize limit (in bytes) is set to limit the size of data that can be returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR fields.
public  voidsetMaxRows(int i)
     The maxRows limit is set to limit the number of rows that any RowSet can contain.
public  voidsetNull(int parameterIndex, int sqlType)
    
public  voidsetNull(int paramIndex, int sqlType, String typeName)
    

JDBC 2.0 Set a parameter to SQL NULL.

public  voidsetObject(int parameterIndex, Object object)
    

Set the value of a parameter using an object; use the java.lang equivalent objects for integral values.

The JDBC specification specifies a standard mapping from Java Object types to SQL types.

public  voidsetObject(int parameterIndex, Object object, int targetSqlType)
     This method is like setObject above, but the scale used is the scale of the second parameter.
public  voidsetObject(int parameterIndex, Object object, int j, int scale)
    

Set the value of a parameter using an object; use the java.lang equivalent objects for integral values.

The given Java object will be converted to the targetSqlType before being sent to the database.

public  voidsetPassword(String string)
     Set the password.
public  voidsetQueryTimeout(int seconds)
     The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute.
public  voidsetReadOnly(boolean flag)
    
public  voidsetRef(int i, Ref ref)
     Set a REF(<structured-type>) parameter.
public  voidsetShort(int i, short s)
     Set a parameter to a Java short value.
public  voidsetString(int parameterIndex, String string)
     Set a parameter to a Java String value.
public  voidsetTime(int parameterIndex, Time time)
     Set a parameter to a java.sql.Time value.
public  voidsetTime(int parameterIndex, Time time, Calendar calendar)
     Set a parameter to a java.sql.Time value.
public  voidsetTimestamp(int parameterIndex, Timestamp timestamp)
     Set a parameter to a java.sql.Timestamp value.
public  voidsetTimestamp(int parameterIndex, Timestamp timestamp, Calendar calendar)
     Set a parameter to a java.sql.Timestamp value.
public  voidsetTransactionIsolation(int level)
     Set the transaction isolation.
public  voidsetType(int i)
     Set the rowset type.
public  voidsetTypeMap(Map map)
     Install a type-map object as the default type-map for this rowset.
public  voidsetUrl(String url)
     Set the url used to create a connection.
public  voidsetUsername(String name)
     Set the user name.



Method Detail
addRowSetListener
public void addRowSetListener(RowSetListener rowSetListener)(Code)
RowSet listener registration. Listeners are notified when an event occurs.
Parameters:
  rowSetListener - - an event listener



clearParameters
public void clearParameters() throws SQLException(Code)
In general, parameter values remain in force for repeated use of a RowSet. Setting a parameter value automatically clears its previous value. However, in some cases it is useful to immediately release the resources used by the current parameter values; this can be done by calling clearParameters.
exception:
  SQLException - - if a database-access error occurs.



execute
public void execute() throws SQLException(Code)
Fills the rowset with data. Execute() may use the following properties: url, data source name, user name, password, transaction isolation, and type map to create a connection for reading data. Execute may use the following properties to create a statement to execute a command: command, read only, maximum field size, maximum rows, escape processing, and query timeout. If the required properties have not been set, an exception is thrown. If successful, the current contents of the rowset are discarded and the rowset's metadata is also (re)set. If there are outstanding updates, they are ignored.
exception:
  SQLException - - if a database-access error occurs.



getCommand
public String getCommand()(Code)
Get the rowset's command property. The command property contains a command string that can be executed to fill the rowset with data. The default value is null. the command string, may be null



getDataSourceName
public String getDataSourceName()(Code)
The JNDI name that identifies a JDBC data source. Users should set either the url or data source name properties. The most recent property set is used to get a connection. a data source name



getEscapeProcessing
public boolean getEscapeProcessing() throws SQLException(Code)
If escape scanning is on (the default), the driver will do escape substitution before sending the SQL to the database. true if enabled; false if disabled
exception:
  SQLException - - if a database-access error occurs.



getMaxFieldSize
public int getMaxFieldSize() throws SQLException(Code)
The maxFieldSize limit (in bytes) is the maximum amount of data returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. If the limit is exceeded, the excess data is silently discarded. the current max column size limit; zero means unlimited
exception:
  SQLException - - if a database-access error occurs.



getMaxRows
public int getMaxRows() throws SQLException(Code)
The maxRows limit is the maximum number of rows that a RowSet can contain. If the limit is exceeded, the excess rows are silently dropped. the current max row limit; zero means unlimited
exception:
  SQLException - - if a database-access error occurs.



getPassword
public String getPassword()(Code)
The password used to create a database connection. The password property is set at runtime before calling execute(). It is not usually part of the serialized state of a rowset object. a password



getQueryTimeout
public int getQueryTimeout() throws SQLException(Code)
The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded, a SQLException is thrown. the current query timeout limit in seconds; zero means unlimited
exception:
  SQLException - - if a database-access error occurs.



getTransactionIsolation
public int getTransactionIsolation()(Code)
The transaction isolation property contains the JDBC transaction isolation level used. the transaction isolation level



getTypeMap
public Map getTypeMap() throws SQLException(Code)
Get the type-map object associated with this rowset. By default, the map returned is empty. a map object
exception:
  SQLException - - if a database-access error occurs.



getUrl
public String getUrl() throws SQLException(Code)
Get the url used to create a JDBC connection. The default value is null. a string url
exception:
  SQLException - - if a database-access error occurs.



getUsername
public String getUsername()(Code)
The username used to create a database connection. The username property is set at runtime before calling execute(). It is not usually part of the serialized state of a rowset object. a user name



isReadOnly
public boolean isReadOnly()(Code)
A rowset may be read-only. Attempts to update a read-only rowset will result in an SQLException being thrown. Rowsets are updateable, by default, if updates are possible. true if not updatable, false otherwise



removeRowSetListener
public void removeRowSetListener(RowSetListener rowSetListener)(Code)
RowSet listener deregistration.
Parameters:
  rowSetListener - - an event listener



setArray
public void setArray(int i, Array array) throws SQLException(Code)
Set an Array parameter.
Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  array - - an object representing an SQL array
exception:
  SQLException - - if a database-access error occurs.



setAsciiStream
public void setAsciiStream(int i, InputStream inputStream, int j) throws SQLException(Code)

When a very large ASCII value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream. JDBC will read the data from the stream as needed, until it reaches end-of-file.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.


Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  inputStream - - the java input stream which contains the ASCII parameter value
Parameters:
  j - - the number of bytes in the stream
exception:
  SQLException - - if a database-access error occurs.



setBigDecimal
public void setBigDecimal(int i, BigDecimal bigDecimal) throws SQLException(Code)
Set a parameter to a java.lang.BigDecimal value.
Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  bigDecimal - - the parameter value
exception:
  SQLException - - if a database-access error occurs.



setBinaryStream
public void setBinaryStream(int i, InputStream inputStream, int j) throws SQLException(Code)

When a very large binary value is input to a LONGVARBINARY parameter, it may be more practical to send it via a java.io.InputStream. JDBC will read the data from the stream as needed, until it reaches end-of-file.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.


Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  inputStream - - the java input stream which contains the binary parameter value
Parameters:
  j - - the number of bytes in the stream
exception:
  SQLException - - if a database-access error occurs.



setBlob
public void setBlob(int i, Blob blob) throws SQLException(Code)
Set a BLOB parameter.
Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  blob - - an object representing a BLOB
exception:
  SQLException - - if a database-access error occurs.



setBoolean
public void setBoolean(int i, boolean flag) throws SQLException(Code)
Set a parameter to a Java boolean value.
Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  flag - - the parameter value
exception:
  SQLException - - if a database-access error occurs.



setByte
public void setByte(int i, byte b) throws SQLException(Code)
Set a parameter to a Java byte value.
Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  b - - the parameter value
exception:
  SQLException - - if a database-access error occurs.



setBytes
public void setBytes(int i, byte ab) throws SQLException(Code)
Set a parameter to a Java array of bytes.
Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  ab - - the parameter value
exception:
  SQLException - - if a database-access error occurs.



setCharacterStream
public void setCharacterStream(int i, Reader reader, int j) throws SQLException(Code)

When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader. JDBC will read the data from the stream as needed, until it reaches end-of-file.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.


Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  reader - - the java reader which contains the UNICODE data
Parameters:
  j - - the number of characters in the stream
exception:
  SQLException - - if a database-access error occurs.



setClob
public void setClob(int i, Clob clob) throws SQLException(Code)
Set a CLOB parameter.
Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  clob - - an object representing a CLOB
exception:
  SQLException - - if a database-access error occurs.



setCommand
public void setCommand(String string) throws SQLException(Code)
Set the rowset's command property. This property is optional. The command property may not be needed when a rowset is produced by a data source that doesn't support commands, such as a spreadsheet.
Parameters:
  string - - a command string, may be null
exception:
  SQLException - - if a database-access error occurs.



setConcurrency
public void setConcurrency(int i) throws SQLException(Code)
Set the rowset concurrency.
Parameters:
  i - - a value from ResultSet.CONCUR_XXX
exception:
  SQLException - - if a database-access error occurs.



setDataSourceName
public void setDataSourceName(String string) throws SQLException(Code)
Set the data source name.
Parameters:
  string - - a data source name
exception:
  SQLException - - if a database-access error occurs.



setDate
public void setDate(int i, Date date) throws SQLException(Code)
Set a parameter to a java.sql.Date value.
Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  date - - the parameter value
exception:
  SQLException - - if a database-access error occurs.



setDate
public void setDate(int i, Date date, Calendar calendar) throws SQLException(Code)
Set a parameter to a java.sql.Date value. The driver converts this to a SQL DATE value when it sends it to the database.
Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  date - - the parameter value
Parameters:
  calendar - - the calendar used
exception:
  SQLException - - if a database-access error occurs.



setDouble
public void setDouble(int i, double d) throws SQLException(Code)
Set a parameter to a Java double value.
Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  d - - the parameter value
exception:
  SQLException - - if a database-access error occurs.



setEscapeProcessing
public void setEscapeProcessing(boolean flag) throws SQLException(Code)
If escape scanning is on (the default), the driver will do escape substitution before sending the SQL to the database.
Parameters:
  flag - - true to enable; false to disable
exception:
  SQLException - - if a database-access error occurs.



setFloat
public void setFloat(int i, float f) throws SQLException(Code)
Set a parameter to a Java float value. The driver converts this to a SQL FLOAT value when it sends it to the database.
Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  f - - the parameter value
exception:
  SQLException - - if a database-access error occurs.



setInt
public void setInt(int i, int j) throws SQLException(Code)
Set a parameter to a Java int value.
Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  j - - the parameter value
exception:
  SQLException - - if a database-access error occurs.



setLong
public void setLong(int i, long j) throws SQLException(Code)
Set a parameter to a Java long value.
Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  j - - the parameter value
exception:
  SQLException - - if a database-access error occurs.



setMaxFieldSize
public void setMaxFieldSize(int i) throws SQLException(Code)
The maxFieldSize limit (in bytes) is set to limit the size of data that can be returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR fields. If the limit is exceeded, the excess data is silently discarded. For maximum portability use values greater than 256.
Parameters:
  i - - the new max column size limit; zero means unlimited
exception:
  SQLException - - if a database-access error occurs.



setMaxRows
public void setMaxRows(int i) throws SQLException(Code)
The maxRows limit is set to limit the number of rows that any RowSet can contain. If the limit is exceeded, the excess rows are silently dropped.
Parameters:
  i - - the new max rows limit; zero means unlimited
exception:
  SQLException - - if a database-access error occurs.



setNull
public void setNull(int parameterIndex, int sqlType) throws SQLException(Code)

Set a parameter to SQL NULL.

Note: You must specify the parameter's SQL type.


Parameters:
  parameterIndex - - the first parameter is 1, the second is 2, ...
Parameters:
  sqlType - - SQL type code defined by java.sql.Types
exception:
  SQLException - - if a database-access error occurs.



setNull
public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException(Code)

JDBC 2.0 Set a parameter to SQL NULL. This version of setNull should be used for user-named types and REF type parameters. Examples of user-named types include: STRUCT, DISTINCT, JAVA_OBJECT, and named array types.

Note: To be portable, applications must give the SQL type code and the fully qualified SQL type name when specifying a NULL user-named or REF parameter. In the case of a user-named type the name is the type name of the parameter itself. For a REF parameter the name is the type name of the referenced type. If a JDBC driver does not need the type code or type name information, it may ignore it. Although it is intended for user-named and Ref parameters, this method may be used to set a null parameter of any JDBC type. If the parameter does not have a user-named or REF type then the typeName is ignored.


Parameters:
  paramIndex - - the first parameter is 1, the second is 2, ...
Parameters:
  sqlType - - a value from java.sql.Types
Parameters:
  typeName - - the fully qualified name of a SQL user-named type, ignored if the parameter is not a user-named type or REF
exception:
  SQLException - - if a database-access error occurs.



setObject
public void setObject(int parameterIndex, Object object) throws SQLException(Code)

Set the value of a parameter using an object; use the java.lang equivalent objects for integral values.

The JDBC specification specifies a standard mapping from Java Object types to SQL types. The given argument java object will be converted to the corresponding SQL type before being sent to the database.

Note that this method may be used to pass datatabase specific abstract data types, by using a Driver specific Java type. If the object is of a class implementing SQLData, the rowset should call its method writeSQL() to write it to the SQL data stream. else If the object is of a class implementing Ref, Blob, Clob, Struct, or Array then pass it to the database as a value of the corresponding SQL type. Raise an exception if there is an ambiguity, for example, if the object is of a class implementing more than one of those interfaces.


Parameters:
  parameterIndex - - The first parameter is 1, the second is 2, ...
Parameters:
  object - - The object containing the input parameter value
exception:
  SQLException - - if a database-access error occurs.



setObject
public void setObject(int parameterIndex, Object object, int targetSqlType) throws SQLException(Code)
This method is like setObject above, but the scale used is the scale of the second parameter. Scalar values have a scale of zero. Literal values have the scale present in the literal. While it is supported, it is not recommended that this method not be called with floating point input values.
Parameters:
  parameterIndex - - The first parameter is 1, the second is 2, ...
Parameters:
  object - - The object containing the input parameter value
Parameters:
  targetSqlType - - The SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument mayfurther qualify this type.
exception:
  SQLException - - if a database-access error occurs.



setObject
public void setObject(int parameterIndex, Object object, int j, int scale) throws SQLException(Code)

Set the value of a parameter using an object; use the java.lang equivalent objects for integral values.

The given Java object will be converted to the targetSqlType before being sent to the database. If the object is of a class implementing SQLData, the rowset should call its method writeSQL() to write it to the SQL data stream. else If the object is of a class implementing Ref, Blob, Clob, Struct, or Array then pass it to the database as a value of the corresponding SQL type.

Note that this method may be used to pass datatabase- specific abstract data types.


Parameters:
  parameterIndex - - The first parameter is 1, the second is 2, ...
Parameters:
  object - - The object containing the input parameter value
Parameters:
  j - - The SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type.
Parameters:
  scale - - For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types this is the number of digits after the decimal.For all other types this value will be ignored
exception:
  SQLException - - if a database-access error occurs.



setPassword
public void setPassword(String string) throws SQLException(Code)
Set the password.
Parameters:
  string - - the password string
exception:
  SQLException - - if a database-access error occurs.



setQueryTimeout
public void setQueryTimeout(int seconds) throws SQLException(Code)
The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded, a SQLException is thrown.
Parameters:
  seconds - - the new query timeout limit in seconds; zero means unlimited
exception:
  SQLException - - if a database-access error occurs.



setReadOnly
public void setReadOnly(boolean flag) throws SQLException(Code)
Set the read-onlyness of the rowset
Parameters:
  flag - - true if read-only, false otherwise
exception:
  SQLException - - if a database-access error occurs.



setRef
public void setRef(int i, Ref ref) throws SQLException(Code)
Set a REF(<structured-type>) parameter.
Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  ref - - an object representing data of an SQL REF Type
exception:
  SQLException - - if a database-access error occurs.



setShort
public void setShort(int i, short s) throws SQLException(Code)
Set a parameter to a Java short value.
Parameters:
  i - - the first parameter is 1, the second is 2, ...
Parameters:
  s - - the parameter value
exception:
  SQLException - - if a database-access error occurs.



setString
public void setString(int parameterIndex, String string) throws SQLException(Code)
Set a parameter to a Java String value.
Parameters:
  parameterIndex - - the first parameter is 1, the second is 2, ...
Parameters:
  string - - the parameter value
exception:
  SQLException - - if a database-access error occurs.



setTime
public void setTime(int parameterIndex, Time time) throws SQLException(Code)
Set a parameter to a java.sql.Time value.
Parameters:
  parameterIndex - - the first parameter is 1, the second is 2, ...
Parameters:
  time - - the parameter value
exception:
  SQLException - - if a database-access error occurs.



setTime
public void setTime(int parameterIndex, Time time, Calendar calendar) throws SQLException(Code)
Set a parameter to a java.sql.Time value.
Parameters:
  parameterIndex - - the first parameter is 1, the second is 2, ...
Parameters:
  time - - the parameter value
Parameters:
  calendar - - the calendar used
exception:
  SQLException - - if a database-access error occurs.



setTimestamp
public void setTimestamp(int parameterIndex, Timestamp timestamp) throws SQLException(Code)
Set a parameter to a java.sql.Timestamp value.
Parameters:
  parameterIndex - - the first parameter is 1, the second is 2, ...
Parameters:
  timestamp - - the parameter value
exception:
  SQLException - - if a database-access error occurs.



setTimestamp
public void setTimestamp(int parameterIndex, Timestamp timestamp, Calendar calendar) throws SQLException(Code)
Set a parameter to a java.sql.Timestamp value.
Parameters:
  parameterIndex - - the first parameter is 1, the second is 2, ...
Parameters:
  timestamp - - the parameter value
Parameters:
  calendar - - the calendar used
exception:
  SQLException - - if a database-access error occurs.



setTransactionIsolation
public void setTransactionIsolation(int level) throws SQLException(Code)
Set the transaction isolation.
Parameters:
  level - - the transaction isolation level
exception:
  SQLException - - if a database-access error occurs.



setType
public void setType(int i) throws SQLException(Code)
Set the rowset type.
Parameters:
  i - - a value from ResultSet.TYPE_XXX
exception:
  SQLException - - if a database-access error occurs.



setTypeMap
public void setTypeMap(Map map) throws SQLException(Code)
Install a type-map object as the default type-map for this rowset.
Parameters:
  map - - a map object
exception:
  SQLException - - if a database-access error occurs.



setUrl
public void setUrl(String url) throws SQLException(Code)
Set the url used to create a connection. Setting this property is optional. If a url is used, a JDBC driver that accepts the url must be loaded by the application before the rowset is used to connect to a database. The rowset will use the url internally to create a database connection when reading or writing data. Either a url or a data source name is used to create a connection, whichever was specified most recently.
Parameters:
  url - - a string value, may be null
exception:
  SQLException - - if a database-access error occurs.



setUsername
public void setUsername(String name) throws SQLException(Code)
Set the user name.
Parameters:
  name - - a user name
exception:
  SQLException - - if a database-access error occurs.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.