@Test public void basicOneForOneConversion() { SolrInputDocument parent = new SolrInputDocument(); parent.addField("rowid", "123"); SolrInputDocument child = new SolrInputDocument(); child.addField("recordid", "1"); child.addField("fam.key", "value"); parent.addChildDocument(child); RowMutation mutate = RowMutationHelper.from(parent, "foo"); assertEquals("Should get our rowid back.", "123", mutate.getRowId()); assertEquals("Should get a single record.", 1, mutate.getRecordMutationsSize()); assertEquals("Tablename should be set", "foo", mutate.getTable()); }
public static List<RowMutation> from(Collection<SolrInputDocument> docs, String table) { List<RowMutation> mutations = Lists.newArrayList(); for (SolrInputDocument d : docs) { mutations.add(from(d, table)); } return mutations; }
RowMutationHelper { public static List<RowMutation> from(Collection<SolrInputDocument> docs, String table) { List<RowMutation> mutations = Lists.newArrayList(); for (SolrInputDocument d : docs) { mutations.add(from(d, table)); } return mutations; } }
RowMutationHelper { public static List<RowMutation> from(Collection<SolrInputDocument> docs, String table) { List<RowMutation> mutations = Lists.newArrayList(); for (SolrInputDocument d : docs) { mutations.add(from(d, table)); } return mutations; }  }
RowMutationHelper { public static List<RowMutation> from(Collection<SolrInputDocument> docs, String table) { List<RowMutation> mutations = Lists.newArrayList(); for (SolrInputDocument d : docs) { mutations.add(from(d, table)); } return mutations; }  static List<RowMutation> from(Collection<SolrInputDocument> docs, String table); static RowMutation from(SolrInputDocument doc, String table); }
RowMutationHelper { public static List<RowMutation> from(Collection<SolrInputDocument> docs, String table) { List<RowMutation> mutations = Lists.newArrayList(); for (SolrInputDocument d : docs) { mutations.add(from(d, table)); } return mutations; }  static List<RowMutation> from(Collection<SolrInputDocument> docs, String table); static RowMutation from(SolrInputDocument doc, String table);  }