Object row = objectInspector.create();
List<StructField> fields = ImmutableList.copyOf(objectInspector.getAllStructFieldRefs());
for (LineItem lineItem : new LineItemGenerator(1, 1, 1)) {
objectInspector.setStructFieldData(row, fields.get(0), lineItem.getOrderKey());
objectInspector.setStructFieldData(row, fields.get(1), lineItem.getPartKey());
objectInspector.setStructFieldData(row, fields.get(2), lineItem.getSupplierKey());
objectInspector.setStructFieldData(row, fields.get(3), lineItem.getLineNumber());
objectInspector.setStructFieldData(row, fields.get(4), lineItem.getQuantity());