Example usage for java.sql ResultSet wasNull

List of usage examples for java.sql ResultSet wasNull

Introduction

In this page you can find the example usage for java.sql ResultSet wasNull.

Prototype

boolean wasNull() throws SQLException;

Source Link

Document

Reports whether the last column read had a value of SQL NULL.

Usage

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskMySql.CFAsteriskMySqlSchema.java

public static BigDecimal getNullableUInt64(ResultSet reader, int colidx) {
    try {//  ww w.  jav  a  2 s.co m
        String strval = reader.getString(colidx);
        if (reader.wasNull() || (strval == null) || (strval.length() <= 0)) {
            return (null);
        } else {
            BigDecimal retval = new BigDecimal(strval);
            return (retval);
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFAsteriskMySqlSchema.class,
                "getNullableUInt64", e);
    }
}

From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_1.CFFswMySql.CFFswMySqlSchema.java

public static Integer getNullableInt32(ResultSet reader, int colidx) {
    try {// w w  w .j av  a 2s  .  c om
        int val = reader.getInt(colidx);
        if (reader.wasNull()) {
            return (null);
        } else {
            return (new Integer(val));
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFFswMySqlSchema.class, "getNullableInt32", e);
    }
}

From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_1.CFFswMySql.CFFswMySqlSchema.java

public static Integer getNullableUInt16(ResultSet reader, int colidx) {
    try {//from  w  w  w  .  j  av  a  2s  .  com
        int val = reader.getInt(colidx);
        if (reader.wasNull()) {
            return (null);
        } else {
            return (new Integer(val));
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFFswMySqlSchema.class, "getNullableUInt16", e);
    }
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccPgSql.CFAccPgSqlSchema.java

public static String getNullableString(ResultSet reader, int colidx) {
    try {//from   ww  w  .ja va 2  s  .c  om
        String val = reader.getString(colidx);
        if (reader.wasNull()) {
            return (null);
        } else {
            return (val);
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFAccPgSqlSchema.class, "getNullableString", e);
    }
}

From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxMSSql.CFEnSyntaxMSSqlSchema.java

public static Integer getNullableInt32(ResultSet reader, int colidx) {
    try {//from   w  w w  . ja v a2s .c  om
        int val = reader.getInt(colidx);
        if (reader.wasNull()) {
            return (null);
        } else {
            return (new Integer(val));
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFEnSyntaxMSSqlSchema.class, "getNullableInt32",
                e);
    }
}

From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxMSSql.CFEnSyntaxMSSqlSchema.java

public static Integer getNullableUInt16(ResultSet reader, int colidx) {
    try {/*from   ww  w. j  a v a  2 s.  c  o m*/
        int val = reader.getInt(colidx);
        if (reader.wasNull()) {
            return (null);
        } else {
            return (new Integer(val));
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFEnSyntaxMSSqlSchema.class,
                "getNullableUInt16", e);
    }
}

From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_1.CFFswMySql.CFFswMySqlSchema.java

public static Long getNullableUInt32(ResultSet reader, int colidx) {
    try {//  w  w w .  java 2s . c  o m
        long val = reader.getLong(colidx);
        if (reader.wasNull()) {
            return (null);
        } else {
            return (new Long(val));
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFFswMySqlSchema.class, "getNullableUInt32", e);
    }
}

From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_1.CFFswMySql.CFFswMySqlSchema.java

public static Byte getNullableByte(ResultSet reader, int colidx) {
    try {/*from  w ww .  j  a  v  a  2  s.c  om*/
        byte val = reader.getByte(colidx);
        if (reader.wasNull()) {
            return (null);
        } else {
            return (new Byte(val));
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFFswMySqlSchema.class, "getNullableByte", e);
    }
}

From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxMSSql.CFEnSyntaxMSSqlSchema.java

public static Long getNullableUInt32(ResultSet reader, int colidx) {
    try {//from  ww w  . j av a2s. co  m
        long val = reader.getLong(colidx);
        if (reader.wasNull()) {
            return (null);
        } else {
            return (new Long(val));
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFEnSyntaxMSSqlSchema.class,
                "getNullableUInt32", e);
    }
}

From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxMSSql.CFEnSyntaxMSSqlSchema.java

public static Byte getNullableByte(ResultSet reader, int colidx) {
    try {//from   w  ww .  j ava  2  s .c  o m
        byte val = reader.getByte(colidx);
        if (reader.wasNull()) {
            return (null);
        } else {
            return (new Byte(val));
        }
    } catch (SQLException e) {
        throw CFLib.getDefaultExceptionFactory().newDbException(CFEnSyntaxMSSqlSchema.class, "getNullableByte",
                e);
    }
}