in src/main/java/com/microsoft/spring/data/gremlin/conversion/source/GremlinSourceGraphWriter.java [42:68]
public void write(@NonNull Object domain, @NonNull MappingGremlinConverter converter,
@NonNull GremlinSource source) {
if (!(source instanceof GremlinSourceGraph)) {
throw new GremlinUnexpectedSourceTypeException("should be the instance of GremlinSourceEdge");
}
final GremlinSourceGraph sourceGraph = (GremlinSourceGraph) source;
final GremlinPersistentEntity<?> persistentEntity = converter.getPersistentEntity(domain.getClass());
final ConvertingPropertyAccessor accessor = converter.getPropertyAccessor(domain);
for (final Field field : FieldUtils.getAllFields(domain.getClass())) {
final PersistentProperty property = persistentEntity.getPersistentProperty(field.getName());
if (property == null) {
continue;
}
if (field.getName().equals(Constants.PROPERTY_ID) || field.getAnnotation(Id.class) != null) {
continue;
}
@SuppressWarnings("unchecked") final List<Object> objects = (List<Object>) accessor.getProperty(property);
if (field.getAnnotation(VertexSet.class) != null || field.getAnnotation(EdgeSet.class) != null) {
this.writeGraphSet(objects, converter, sourceGraph);
}
}
}