Java Doc for RowSet.java in  » Apache-Harmony-Java-SE » javax-package » 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 » Apache Harmony Java SE » javax package » javax.sql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.sql.RowSet

RowSet
public interface RowSet extends ResultSet(Code)
A RowSet is an interface which provides access to data being sent from/to a database and which extends the functionality of ResultSet into a form that can be used as a JavaBeans component, perhaps being used in a visual programming environment.

Facilities are provided for get/set of properties relating to the Database and the SQL Command and for getting/setting data within the Rows represented by the RowSet. The RowSet supports JavaBeans events so that other components in an application can be informed when various changes happen to the RowSet, such as changes in data values.

RowSet is implemented as a layer on top of the remainder of the JDBC API. A RowSet may be connected where it maintains a connection to the database throughout its lifecycle. A RowSet may be disconnected where it establishes a connection to the database, gets data and then closes the connection. Updates to a disconnected RowSet can be made and later send back the changes to the database, but this requires the RowSet to first reconnect to the database before the changes are sent back.

Disconnected RowSets may make use of RowSetReaders to populate the RowSet with data, possibly from a non-relational database source. Disconnected RowSets may also use RowSetWriters to send data back to the underlying data store. There is considerable freedom in the way that RowSetReaders and RowSetWriters are implemented to get and store data.





Method Summary
public  voidaddRowSetListener(RowSetListener theListener)
     Registers a supplied RowSetListener with this RowSet.
public  voidclearParameters()
     Clears the parameters previously set for this RowSet.

Parameter values apply to repeated use of a RowSet object.

public  voidexecute()
     Fetches data for this RowSet.
public  StringgetCommand()
     Gets the RowSet's Command property.
public  StringgetDataSourceName()
     Gets the name of the datasource for this RowSet.
public  booleangetEscapeProcessing()
     Reports if escape processing is enabled for this RowSet.
public  intgetMaxFieldSize()
     Gets the maximum number of bytes that can be returned for column values which are of types BINARY, VARBINARY, LONGVARBINARYBINARY, CHAR, VARCHAR, or LONGVARCHAR.
public  intgetMaxRows()
     Gets the maximum number of rows for this RowSet.
public  StringgetPassword()
     Gets the value of the password property for this RowSet.
public  intgetQueryTimeout()
     Gets the Timeout for the driver when executing a Query operation.
public  intgetTransactionIsolation()
     Gets the transaction isolation property setting for this RowSet. an integer holding the current transaction isolation setting.
public  Map<String, Class<?>>getTypeMap()
     Gets the custom mapping of SQL types for this RowSet, if any. a Map holding the custom mappings of SQL types to Java classesfor this RowSet.
public  StringgetUrl()
     Gets the URL property value for this RowSet.
public  StringgetUsername()
     Gets the value of the Username property for this RowSet.
public  booleanisReadOnly()
     Reports if this RowSet is read only.
public  voidremoveRowSetListener(RowSetListener theListener)
     Removes a specified RowSetListener object from the set of listeners which will be notified of events by this RowSet.
public  voidsetArray(int parameterIndex, Array theArray)
     Sets the specified ARRAY parameter in the RowSet command with the supplied java.sql.Array value.
public  voidsetAsciiStream(int parameterIndex, InputStream theInputStream, int length)
     Sets the value of the specified parameter in the RowSet command with the ASCII data in the supplied java.io.InputStream value.
public  voidsetBigDecimal(int parameterIndex, BigDecimal theBigDecimal)
     Sets the value of the specified SQL NUMERIC parameter in the RowSet command with the data in the supplied java.math.BigDecimal value.
public  voidsetBinaryStream(int parameterIndex, InputStream theInputStream, int length)
     Sets the value of the specified parameter in the RowSet command with the binary data in the supplied java.io.InputStream value.
public  voidsetBlob(int parameterIndex, Blob theBlob)
     Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Blob.
public  voidsetBoolean(int parameterIndex, boolean theBoolean)
     Sets the value of the specified parameter in the RowSet command to the supplied boolean.
public  voidsetByte(int parameterIndex, byte theByte)
     Sets the value of the specified parameter in the RowSet command to the supplied byte value.
public  voidsetBytes(int parameterIndex, byte[] theByteArray)
     Sets the value of the specified parameter in the RowSet command to the supplied byte array value.
public  voidsetCharacterStream(int parameterIndex, Reader theReader, int length)
     Sets the value of the specified parameter in the RowSet command to the sequence of Unicode characters carried by the supplied java.io.Reader.
public  voidsetClob(int parameterIndex, Clob theClob)
     Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Clob.
public  voidsetCommand(String cmd)
     Sets the Command property for this RowSet - the command is an SQL Query which runs when the execute method is invoked.
public  voidsetConcurrency(int concurrency)
     Sets the concurrency property of this RowSet.
public  voidsetDataSourceName(String name)
     Sets the Data Source Name property for the RowSet.
public  voidsetDate(int parameterIndex, Date theDate)
     Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Date.
public  voidsetDate(int parameterIndex, Date theDate, Calendar theCalendar)
     Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Date, where the conversion of the Date to an SQL DATE value is calculated using a supplied Calendar.
public  voidsetDouble(int parameterIndex, double theDouble)
     Sets the value of the specified parameter in the RowSet command with the supplied double.
public  voidsetEscapeProcessing(boolean enable)
     Sets the Escape Processing status for this RowSet.
public  voidsetFloat(int parameterIndex, float theFloat)
     Sets the value of the specified parameter in the RowSet command with the supplied float.
public  voidsetInt(int parameterIndex, int theInteger)
     Sets the value of the specified parameter in the RowSet command with the supplied integer.
public  voidsetLong(int parameterIndex, long theLong)
     Sets the value of the specified parameter in the RowSet command with the supplied long.
public  voidsetMaxFieldSize(int max)
     Sets the maximum number of bytes which can be returned for a column value where the column type BINARY, VARBINARY, LONGVARBINARYBINARY, CHAR, VARCHAR, or LONGVARCHAR.
public  voidsetMaxRows(int max)
     Sets the maximum number of rows which can be held by the RowSet.
public  voidsetNull(int parameterIndex, int sqlType)
     Sets the value of the specified parameter in the RowSet command to SQL NULL.
public  voidsetNull(int parameterIndex, int sqlType, String typeName)
     Sets the value of the specified parameter in the RowSet command to SQL NULL.
public  voidsetObject(int parameterIndex, Object theObject)
     Sets the value of the specified parameter in the RowSet command to a supplied Java object.

The JDBC specification provides a standard mapping for Java objects to SQL data types.

public  voidsetObject(int parameterIndex, Object theObject, int targetSqlType)
     Sets the value of the specified parameter in the RowSet command to a supplied Java object.
public  voidsetObject(int parameterIndex, Object theObject, int targetSqlType, int scale)
     Sets the value of the specified parameter in the RowSet command to a supplied Java object.
public  voidsetPassword(String password)
     Sets the database Password for this RowSet.
public  voidsetQueryTimeout(int seconds)
     Sets the Timeout value for this RowSet.
public  voidsetReadOnly(boolean readOnly)
     Sets whether the RowSet is read only or is updateable.
public  voidsetRef(int parameterIndex, Ref theRef)
     Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Ref.
public  voidsetShort(int parameterIndex, short theShort)
     Sets the value of the specified parameter in the RowSet command to a supplied short integer.
public  voidsetString(int parameterIndex, String theString)
     Sets the value of the specified parameter in the RowSet command to a supplied String.
public  voidsetTime(int parameterIndex, Time theTime)
     Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Time, converting to an SQL TIME value using the system default Calendar.
public  voidsetTime(int parameterIndex, Time theTime, Calendar theCalendar)
     Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Time, converting to an SQL TIME value using a supplied Calendar.
public  voidsetTimestamp(int parameterIndex, Timestamp theTimestamp)
     Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Timestamp, converting to an SQL TIMESTAMP value using the system default Calendar.
public  voidsetTimestamp(int parameterIndex, Timestamp theTimestamp, Calendar theCalendar)
     Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Timestamp converting to an SQL TIMESTAMP value using a supplied Calendar.
public  voidsetTransactionIsolation(int level)
     Updates the target instance's transaction isolation level to one of a discrete set of possible values.
Parameters:
  level - the new transaction isolation level.
public  voidsetType(int type)
     Sets the type of this RowSet.
public  voidsetTypeMap(Map<String, Class<?>> theTypeMap)
     Sets the Map used to map SQL User Defined Types to Java classes.
public  voidsetUrl(String theURL)
     Sets the URL used by this RowSet to access the database via a DriverManager.
public  voidsetUsername(String theUsername)
     Sets the Username property for the RowSet, used to authenticate a connection to the database.



Method Detail
addRowSetListener
public void addRowSetListener(RowSetListener theListener)(Code)
Registers a supplied RowSetListener with this RowSet. Once registered, the RowSetListener is notified of events generated by the RowSet.
Parameters:
  theListener - an object which implements the rowSetListenerinterface.



clearParameters
public void clearParameters() throws SQLException(Code)
Clears the parameters previously set for this RowSet.

Parameter values apply to repeated use of a RowSet object. Setting a new value for a parameter clears its previous value. clearParameters clears the values for all parameters with one method call.
throws:
  SQLException - if a problem occurs accessing the database




execute
public void execute() throws SQLException(Code)
Fetches data for this RowSet. If successful, any existing data for the RowSet is discarded and the metadata for the rowset is set.

Data is retrieved connects to the database and executes a Command. This requires some or all of the following properties to be set: url, data source name, user name, password, transaction isolation, type map ; plus some or all of the properties: command, read only, maximum field size, maximum rows, escape processing, and query timeout.

The RowSet may use a RowSetReader to access the database - in this case a reader must be registered with the RowSet and the RowSet will then invoke the readData method on the reader to fetch the data.
throws:
  SQLException - if a problem occurs accessing the database or if theproperties needed to access the database have not been set




getCommand
public String getCommand()(Code)
Gets the RowSet's Command property. a string containing the RowSet's Command property - this is anSQL Query which can be executed to fetch data into the RowSet.



getDataSourceName
public String getDataSourceName()(Code)
Gets the name of the datasource for this RowSet. a String containing the name of the datasource.



getEscapeProcessing
public boolean getEscapeProcessing() throws SQLException(Code)
Reports if escape processing is enabled for this RowSet.

If true (the default) the driver will automatically perform escape code processing on SQL statements prior to them being sent to the database. true if escape processing is enabled, false otherwise.
throws:
  SQLException - if a problem occurs accessing the database




getMaxFieldSize
public int getMaxFieldSize() throws SQLException(Code)
Gets the maximum number of bytes that can be returned for column values which are of types BINARY, VARBINARY, LONGVARBINARYBINARY, CHAR, VARCHAR, or LONGVARCHAR. Excess data is silently discarded if the number is exceeded. the current maximum size in bytes. 0 means no limit
throws:
  SQLException - if a problem occurs accessing the database



getMaxRows
public int getMaxRows() throws SQLException(Code)
Gets the maximum number of rows for this RowSet. Excess rows are discarded silently if the limit is exceeded. the previous maximum number of rows. 0 implies no limit.
throws:
  SQLException - if a problem occurs accessing the database



getPassword
public String getPassword()(Code)
Gets the value of the password property for this RowSet. This property is used when making a connection to the database and should be set before invoking the execute method. a String containing the value of the password property.



getQueryTimeout
public int getQueryTimeout() throws SQLException(Code)
Gets the Timeout for the driver when executing a Query operation.

If a Query takes longer than the Timeout, an exception is thrown. the Timeout value in seconds.
throws:
  SQLException - if an error occurs accessing the database.




getTransactionIsolation
public int getTransactionIsolation()(Code)
Gets the transaction isolation property setting for this RowSet. an integer holding the current transaction isolation setting. Oneof: one of Connection.TRANSACTION_READ_UNCOMMITTED,Connection.TRANSACTION_READ_COMMITTED,Connection.TRANSACTION_REPEATABLE_READ,Connection.TRANSACTION_SERIALIZABLE



getTypeMap
public Map<String, Class<?>> getTypeMap() throws SQLException(Code)
Gets the custom mapping of SQL types for this RowSet, if any. a Map holding the custom mappings of SQL types to Java classesfor this RowSet. By default, the Map is empty.
throws:
  SQLException - if an error occurs accessing the database.



getUrl
public String getUrl() throws SQLException(Code)
Gets the URL property value for this RowSet. If there is no DataSource object specified, the RowSet uses the URL to establish a connection to the database. The default value for the URL is null. a String holding the value of the URL property.
throws:
  SQLException - if an error occurs accessing the database.



getUsername
public String getUsername()(Code)
Gets the value of the Username property for this RowSet. The Username is used when establishing a connection to the database and should be set before the execute method is invoked. a String holing the value of the Username property.



isReadOnly
public boolean isReadOnly()(Code)
Reports if this RowSet is read only. true if this RowSet is read only, false if it is updateable.



removeRowSetListener
public void removeRowSetListener(RowSetListener theListener)(Code)
Removes a specified RowSetListener object from the set of listeners which will be notified of events by this RowSet.
Parameters:
  theListener - the RowSetListener to remove from the set of listeners forthis RowSet.



setArray
public void setArray(int parameterIndex, Array theArray) throws SQLException(Code)
Sets the specified ARRAY parameter in the RowSet command with the supplied java.sql.Array value.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theArray - the java.sql.Array value to set
throws:
  SQLException - if an error occurs accessing the database.



setAsciiStream
public void setAsciiStream(int parameterIndex, InputStream theInputStream, int length) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command with the ASCII data in the supplied java.io.InputStream value. Data is read from the InputStream until end-of-file is reached.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theInputStream - an InputStream containing the ASCII data to set into theparameter value
Parameters:
  length - the length of the data in bytes
throws:
  SQLException - if an error occurs accessing the database.



setBigDecimal
public void setBigDecimal(int parameterIndex, BigDecimal theBigDecimal) throws SQLException(Code)
Sets the value of the specified SQL NUMERIC parameter in the RowSet command with the data in the supplied java.math.BigDecimal value.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theBigDecimal - the BigDecimal containing the value
throws:
  SQLException - if an error occurs accessing the database.



setBinaryStream
public void setBinaryStream(int parameterIndex, InputStream theInputStream, int length) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command with the binary data in the supplied java.io.InputStream value. Data is read from the InputStream until end-of-file is reached.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theInputStream - an InputStream containing the binary data to set into theparameter value
Parameters:
  length - the length of the data in bytes
throws:
  SQLException - if an error occurs accessing the database.



setBlob
public void setBlob(int parameterIndex, Blob theBlob) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Blob.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theBlob - the Blob value to set
throws:
  SQLException - if an error occurs accessing the database.



setBoolean
public void setBoolean(int parameterIndex, boolean theBoolean) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command to the supplied boolean.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theBoolean - the boolean value to set
throws:
  SQLException - if an error occurs accessing the database.



setByte
public void setByte(int parameterIndex, byte theByte) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command to the supplied byte value.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theByte - the byte value to set
throws:
  SQLException - if an error occurs accessing the database.



setBytes
public void setBytes(int parameterIndex, byte[] theByteArray) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command to the supplied byte array value.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theByteArray - the array of bytes to set into the parameter.
throws:
  SQLException - if an error occurs accessing the database.



setCharacterStream
public void setCharacterStream(int parameterIndex, Reader theReader, int length) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command to the sequence of Unicode characters carried by the supplied java.io.Reader.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theReader - the Reader which contains the Unicode data to set into theparameter
Parameters:
  length - the length of the data in the Reader in characters
throws:
  SQLException - if an error occurs accessing the database.



setClob
public void setClob(int parameterIndex, Clob theClob) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Clob.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theClob - the Clob value to set
throws:
  SQLException - if an error occurs accessing the database.



setCommand
public void setCommand(String cmd) throws SQLException(Code)
Sets the Command property for this RowSet - the command is an SQL Query which runs when the execute method is invoked. This property is optional for datasources that do not support commands.
Parameters:
  cmd - a String containing the SQL Query. Can be null.
throws:
  SQLException - if an error occurs accessing the database.



setConcurrency
public void setConcurrency(int concurrency) throws SQLException(Code)
Sets the concurrency property of this RowSet. The default value is ResultSet.CONCUR_READ_ONLY.
Parameters:
  concurrency - the new concurrency value - one of: ResultSet.CONCUR_READ_ONLYor ResultSet.CONCUR_UPDATABLE
throws:
  SQLException - if an error occurs accessing the database.



setDataSourceName
public void setDataSourceName(String name) throws SQLException(Code)
Sets the Data Source Name property for the RowSet.

The Data Source Name can be used to find a DataSource which has been registered with a naming service - the DataSource can then be used to create a connection to the database.
Parameters:
  name - a String with the new Data Source Name.
throws:
  SQLException - if an error occurs accessing the database.




setDate
public void setDate(int parameterIndex, Date theDate) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Date.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theDate - the Date to use
throws:
  SQLException - if an error occurs accessing the database.



setDate
public void setDate(int parameterIndex, Date theDate, Calendar theCalendar) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command with the value of a supplied java.sql.Date, where the conversion of the Date to an SQL DATE value is calculated using a supplied Calendar.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theDate - the Date to use
Parameters:
  theCalendar - the Calendar to use in converting the Date to an SQL DATEvalue
throws:
  SQLException - if an error occurs accessing the database.



setDouble
public void setDouble(int parameterIndex, double theDouble) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command with the supplied double.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theDouble - the double value to set
throws:
  SQLException - if an error occurs accessing the database.



setEscapeProcessing
public void setEscapeProcessing(boolean enable) throws SQLException(Code)
Sets the Escape Processing status for this RowSet. If escape processing is on, the driver performs escape substitution before sending an SQL command to the database. The default value for escape processing is on.
Parameters:
  enable - true to enable Escape Processing, false to turn it off.
throws:
  SQLException - if an error occurs accessing the database.



setFloat
public void setFloat(int parameterIndex, float theFloat) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command with the supplied float.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theFloat - the float value to set
throws:
  SQLException - if an error occurs accessing the database.



setInt
public void setInt(int parameterIndex, int theInteger) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command with the supplied integer.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theInteger - the integer value to set
throws:
  SQLException - if an error occurs accessing the database.



setLong
public void setLong(int parameterIndex, long theLong) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command with the supplied long.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theLong - the long value to set
throws:
  SQLException - if an error occurs accessing the database.



setMaxFieldSize
public void setMaxFieldSize(int max) throws SQLException(Code)
Sets the maximum number of bytes which can be returned for a column value where the column type BINARY, VARBINARY, LONGVARBINARYBINARY, CHAR, VARCHAR, or LONGVARCHAR. Data which exceeds this limit is silently discarded. For portability, a value greater than 256 is recommended.
Parameters:
  max - the maximum size of the returned column value in bytes. 0means unlimited.
throws:
  SQLException - if an error occurs accessing the database.



setMaxRows
public void setMaxRows(int max) throws SQLException(Code)
Sets the maximum number of rows which can be held by the RowSet. Any additional rows are silently discarded.
Parameters:
  max - the maximum number of rows which can be held in the RowSet. 0means no limit.
throws:
  SQLException - if an error occurs accessing the database.



setNull
public void setNull(int parameterIndex, int sqlType) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command to SQL NULL.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  sqlType - the type of the parameter, as defined by java.sql.Types.
throws:
  SQLException - if an error occurs accessing the database.



setNull
public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command to SQL NULL. This form of the setNull method should be used for User Defined Types and REF parameters.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  sqlType - the type of the parameter, as defined by java.sql.Types.
Parameters:
  typeName - the fully qualified name of an SQL User Defined Type or thename of the SQL structured type referenced by a REF type.Ignored if the sqlType is not a UDT or REF type.
throws:
  SQLException - if an error occurs accessing the database.



setObject
public void setObject(int parameterIndex, Object theObject) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command to a supplied Java object.

The JDBC specification provides a standard mapping for Java objects to SQL data types. Database specific types can be mapped by JDBC driver specific Java types.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theObject - the Java object containing the data value.
throws:
  SQLException - if an error occurs accessing the database.




setObject
public void setObject(int parameterIndex, Object theObject, int targetSqlType) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command to a supplied Java object.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theObject - the Java object containing the data value.
Parameters:
  targetSqlType - the SQL type to send to the database, as defined injava.sql.Types.
throws:
  SQLException - if an error occurs accessing the database.



setObject
public void setObject(int parameterIndex, Object theObject, int targetSqlType, int scale) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command to a supplied Java object.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theObject - the Java object containing the data value.
Parameters:
  targetSqlType - the SQL type to send to the database, as defined injava.sql.Types.
Parameters:
  scale - the number of digits after the decimal point, forjava.sql.Types.DECIMAL and java.sql.Types.NUMERIC types.Ignored for all other types.
throws:
  SQLException - if an error occurs accessing the database.



setPassword
public void setPassword(String password) throws SQLException(Code)
Sets the database Password for this RowSet.
Parameters:
  password - a string holding the new password
throws:
  SQLException - if an error occurs accessing the database.



setQueryTimeout
public void setQueryTimeout(int seconds) throws SQLException(Code)
Sets the Timeout value for this RowSet. The timeout is the maximum time that the driver will wait while executing a command - after this time, an SQLException is thrown.
Parameters:
  seconds - the number of seconds for the Timeout.
throws:
  SQLException - if an error occurs accessing the database.



setReadOnly
public void setReadOnly(boolean readOnly) throws SQLException(Code)
Sets whether the RowSet is read only or is updateable.
Parameters:
  readOnly - true to set the RowSet to readonly state, false to allowupdates.
throws:
  SQLException - if an error occurs accessing the database.



setRef
public void setRef(int parameterIndex, Ref theRef) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Ref. This is sent to the database as an SQL REF value.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theRef - the Ref value to set
throws:
  SQLException - if an error occurs accessing the database.



setShort
public void setShort(int parameterIndex, short theShort) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command to a supplied short integer.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theShort - the short value to set
throws:
  SQLException - if an error occurs accessing the database.



setString
public void setString(int parameterIndex, String theString) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command to a supplied String. The String is placed into the database as a VARCHAR or LONGVARCHAR SQL value, depending on the database limits for the length of VARCHAR values.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theString -
throws:
  SQLException - if an error occurs accessing the database.



setTime
public void setTime(int parameterIndex, Time theTime) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Time, converting to an SQL TIME value using the system default Calendar.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theTime - the Time value to set
throws:
  SQLException - if an error occurs accessing the database.



setTime
public void setTime(int parameterIndex, Time theTime, Calendar theCalendar) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Time, converting to an SQL TIME value using a supplied Calendar.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theTime - the Time value to set
Parameters:
  theCalendar - the Calendar to use in the conversion operation
throws:
  SQLException - if an error occurs accessing the database.



setTimestamp
public void setTimestamp(int parameterIndex, Timestamp theTimestamp) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Timestamp, converting to an SQL TIMESTAMP value using the system default Calendar.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theTimestamp -
throws:
  SQLException - if an error occurs accessing the database.



setTimestamp
public void setTimestamp(int parameterIndex, Timestamp theTimestamp, Calendar theCalendar) throws SQLException(Code)
Sets the value of the specified parameter in the RowSet command to a supplied java.sql.Timestamp converting to an SQL TIMESTAMP value using a supplied Calendar.
Parameters:
  parameterIndex - index of the parameter to set, where the first parameter hasindex = 1.
Parameters:
  theTimestamp -
Parameters:
  theCalendar - the Calendar to use in the conversion operation
throws:
  SQLException - if an error occurs accessing the database.



setTransactionIsolation
public void setTransactionIsolation(int level) throws SQLException(Code)
Updates the target instance's transaction isolation level to one of a discrete set of possible values.
Parameters:
  level - the new transaction isolation level. One of:Connection.TRANSACTION_READ_UNCOMMITTED,Connection.TRANSACTION_READ_COMMITTED,Connection.TRANSACTION_REPEATABLE_READ, orConnection.TRANSACTION_SERIALIZABLE
throws:
  SQLException - if an error occurs accessing the database.



setType
public void setType(int type) throws SQLException(Code)
Sets the type of this RowSet. By default, the type is non-scrollable.
Parameters:
  type - the new type for the RowSet. One of:ResultSet.TYPE_FORWARD_ONLY,ResultSet.TYPE_SCROLL_INSENSITIVE, orResultSet.TYPE_SCROLL_SENSITIVE
throws:
  SQLException - if an error occurs accessing the database.



setTypeMap
public void setTypeMap(Map<String, Class<?>> theTypeMap) throws SQLException(Code)
Sets the Map used to map SQL User Defined Types to Java classes.
Parameters:
  theTypeMap - a Map which defines the names of SQL UDTs and the Java classesto which they are mapped.
throws:
  SQLException - if an error occurs accessing the database.



setUrl
public void setUrl(String theURL) throws SQLException(Code)
Sets the URL used by this RowSet to access the database via a DriverManager. The URL is optional - an alternative is to use a Data Source Name to create a connection.
Parameters:
  theURL - a String containing the URL for the database. Can be null.
throws:
  SQLException - if an error occurs accessing the database.



setUsername
public void setUsername(String theUsername) throws SQLException(Code)
Sets the Username property for the RowSet, used to authenticate a connection to the database.
Parameters:
  theUsername - a String containing the User Name
throws:
  SQLException - if an error occurs accessing the database.



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