com.simba.dsi.dataengine.utilities
Class DSITypeUtilities

java.lang.Object
  extended by com.simba.dsi.dataengine.utilities.DSITypeUtilities

public class DSITypeUtilities
extends java.lang.Object


Constructor Summary
DSITypeUtilities()
           
 
Method Summary
static boolean outputBinary(byte[] value, DataWrapper retrievedData, long offset, long maxSize)
          Writes the given SQL_BINARY value in the given data wrapper.
static boolean outputBytes(byte[] value, DataWrapper retrievedData, long offset, long maxSize, int sqlType)
          Writes the given byte[] value in the given data wrapper.
static boolean outputCharStringData(java.lang.String value, DataWrapper retrievedData, long charOffset, long maxChars)
          Writes the given SQL_CHAR value in the given data wrapper.
static boolean outputLongVarBinary(byte[] value, DataWrapper retrievedData, long offset, long maxSize)
          Writes the given SQL_VARBINARY value in the given data wrapper.
static boolean outputLongVarCharStringData(java.lang.String value, DataWrapper retrievedData, long charOffset, long maxChars)
          Writes the given SQL_LONGVARCHAR value in the given data wrapper.
static boolean outputString(java.lang.String value, DataWrapper retrievedData, long charOffset, long maxChars, int sqlType)
          Writes the given string value in the given data wrapper.
static boolean outputVarBinary(byte[] value, DataWrapper retrievedData, long offset, long maxSize)
          Writes the given SQL_VARBINARY value in the given data wrapper.
static boolean outputVarCharStringData(java.lang.String value, DataWrapper retrievedData, long charOffset, long maxChars)
          Writes the given SQL_VARCHAR value in the given data wrapper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DSITypeUtilities

public DSITypeUtilities()
Method Detail

outputCharStringData

public static boolean outputCharStringData(java.lang.String value,
                                           DataWrapper retrievedData,
                                           long charOffset,
                                           long maxChars)
Writes the given SQL_CHAR value in the given data wrapper.

Parameters:
value - The string to write to retrievedData.
retrievedData - The data wrapper which must be initialized by the given string value.
charOffset - Number of characters to skip in value before copying to retrievedData.
maxChars - The maximum number of characters to retrieve. IResultSet.RETRIEVE_ALL_DATA if all data should be written.
Returns:
true if there's more data left in value to write; false otherwise;

outputVarCharStringData

public static boolean outputVarCharStringData(java.lang.String value,
                                              DataWrapper retrievedData,
                                              long charOffset,
                                              long maxChars)
Writes the given SQL_VARCHAR value in the given data wrapper.

Parameters:
value - The string to write to retrievedData.
retrievedData - The data wrapper which must be initialized by the given string value.
charOffset - Number of characters to skip in value before copying to retrievedData.
maxChars - The maximum number of characters to retrieve. IResultSet.RETRIEVE_ALL_DATA if all data should be written.
Returns:
true if there's more data left in value to write; false otherwise;

outputLongVarCharStringData

public static boolean outputLongVarCharStringData(java.lang.String value,
                                                  DataWrapper retrievedData,
                                                  long charOffset,
                                                  long maxChars)
Writes the given SQL_LONGVARCHAR value in the given data wrapper.

Parameters:
value - The string to write to retrievedData.
retrievedData - The data wrapper which must be initialized by the given string value.
charOffset - Number of characters to skip in value before copying to retrievedData.
maxChars - The maximum number of characters to retrieve. IResultSet.RETRIEVE_ALL_DATA if all data should be written.
Returns:
true if there's more data left in value to write; false otherwise;

outputBinary

public static boolean outputBinary(byte[] value,
                                   DataWrapper retrievedData,
                                   long offset,
                                   long maxSize)
Writes the given SQL_BINARY value in the given data wrapper.

Parameters:
value - The binary data to write to retrievedData.
retrievedData - The data wrapper which must be initialized by the given binary value.
offset - Number of bytes to skip in value before copying to retrievedData.
maxSize - The maximum number of bytes to retrieve. IResultSet.RETRIEVE_ALL_DATA if all data should be written.
Returns:
true if there's more data left in value to write; false otherwise;

outputVarBinary

public static boolean outputVarBinary(byte[] value,
                                      DataWrapper retrievedData,
                                      long offset,
                                      long maxSize)
Writes the given SQL_VARBINARY value in the given data wrapper.

Parameters:
value - The binary data to write to retrievedData.
retrievedData - The data wrapper which must be initialized by the given binary value.
offset - Number of bytes to skip in value before copying to retrievedData.
maxSize - The maximum number of bytes to retrieve. IResultSet.RETRIEVE_ALL_DATA if all data should be written.
Returns:
true if there's more data left in value to write; false otherwise;

outputLongVarBinary

public static boolean outputLongVarBinary(byte[] value,
                                          DataWrapper retrievedData,
                                          long offset,
                                          long maxSize)
Writes the given SQL_VARBINARY value in the given data wrapper.

Parameters:
value - The binary data to write to retrievedData.
retrievedData - The data wrapper which must be initialized by the given binary value.
offset - Number of bytes to skip in value before copying to retrievedData.
maxSize - The maximum number of bytes to retrieve. IResultSet.RETRIEVE_ALL_DATA if all data should be written.
Returns:
true if there's more data left in value to write; false otherwise;

outputString

public static boolean outputString(java.lang.String value,
                                   DataWrapper retrievedData,
                                   long charOffset,
                                   long maxChars,
                                   int sqlType)
                            throws IncorrectTypeException
Writes the given string value in the given data wrapper.

Parameters:
value - The string to write to retrievedData.
retrievedData - The data wrapper which must be initialized by the given string value.
charOffset - Number of characters to skip in value before copying to retrievedData.
maxChars - The maximum number of characters to retrieve. IResultSet.RETRIEVE_ALL_DATA if all data should be written.
sqlType - The sqlType to set the wrapper as. Should be one of SQL_(W)CHAR, SQL_(W)VARCHAR, and SQL_(W)LONGVARCHAR.
Returns:
true if there's more data left in value to write; false otherwise;
Throws:
IncorrectTypeException

outputBytes

public static boolean outputBytes(byte[] value,
                                  DataWrapper retrievedData,
                                  long offset,
                                  long maxSize,
                                  int sqlType)
                           throws IncorrectTypeException
Writes the given byte[] value in the given data wrapper.

Parameters:
value - The binary data to write to retrievedData.
retrievedData - The data wrapper which must be initialized by the given binary value.
offset - Number of bytes to skip in value before copying to retrievedData.
maxSize - The maximum number of bytes to retrieve. IResultSet.RETRIEVE_ALL_DATA if all data should be written.
sqlType - The sqlType to set the wrapper as. Should be one of SQL_BINARY, SQL_VARBINARY, and SQL_LONGVARBINARY.
Returns:
true if there's more data left in value to write; false otherwise;
Throws:
IncorrectTypeException - if sqlType is not one of SQL_BINARY, SQL_VARBINARY, and SQL_LONGVARBINARY.


Copyright © 2006-2014 Simba Technologies Incorporated. All Rights Reserved.