return row.getInt(field);
return row.getInt(field);
break; case INT32: to.addInt(i, from.getInt(i)); break; case INT16:
return result.getShort(jpaColumnName); case INT32: return result.getInt(jpaColumnName); case INT64: return result.getLong(jpaColumnName);
/** * Get the specified column's integer * @param columnName name of the column to get data for * @return an integer * @throws IllegalArgumentException if the column doesn't exist, is null, * or if the type doesn't match the column's type */ public int getInt(String columnName) { return getInt(this.schema.getColumnIndex(columnName)); }
@Override public Object call(RowResultIterator arg) throws Exception { if (arg == null) return null; for (RowResult row : arg) { if (row.getInt(0) == key) { exists.set(true); break; } } return null; } };
public static long getLong(Type type, RowResult row, int field) { if (type == TimestampType.TIMESTAMP) { return row.getLong(field) / 1000; } else if (type == BigintType.BIGINT) { return row.getLong(field); } else if (type == IntegerType.INTEGER) { return row.getInt(field); } else if (type == SmallintType.SMALLINT) { return row.getShort(field); } else if (type == TinyintType.TINYINT) { return row.getByte(field); } else if (type == RealType.REAL) { return floatToRawIntBits(row.getFloat(field)); } else if (type instanceof DecimalType) { DecimalType dtype = (DecimalType) type; if (dtype.isShort()) { return row.getDecimal(field).unscaledValue().longValue(); } else { throw new IllegalStateException("getLong not supported for long decimal: " + type); } } else { throw new IllegalStateException("getLong not implemented for " + type); } }
return row.getInt(field);
private static CINode getCINode(RowResult result, CINode node) { node.key = getStringFromKeys(result.getLong(0), result.getLong(1)); if (result.isNull(2) || result.isNull(3)) { node.prev = "NO_REFERENCE"; } else { node.prev = getStringFromKeys(result.getLong(2), result.getLong(3)); } node.rowId = result.getInt(4); node.client = result.getString(5); node.updateCount = result.getInt(6); return node; }
break; case INT32: values.add(result.getInt(columnName)); break; case INT64:
int receivedKey = results.get(0).getInt(0); if (receivedKey != key) { reportError("Tried to get key " + key + " and received " + receivedKey, null);
return row.getLong(field); } else if (type == IntegerType.INTEGER) { return row.getInt(field); } else if (type == SmallintType.SMALLINT) { return row.getShort(field);
return row.getInt(field);
break; case INT32: values.setField(i, name, row.getInt(i)); break; case INT64:
break; case INT32: to.addInt(i, from.getInt(i)); break; case INT16:
break; case INT32: to.addInt(i, from.getInt(i)); break; case INT16:
next.getInt("c2"); fail("IllegalArgumentException was not thrown when accessing " + "a string column with getInt");