Java Code Examples for java.sql.Types#NULL

The following examples show how to use java.sql.Types#NULL . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GfxdSubqueryResultSet.java    From gemfirexd-oss with Apache License 2.0 6 votes vote down vote up
@Override
public void transferDataValues(ParameterValueSet pvstarget)
    throws StandardException {
  GenericParameterValueSet gpvs = (GenericParameterValueSet)this.allPvs;
  int firstParam = pvstarget.hasReturnOutputParameter() ? 1 : 0;
  int paramSize = params.size();
  for (int i = firstParam; i < paramSize; i++) {
    GenericParameter oldp = gpvs.getGenericParameter(params.get(i)
        .intValue());
    if (oldp.getRegisterOutputType() != Types.NULL) {

      pvstarget.registerOutParameter(i, oldp.getRegisterOutputType(),
          oldp.getRegisterOutScale());

    }

    if (oldp.getIsSet()) {
      pvstarget.getParameterForSet(i).setValue(oldp.getValue());
    }
  }
}
 
Example 2
Source File: ParameterHint.java    From birt with Eclipse Public License 1.0 6 votes vote down vote up
int getEffectiveOdaType( String odaDataSourceId, String dataSetType )
{
    /* The BIRT DtE ODI data type specified in a parameter hint may be based on
     * what an user manually entered in BIRT host designer, and was not necessarily 
     * validated against an underlying ODA driver.
     * Whereas, the native data type in hint, if available, is provided by
     * a custom ODA designer.  It is thus a more reliable type to use in a retry.  
     * So we first try to use the native data type for the effective ODA data type. 
     */
    if( getNativeDataType() != UNKNOWN_NATIVE_TYPE )
    {
        int odaType = DataTypeUtil.toOdaType( getNativeDataType(),
                                            odaDataSourceId,
                                            dataSetType );
        if( odaType != Types.NULL )
            return odaType;     // found valid native to oda type mapping
    }
    
    // no native data type mapping info, use the BIRT DtE ODI API data type instead 
    Class typeInHint = getDataType();
    return DataTypeUtil.toOdaType( typeInHint );
}
 
Example 3
Source File: JdbcEntityDefinitionManager.java    From eagle with Apache License 2.0 5 votes vote down vote up
/**
 * Get corresponding SQL types for certain entity field class type
 *
 * @see java.sql.Types
 *
 * @param fieldType entity field type class
 * @return java.sql.Types, return Types.NULL if not found
 */
public static Integer getJdbcType(Class<?> fieldType) {
    if(fieldType == null){
        return Types.NULL;
    } else if(!_classJdbcType.containsKey(fieldType)){
        if(LOG.isDebugEnabled())
            LOG.debug("Unable to locate simple jdbc type for: {}, return type as JAVA_OBJECT",fieldType);
        return Types.JAVA_OBJECT;
    }
    return _classJdbcType.get(fieldType);
}
 
Example 4
Source File: PreparedStatement.java    From Komondor with GNU General Public License v3.0 5 votes vote down vote up
/**
 * In general, parameter values remain in force for repeated used of a
 * Statement. 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
 */
public void clearParameters() throws SQLException {
    synchronized (checkClosed().getConnectionMutex()) {

        for (int i = 0; i < this.parameterValues.length; i++) {
            this.parameterValues[i] = null;
            this.parameterStreams[i] = null;
            this.isStream[i] = false;
            this.isNull[i] = false;
            this.parameterTypes[i] = Types.NULL;
        }
    }
}
 
Example 5
Source File: SQLDataTypeUtility.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public static int toJDBCTypeCode( DataType varDataType )
{
    if( varDataType == null )
        return Types.NULL;  // unknown value 

    String varDataTypeName = varDataType.getName();
    if( varDataTypeName == null && varDataType instanceof PredefinedDataType )
    {
        varDataTypeName = 
            DataTypeHelper.getPrimitiveTypeName( ((PredefinedDataType) varDataType).getPrimitiveType() );
    }
    
    if( varDataTypeName != null )
    {
        int nativeTypeCode = DataTypeHelper.getJDBCTypeForNamedType( varDataTypeName );
        if( nativeTypeCode != 0 )   // has valid value
            return nativeTypeCode;
    }
                
    // covers native data type conversion not handled by DataTypeHelper
    if( varDataType instanceof PredefinedDataType )
    {
        int primitiveType = ((PredefinedDataType) varDataType).getPrimitiveType().getValue();
        switch( primitiveType )
        {
            case PrimitiveType.BOOLEAN :    return java.sql.Types.BOOLEAN;
            case PrimitiveType.FLOAT :      return java.sql.Types.FLOAT;
        }
        // TODO - handling of additional primitive JDBC data types
    }
    
    return Types.NULL;  // unknown value 
}
 
Example 6
Source File: SQLQueryUtility.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Process the parameter definition to handle special use, such as setting
 * a null native data type to a String by default.
 */
private static void adjustParameterDefinition( ParameterDefinition paramDefn )
{
    assert( paramDefn != null );
    DataElementAttributes paramAttributes = paramDefn.getAttributes();
    if( paramAttributes == null )
        return;     // no attributes to adjust

    if( paramAttributes.getNativeDataTypeCode( ) == Types.NULL )
        paramAttributes.setNativeDataTypeCode( Types.CHAR );  // default data type

    // a SQL Select Query parameter cannot be null
    if( paramAttributes.allowsNull() )
        paramAttributes.setNullability( ElementNullability.NOT_NULLABLE_LITERAL );
}
 
Example 7
Source File: Apiary.java    From validatar with Apache License 2.0 5 votes vote down vote up
/**
 * Takes a value and its type and returns it as the appropriate TypedObject.
 *
 * @param results The ResultSet that has a confirmed value for reading by its iterator.
 * @param index   The index of the column in the results to get.
 * @param type    The java.sql.TypesSQL type of the value.
 * @return A non-null TypedObject representation of the value or null if the result was null.
 * @throws java.sql.SQLException if any.
 */
TypedObject getAsTypedObject(ResultSet results, int index, int type) throws SQLException {
    if (results.getObject(index) == null || results.wasNull()) {
        return null;
    }

    TypedObject toReturn;
    switch (type) {
        case (Types.DATE):
        case (Types.CHAR):
        case (Types.VARCHAR):
            toReturn = TypeSystem.asTypedObject(results.getString(index));
            break;
        case (Types.FLOAT):
        case (Types.DOUBLE):
            toReturn = TypeSystem.asTypedObject(results.getDouble(index));
            break;
        case (Types.BOOLEAN):
            toReturn = TypeSystem.asTypedObject(results.getBoolean(index));
            break;
        case (Types.TINYINT):
        case (Types.SMALLINT):
        case (Types.INTEGER):
        case (Types.BIGINT):
            toReturn = TypeSystem.asTypedObject(results.getLong(index));
            break;
        case (Types.DECIMAL):
            toReturn = TypeSystem.asTypedObject(results.getBigDecimal(index));
            break;
        case (Types.TIMESTAMP):
            toReturn = TypeSystem.asTypedObject(results.getTimestamp(index));
            break;
        case (Types.NULL):
            toReturn = null;
            break;
        default:
            throw new UnsupportedOperationException("Unknown SQL type encountered from Hive: " + type);
    }
    return toReturn;
}
 
Example 8
Source File: ParameterMetaData.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Returns the ODA type code of this parameter.
 * @return	the ODA data type of this parameter.
 */
public int getDataType()
{
	// if this is still an unknown parameter type, that means there were 
	// no hints or the hints didn't provide a data type.  so default to 
	// the ODA character type
	return ( m_dataType == Types.NULL ) ? Types.CHAR : m_dataType;
}
 
Example 9
Source File: FBNullFieldTest.java    From jaybird with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Before
public void setUp() throws Exception {
    fieldData = context.mock(FieldDataProvider.class);
    FieldDescriptor fieldDescriptor = new RowDescriptorBuilder(1, defaultDatatypeCoder).toFieldDescriptor();
    field = new FBNullField(fieldDescriptor, fieldData, Types.NULL);
}
 
Example 10
Source File: Converters.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
/**
 * Get {@link GFXDType} for given JDBC {@link Types}.
 */
public static GFXDType getThriftSQLType(int jdbcType) {
  switch (jdbcType) {
    case Types.ARRAY:
      return GFXDType.ARRAY;
    case Types.BIGINT:
      return GFXDType.BIGINT;
    case Types.BINARY:
      return GFXDType.BINARY;
    case Types.BIT:
      return GFXDType.BOOLEAN;
    case Types.BLOB:
      return GFXDType.BLOB;
    case Types.BOOLEAN:
      return GFXDType.BOOLEAN;
    case Types.CHAR:
      return GFXDType.CHAR;
    case Types.CLOB:
      return GFXDType.CLOB;
    case Types.DATALINK:
      return GFXDType.DATALINK;
    case Types.DATE:
      return GFXDType.DATE;
    case Types.DECIMAL:
      return GFXDType.DECIMAL;
    case Types.DISTINCT:
      return GFXDType.DISTINCT;
    case Types.DOUBLE:
      return GFXDType.DOUBLE;
    case Types.FLOAT:
      return GFXDType.FLOAT;
    case Types.INTEGER:
      return GFXDType.INTEGER;
    case Types.JAVA_OBJECT:
      return GFXDType.JAVA_OBJECT;
    case TYPE_JSON_OBJECT:
      return GFXDType.JSON_OBJECT;
    case Types.LONGNVARCHAR:
      return GFXDType.LONGNVARCHAR;
    case Types.LONGVARBINARY:
      return GFXDType.LONGVARBINARY;
    case Types.LONGVARCHAR:
      return GFXDType.LONGVARCHAR;
    case Types.NCHAR:
      return GFXDType.NCHAR;
    case Types.NCLOB:
      return GFXDType.NCLOB;
    case Types.NULL:
      return GFXDType.NULLTYPE;
    case Types.NUMERIC:
      return GFXDType.DECIMAL;
    case Types.NVARCHAR:
      return GFXDType.NVARCHAR;
    case Types.OTHER:
      return GFXDType.OTHER;
    case TYPE_PDX_OBJECT:
      return GFXDType.PDX_OBJECT;
    case Types.REAL:
      return GFXDType.REAL;
    case Types.REF:
      return GFXDType.REF;
    case Types.ROWID:
      return GFXDType.ROWID;
    case Types.SMALLINT:
      return GFXDType.SMALLINT;
    case Types.SQLXML:
      return GFXDType.SQLXML;
    case Types.STRUCT:
      return GFXDType.STRUCT;
    case Types.TIME:
      return GFXDType.TIME;
    case Types.TIMESTAMP:
      return GFXDType.TIMESTAMP;
    case Types.TINYINT:
      return GFXDType.TINYINT;
    case Types.VARBINARY:
      return GFXDType.VARBINARY;
    case Types.VARCHAR:
      return GFXDType.VARCHAR;
    default:
      return GFXDType.OTHER;
  }
}
 
Example 11
Source File: DatabaseStatement.java    From sndml3 with MIT License 4 votes vote down vote up
private static String sqlTypeName(int sqltype) {
	switch (sqltype) {
		case Types.ARRAY:         return "ARRAY";
		case Types.BIGINT:        return "BIGINT";
		case Types.BINARY:        return "BINARY";
		case Types.BIT:           return "BIT";
		case Types.BLOB:          return "BLOB";
		case Types.BOOLEAN:       return "BOOLEAN";
		case Types.CHAR:          return "CHAR";
		case Types.CLOB:          return "CLOB";
		case Types.DATALINK:      return "DATALINK";
		case Types.DATE:          return "DATE";
		case Types.DECIMAL:       return "DECIMAL";
		case Types.DISTINCT:      return "DISTINCT";
		case Types.DOUBLE:        return "DOUBLE";
		case Types.FLOAT:         return "FLOAT";
		case Types.INTEGER:       return "INTEGER";
		case Types.JAVA_OBJECT:   return "JAVA_OBJECT";
		case Types.LONGNVARCHAR:  return "LONGNVARCHAR";
		case Types.LONGVARBINARY: return "LONGVARBINARY";
		case Types.LONGVARCHAR:   return "LONGVARCHAR";
		case Types.NCHAR:         return "NCHAR";
		case Types.NCLOB:         return "NCLOB";
		case Types.NULL:          return "NULL";
		case Types.NUMERIC:       return "NUMERIC";
		case Types.NVARCHAR:      return "NVARCHAR";
		case Types.OTHER:         return "OTHER";
		case Types.REAL:          return "REAL";
		case Types.REF:           return "REF";
		case Types.ROWID:         return "ROWID";
		case Types.SMALLINT:      return "SMALLINT";
		case Types.SQLXML:        return "SQLXML";
		case Types.STRUCT:        return "STRUCT";
		case Types.TIME:          return "TIME";
		case Types.TIMESTAMP:     return "TIMESTAMP";
		case Types.TINYINT:       return "TINYINT";
		case Types.VARBINARY:     return "VARBINARY";
		case Types.VARCHAR:       return "VARCHAR";
		default: return Integer.toString(sqltype);
	}
}
 
Example 12
Source File: PhoenixResultSetMetaData.java    From phoenix with Apache License 2.0 4 votes vote down vote up
@Override
public int getColumnType(int column) throws SQLException {
    PDataType type = rowProjector.getColumnProjector(column-1).getExpression().getDataType();
    return type == null ? Types.NULL : type.getResultSetSqlType();
}
 
Example 13
Source File: PrestoPreparedStatement.java    From presto with Apache License 2.0 4 votes vote down vote up
private static String typedNull(int targetSqlType)
        throws SQLException
{
    switch (targetSqlType) {
        case Types.BOOLEAN:
        case Types.BIT:
            return typedNull("BOOLEAN");
        case Types.TINYINT:
            return typedNull("TINYINT");
        case Types.SMALLINT:
            return typedNull("SMALLINT");
        case Types.INTEGER:
            return typedNull("INTEGER");
        case Types.BIGINT:
            return typedNull("BIGINT");
        case Types.FLOAT:
        case Types.REAL:
            return typedNull("REAL");
        case Types.DOUBLE:
            return typedNull("DOUBLE");
        case Types.DECIMAL:
        case Types.NUMERIC:
            return typedNull("DECIMAL");
        case Types.CHAR:
        case Types.NCHAR:
            return typedNull("CHAR");
        case Types.VARCHAR:
        case Types.NVARCHAR:
        case Types.LONGVARCHAR:
        case Types.LONGNVARCHAR:
        case Types.CLOB:
        case Types.NCLOB:
            return typedNull("VARCHAR");
        case Types.BINARY:
        case Types.VARBINARY:
        case Types.LONGVARBINARY:
        case Types.BLOB:
            return typedNull("VARBINARY");
        case Types.DATE:
            return typedNull("DATE");
        case Types.TIME:
            return typedNull("TIME");
        case Types.TIMESTAMP:
            return typedNull("TIMESTAMP");
        // TODO Types.TIME_WITH_TIMEZONE
        // TODO Types.TIMESTAMP_WITH_TIMEZONE
        case Types.NULL:
            return "NULL";
    }
    throw new SQLException("Unsupported target SQL type: " + targetSqlType);
}
 
Example 14
Source File: CubaPostgreSQLPlatform.java    From cuba with Apache License 2.0 4 votes vote down vote up
@Override
public int getJDBCTypeForSetNull(DatabaseField field) {
    return Types.NULL;
}
 
Example 15
Source File: JDBCTypeMapper.java    From Knowage-Server with GNU Affero General Public License v3.0 4 votes vote down vote up
public static Class getJavaType(short jdbcType) {
	switch (jdbcType) {
	case Types.ARRAY:
		return java.sql.Array.class;
	case Types.BIGINT:
		return java.lang.Long.class;
	case Types.BINARY:
		return java.lang.Byte[].class;
	case Types.BIT:
		return java.lang.Boolean.class;
	case Types.BLOB:
		return java.sql.Blob.class;
	case Types.CHAR:
		return java.lang.String.class;
	case Types.CLOB:
		return java.sql.Clob.class;
	case Types.DATE:
		return java.sql.Date.class;
	case Types.DECIMAL:
		return java.math.BigDecimal.class;
	case Types.DISTINCT:
		return java.lang.Object.class;
	case Types.DOUBLE:
		return java.lang.Double.class;
	case Types.FLOAT:
		return java.lang.Double.class;
	case Types.INTEGER:
		return java.lang.Integer.class;
	case Types.JAVA_OBJECT:
		return java.lang.Object.class;
	case Types.LONGVARBINARY:
		return java.lang.Byte[].class;
	case Types.LONGVARCHAR:
		return java.lang.String.class;
	case Types.NULL:
		return java.lang.Object.class;
	case Types.NUMERIC:
		return java.math.BigDecimal.class;
	case Types.OTHER:
		return java.lang.Object.class;
	case Types.REAL:
		return java.lang.Float.class;
	case Types.REF:
		return java.sql.Ref.class;
	case Types.SMALLINT:
		return java.lang.Short.class;
	case Types.STRUCT:
		return java.sql.Struct.class;
	case Types.TIME:
		return java.sql.Time.class;
	case Types.TIMESTAMP:
		return java.sql.Timestamp.class;
	case Types.TINYINT:
		return java.lang.Byte.class;
	case Types.VARBINARY:
		return java.lang.Byte[].class;
	case Types.VARCHAR:
		return java.lang.String.class;
	default:
		return null;
	}
}
 
Example 16
Source File: DataTypeUtil.java    From birt with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * Converts an ODA data type code to the Java class
 * of its corresponding Data Engine ODI data type. <br><br>
 * <b>ODA Data Type -> ODI Type Class</b><br>
 * <i>Integer -> java.lang.Integer<br>
 * Double -> java.lang.Double<br>
 * Character -> java.lang.String<br>
 * Decimal -> java.math.BigDecimal<br>
 * Date -> java.sql.Date<br>
 * Time -> java.sql.Time<br>
 * Timestamp -> java.sql.Timestamp<br>
 * Blob -> java.sql.Blob<br>
 * Clob -> java.sql.Clob<br>
    * Boolean -> java.lang.Boolean<br>
    * JavaObject -> java.lang.Object<br>
    * </i>
 * @param odaDataTypeCode   an ODA data type code
 * @return  the ODI type class that corresponds with 
 *          the specified ODA data type
 * @throws BirtException if the specified ODA data type is not a supported type
 */
public static Class toOdiTypeClass( int odaDataTypeCode )
		throws BirtException
{
	if ( odaDataTypeCode != Types.CHAR
			&& odaDataTypeCode != Types.INTEGER
			&& odaDataTypeCode != Types.DOUBLE
			&& odaDataTypeCode != Types.DECIMAL
			&& odaDataTypeCode != Types.DATE
			&& odaDataTypeCode != Types.TIME
			&& odaDataTypeCode != Types.TIMESTAMP
			&& odaDataTypeCode != Types.BLOB
			&& odaDataTypeCode != Types.CLOB
               && odaDataTypeCode != Types.BOOLEAN
               && odaDataTypeCode != Types.JAVA_OBJECT
			&& odaDataTypeCode != Types.NULL )
	{
		throw new CoreException( ResourceConstants.INVALID_TYPE);
	}

	Class fieldClass = null;
	switch ( odaDataTypeCode )
	{
		case Types.CHAR :
			fieldClass = String.class;
			break;

		case Types.INTEGER :
			fieldClass = Integer.class;
			break;

		case Types.DOUBLE :
			fieldClass = Double.class;
			break;

		case Types.DECIMAL :
			fieldClass = BigDecimal.class;
			break;

		case Types.DATE :
			fieldClass = java.sql.Date.class;
			break;

		case Types.TIME :
			fieldClass = Time.class;
			break;

		case Types.TIMESTAMP :
			fieldClass = Timestamp.class;
			break;

		case Types.BLOB :
			fieldClass = Blob.class;
			break;

		case Types.CLOB :
			fieldClass = Clob.class;
			break;

           case Types.BOOLEAN :
               fieldClass = Boolean.class;
               break;

           case Types.JAVA_OBJECT :
               fieldClass = Object.class;
               break;

		case Types.NULL :
			fieldClass = null;
			break;
	}

	return fieldClass;
}
 
Example 17
Source File: SqlTypeToClass.java    From DataDefender with Apache License 2.0 4 votes vote down vote up
public Class getTypeFrom(int type) {
    switch (type) {
        case Types.CHAR:
        case Types.VARCHAR:
        case Types.LONGVARCHAR:
        case Types.NCHAR:
        case Types.NVARCHAR:
        case Types.LONGNVARCHAR:
            return String.class;
        case Types.BINARY:
        case Types.VARBINARY:
        case Types.LONGVARBINARY:
            return Byte[].class;
        case Types.NUMERIC:
        case Types.DECIMAL:
            return BigDecimal.class;
        case Types.BIT:
            return Boolean.class;
        case Types.TINYINT:
        case Types.SMALLINT:
            return Short.class;
        case Types.INTEGER:
            return Integer.class;
        case Types.BIGINT:
            return Long.class;
        case Types.REAL:
            return Float.class;
        case Types.FLOAT:
        case Types.DOUBLE:
            return Double.class;
        case Types.DATE:
            return Date.class;
        case Types.TIME:
            return Time.class;
        case Types.TIMESTAMP:
            return Timestamp.class;
        case Types.BLOB:
            return Blob.class;
        case Types.CLOB:
            return Clob.class;
        case Types.ARRAY:
            return Array.class;
        case Types.NULL:
            return null;
        default:
            throw new IllegalArgumentException("Unsupported or unknown type");
    }
}
 
Example 18
Source File: DataTypeUtils.java    From nifi with Apache License 2.0 4 votes vote down vote up
/**
 * Converts the specified field data type into a java.sql.Types constant (INTEGER = 4, e.g.)
 *
 * @param dataType the DataType to be converted
 * @return the SQL type corresponding to the specified RecordFieldType
 */
public static int getSQLTypeValue(final DataType dataType) {
    if (dataType == null) {
        return Types.NULL;
    }
    RecordFieldType fieldType = dataType.getFieldType();
    switch (fieldType) {
        case BIGINT:
        case LONG:
            return Types.BIGINT;
        case BOOLEAN:
            return Types.BOOLEAN;
        case BYTE:
            return Types.TINYINT;
        case CHAR:
            return Types.CHAR;
        case DATE:
            return Types.DATE;
        case DOUBLE:
            return Types.DOUBLE;
        case FLOAT:
            return Types.FLOAT;
        case DECIMAL:
            return Types.NUMERIC;
        case INT:
            return Types.INTEGER;
        case SHORT:
            return Types.SMALLINT;
        case STRING:
            return Types.VARCHAR;
        case TIME:
            return Types.TIME;
        case TIMESTAMP:
            return Types.TIMESTAMP;
        case ARRAY:
            return Types.ARRAY;
        case MAP:
        case RECORD:
            return Types.STRUCT;
        case CHOICE:
            throw new IllegalTypeConversionException("Cannot convert CHOICE, type must be explicit");
        default:
            throw new IllegalTypeConversionException("Cannot convert unknown type " + fieldType.name());
    }
}
 
Example 19
Source File: PreparedStatement.java    From Komondor with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Set a parameter to SQL NULL.
 * 
 * <P>
 * <B>Note:</B> You must specify the parameter's SQL type.
 * </p>
 * 
 * @param parameterIndex
 *            the first parameter is 1, the second is 2, ...
 * @param sqlType
 *            SQL type code defined by java.sql.Types
 * @param arg
 *            argument parameters for null
 * 
 * @exception SQLException
 *                if a database-access error occurs.
 */
public void setNull(int parameterIndex, int sqlType, String arg) throws SQLException {
    setNull(parameterIndex, sqlType);

    this.parameterTypes[parameterIndex - 1 + getParameterIndexOffset()] = Types.NULL;
}
 
Example 20
Source File: PreparedStatement.java    From r-course with MIT License 2 votes vote down vote up
/**
 * Set a parameter to SQL NULL.
 * 
 * <P>
 * <B>Note:</B> You must specify the parameter's SQL type.
 * </p>
 * 
 * @param parameterIndex
 *            the first parameter is 1, the second is 2, ...
 * @param sqlType
 *            SQL type code defined by java.sql.Types
 * @param arg
 *            argument parameters for null
 * 
 * @exception SQLException
 *                if a database-access error occurs.
 */
public void setNull(int parameterIndex, int sqlType, String arg) throws SQLException {
    setNull(parameterIndex, sqlType);

    this.parameterTypes[parameterIndex - 1 + getParameterIndexOffset()] = Types.NULL;
}