Skip to content

Instantly share code, notes, and snippets.

@okram
Created December 15, 2013 21:44
Show Gist options
  • Save okram/7978601 to your computer and use it in GitHub Desktop.
Save okram/7978601 to your computer and use it in GitHub Desktop.
// do all property deletions, then do all property additions (ensures proper order of operations)
for (final FaunusProperty faunusProperty : faunusEdge.getPropertiesWithState()) {
if (faunusProperty.isDeleted()) {
titanEdge.removeProperty(faunusProperty.getName());
context.getCounter(Counters.EDGE_PROPERTIES_DELETED).increment(1l);
}
}
for (final FaunusProperty faunusProperty : faunusEdge.getPropertiesWithState()) {
if (faunusProperty.isNew()) {
titanEdge.setProperty(faunusProperty.getName(), faunusProperty.getValue());
context.getCounter(Counters.EDGE_PROPERTIES_CREATED).increment(1l);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment