com.ibm.as400.access
Class AS400JDBCRowId

java.lang.Object
  extended by com.ibm.as400.access.AS400JDBCRowId
All Implemented Interfaces:
RowId

public class AS400JDBCRowId
extends Object
implements RowId


Method Summary
 boolean equals(Object obj)
          Compares this RowId to the specified object.
 byte[] getBytes()
          Returns an array of bytes representing the value of the SQL ROWID designated by this java.sql.RowId object.
 int hashCode()
          Returns a hash code value of this RowId object.
 String toString()
          Returns a String representing the value of the SQL ROWID designated by this java.sql.RowId object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

equals

public boolean equals(Object obj)
Compares this RowId to the specified object. The result is true if and only if the argument is not null and is a RowId object that represents the same ROWID as this object.

It is important to consider both the origin and the valid lifetime of a RowId when comparing it to another RowId. If both are valid, and both are from the same table on the same data source, then if they are equal they identify the same row; if one or more is no longer guaranteed to be valid, or if they originate from different data sources, or different tables on the same data source, they may be equal but still not identify the same row.

Specified by:
equals in interface RowId
Overrides:
equals in class Object
Parameters:
obj - the Object to compare this RowId object against.
Returns:
true if the RowIds are equal; false otherwise

getBytes

public byte[] getBytes()
Returns an array of bytes representing the value of the SQL ROWID designated by this java.sql.RowId object.

Specified by:
getBytes in interface RowId
Returns:
an array of bytes, whose length is determined by the driver supplying the connection, representing the value of the ROWID designated by this java.sql.RowId object.

toString

public String toString()
Returns a String representing the value of the SQL ROWID designated by this java.sql.RowId object.

Like java.sql.Date.toString() returns the contents of its DATE as the String "2004-03-17" rather than as DATE literal in SQL (which would have been the String DATE "2004-03-17"), toString() returns the contents of its ROWID in a form specific to the driver supplying the connection, and possibly not as a ROWID literal. Toolbox converts RowId bytes to HEX string format.

Specified by:
toString in interface RowId
Overrides:
toString in class Object
Returns:
a String whose format is determined by the driver supplying the connection, representing the value of the ROWID designated by this java.sql.RowId object.

hashCode

public int hashCode()
Returns a hash code value of this RowId object.

Specified by:
hashCode in interface RowId
Overrides:
hashCode in class Object
Returns:
a hash code for the RowId