List of usage examples for java.sql ResultSet wasNull
boolean wasNull() throws SQLException;
NULL
. From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskPgSql.CFAsteriskPgSqlSchema.java
public static Long getNullableUInt32(ResultSet reader, int colidx) { try {//from www. 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(CFAsteriskPgSqlSchema.class, "getNullableUInt32", e); } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskPgSql.CFAsteriskPgSqlSchema.java
public static Byte getNullableByte(ResultSet reader, int colidx) { try {/*from w w w. j av a2 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(CFAsteriskPgSqlSchema.class, "getNullableByte", e); } }
From source file:ru.org.linux.edithistory.EditHistoryDao.java
/** * /?./*from w ww. ja v a2s . c o m*/ * * @param id id * @param objectTypeEnum : * @return ?? */ public List<EditHistoryDto> getEditInfo(int id, EditHistoryObjectTypeEnum objectTypeEnum) { final List<EditHistoryDto> editInfoDTOs = new ArrayList<>(); jdbcTemplate.query(queryEditInfo, new RowCallbackHandler() { @Override public void processRow(ResultSet resultSet) throws SQLException { EditHistoryDto editHistoryDto = new EditHistoryDto(); editHistoryDto.setId(resultSet.getInt("id")); editHistoryDto.setMsgid(resultSet.getInt("msgid")); editHistoryDto.setEditor(resultSet.getInt("editor")); editHistoryDto.setOldmessage(resultSet.getString("oldmessage")); editHistoryDto.setEditdate(resultSet.getTimestamp("editdate")); editHistoryDto.setOldtitle(resultSet.getString("oldtitle")); editHistoryDto.setOldtags(resultSet.getString("oldtags")); editHistoryDto.setObjectType(resultSet.getString("object_type")); editHistoryDto.setOldimage(resultSet.getInt("oldimage")); if (resultSet.wasNull()) { editHistoryDto.setOldimage(null); } editHistoryDto.setOldminor(resultSet.getBoolean("oldminor")); if (resultSet.wasNull()) { editHistoryDto.setOldminor(null); } editInfoDTOs.add(editHistoryDto); } }, id, objectTypeEnum.toString()); return editInfoDTOs; }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskPgSql.CFAsteriskPgSqlSchema.java
public static Short getNullableInt16(ResultSet reader, int colidx) { try {//from ww w.j av a 2 s. com short val = reader.getShort(colidx); if (reader.wasNull()) { return (null); } else { return (new Short(val)); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(CFAsteriskPgSqlSchema.class, "getNullableInt64", e); } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskPgSql.CFAsteriskPgSqlSchema.java
public static String getNullableString(ResultSet reader, int colidx) { try {/*from w w w . j a 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(CFAsteriskPgSqlSchema.class, "getNullableString", e); } }
From source file:net.sourceforge.msscodefactory.cfcrm.v2_1.CFCrmDb2LUW.CFCrmDb2LUWSchema.java
public static Integer getNullableInt32(ResultSet reader, int colidx) { try {// w w w .j av 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(CFCrmDb2LUWSchema.class, "getNullableInt32", e); } }
From source file:net.sourceforge.msscodefactory.cfcrm.v2_1.CFCrmDb2LUW.CFCrmDb2LUWSchema.java
public static Integer getNullableUInt16(ResultSet reader, int colidx) { try {//from www .jav 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(CFCrmDb2LUWSchema.class, "getNullableUInt16", e); } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskPgSql.CFAsteriskPgSqlSchema.java
public static BigDecimal getNullableUInt64(ResultSet reader, int colidx) { try {//from w w w. j a va2 s . c o 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(CFAsteriskPgSqlSchema.class, "getNullableUInt64", e); } }
From source file:net.sourceforge.msscodefactory.cfcrm.v2_1.CFCrmDb2LUW.CFCrmDb2LUWSchema.java
public static Byte getNullableByte(ResultSet reader, int colidx) { try {// w w w. j av a 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(CFCrmDb2LUWSchema.class, "getNullableByte", e); } }
From source file:net.sourceforge.msscodefactory.cfcrm.v2_1.CFCrmDb2LUW.CFCrmDb2LUWSchema.java
public static Long getNullableUInt32(ResultSet reader, int colidx) { try {//from ww w. ja v a 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(CFCrmDb2LUWSchema.class, "getNullableUInt32", e); } }