private Object getValue(int fieldIndex, int index) { List<Object> list; try { list = data[fieldIndex]; } catch (IndexOutOfBoundsException e) { throw new RuntimeException("not found " + fieldIndex + "(" + schema.getFieldName(fieldIndex) + ") in group:\n" + this); } try { return list.get(index); } catch (IndexOutOfBoundsException e) { throw new RuntimeException("not found " + fieldIndex + "(" + schema.getFieldName(fieldIndex) + ") element number " + index + " in group:\n" + this); } }
private Object getValue(int fieldIndex, int index) { List<Object> list; try { list = data[fieldIndex]; } catch (IndexOutOfBoundsException e) { throw new RuntimeException("not found " + fieldIndex + "(" + schema.getFieldName(fieldIndex) + ") in group:\n" + this); } try { return list.get(index); } catch (IndexOutOfBoundsException e) { throw new RuntimeException("not found " + fieldIndex + "(" + schema.getFieldName(fieldIndex) + ") element number " + index + " in group:\n" + this); } }
private void writeProperties(final Properties properties, final GroupType type, final int startIndex) throws SerialisationException { for (int i = startIndex; i < type.getFieldCount(); i++) { final String fieldName = type.getFieldName(i); final String columnName; if (fieldName.contains("_")) { columnName = fieldName.substring(0, fieldName.indexOf("_")); } else { columnName = fieldName; } i = writeGafferObject(columnName, properties.get(columnName), type, i) - 1; } }
return fieldNames.contains(repeatedType.asGroupType().getFieldName(0));