List of usage examples for java.sql ResultSet wasNull
boolean wasNull() throws SQLException;
NULL
. From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccOracle.CFAccOracleSchema.java
public static Long getNullableUInt32(ResultSet reader, int colidx) { try {//from w ww. j a v a2 s. 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(CFAccOracleSchema.class, "getNullableUInt32", e); } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskMSSql.CFAsteriskMSSqlSchema.java
public static Long getNullableUInt32(ResultSet reader, int colidx) { try {/*from w w w .jav a 2 s . com*/ long val = reader.getLong(colidx); if (reader.wasNull()) { return (null); } else { return (new Long(val)); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(CFAsteriskMSSqlSchema.class, "getNullableUInt32", e); } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskMSSql.CFAsteriskMSSqlSchema.java
public static Byte getNullableByte(ResultSet reader, int colidx) { try {/*from w ww . j av 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(CFAsteriskMSSqlSchema.class, "getNullableByte", e); } }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccOracle.CFAccOracleSchema.java
public static Short getNullableInt16(ResultSet reader, int colidx) { try {/*from w ww .j a v a 2 s.c om*/ short val = reader.getShort(colidx); if (reader.wasNull()) { return (null); } else { return (new Short(val)); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(CFAccOracleSchema.class, "getNullableInt64", e); } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskMSSql.CFAsteriskMSSqlSchema.java
public static Short getNullableInt16(ResultSet reader, int colidx) { try {/*from w w w . ja v a 2s .c o m*/ short val = reader.getShort(colidx); if (reader.wasNull()) { return (null); } else { return (new Short(val)); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(CFAsteriskMSSqlSchema.class, "getNullableInt64", e); } }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccOracle.CFAccOracleSchema.java
public static String getNullableString(ResultSet reader, int colidx) { try {/*from ww w. j a v a2 s . c o m*/ String val = reader.getString(colidx); if (reader.wasNull()) { return (null); } else { return (val); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(CFAccOracleSchema.class, "getNullableString", e); } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskMSSql.CFAsteriskMSSqlSchema.java
public static String getNullableString(ResultSet reader, int colidx) { try {/*from w w w .jav a 2s .c om*/ String val = reader.getString(colidx); if (reader.wasNull()) { return (null); } else { return (val); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(CFAsteriskMSSqlSchema.class, "getNullableString", e); } }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccOracle.CFAccOracleSchema.java
public static BigDecimal getNullableUInt64(ResultSet reader, int colidx) { try {/*from w w 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(CFAccOracleSchema.class, "getNullableUInt64", e); } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskMSSql.CFAsteriskMSSqlSchema.java
public static BigDecimal getNullableUInt64(ResultSet reader, int colidx) { try {/*from www . j a v a2 s .com*/ 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(CFAsteriskMSSqlSchema.class, "getNullableUInt64", e); } }
From source file:de.static_interface.reallifeplugin.module.contract.database.table.ContractUserOptionsTable.java
@Override public ContractUserOptionsRow[] deserialize(ResultSet rs) throws SQLException { int rowcount = 0; if (rs.last()) { rowcount = rs.getRow();// w ww . ja v a 2s .c o m rs.beforeFirst(); } ContractUserOptionsRow[] rows = new ContractUserOptionsRow[rowcount]; int i = 0; while (rs.next()) { ContractUserOptionsRow row = new ContractUserOptionsRow(); if (hasColumn(rs, "id")) { row.id = rs.getInt("id"); } if (hasColumn(rs, "user_id")) { row.userId = rs.getInt("userId"); } if (hasColumn(rs, "contract_id")) { row.contractId = rs.getInt("contract_id"); } if (hasColumn(rs, "isCreator")) { row.isCreator = rs.getBoolean("isCreator"); } if (hasColumn(rs, "money")) { row.money = rs.getDouble("money"); if (rs.wasNull()) { row.money = null; } } rows[i] = row; i++; } return rows; }