borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.dataset
borland.jbcl.dataset.SQLExtensions
Variables MethodsJDBC drivers can implement this interface for their java.sql.ResultSet implementations. Future extensions may be able to use this for other java.sql package objects. Currently, JBuilder only looks for these extensions off of java.sql.ResultSet.
This interface includes a method called extension(). New requests are added by adding a new functionCode/extraInfo pair. This avoids interface version issues. The following is an example code snippet of how JBuilder uses this interface:
if (resultSet instanceof SQLExtensions) {
// Code doesn't care if Date/Time/Timestamp/Date are single instance
// so don't need to record if its supported. //
SQLExtensions fast = (SQLExtensions)resultSet;
fast.extension(fast.SINGE_INSTANCE_TIME, null);
rightTrimStrings = !fast.extension(fast.RIGHT_TRIM_STRINGS, null);
if (fast.extension(fast.RESETABLE_STREAM, null))
copyStreams = false;
}
public final int RESETABLE_STREAMInstructs the driver to ensure that streams returned are repositionned at position 0 of a binary field value when the InputStream.reset() method is called. Also expects that there is a separate instance for each binary value returned. If driver uses ByteArrayInputStream, then it can return true. Return true if you support this. The extraInfo is always null.
public final int RIGHT_TRIM_STRINGSInstructs the driver to create String instances with extra spaces already removed from the end of the String. This releases you from having to reallocate a new String that is right trimmed. Return true from extension() if you support this. The extraInfo is always null.
public final int SINGLE_INSTANCE_TIMEInstructs the driver to reuse the same instance for Time, Date, and Timestamp data types. These instances aren't saved; by specifying this constant, you specify that you don't mind if they are reused. There are methods off of Time, Date, and Timestamp that can be used to reset thier values, for example, Time.setHour(), Time.setMinute(), Time.setSeconds() or Time.setTime(long). Return true from extension() if you can support this.
public boolean extension(int functionCode, java.lang.Object extraInfo)