@Override
	public ResultTransformer createMapping(final App app, final String sourceType, final String targetType, final Map<String, String> propertyMappings, final Map<String, String> transforms) throws FrameworkException {

		try (final Tx tx = app.tx()) {

			final VirtualType type = app.create(VirtualType.class,
				new NodeAttribute<>(StructrApp.key(VirtualType.class, "sourceType"), sourceType),
				new NodeAttribute<>(StructrApp.key(VirtualType.class, "name"),       targetType)
			);

			int i = 0;

			for (final Entry<String, String> entry : propertyMappings.entrySet()) {

				final String sourceProperty = entry.getKey();
				final String targetProperty = entry.getValue();

				app.create(VirtualProperty.class,
					new NodeAttribute<>(StructrApp.key(VirtualProperty.class, "virtualType"),   type),
					new NodeAttribute<>(StructrApp.key(VirtualProperty.class, "sourceName"),    sourceProperty),
					new NodeAttribute<>(StructrApp.key(VirtualProperty.class, "targetName"),    targetProperty),
					new NodeAttribute<>(StructrApp.key(VirtualProperty.class, "position"),      i++),
					new NodeAttribute<>(StructrApp.key(VirtualProperty.class, "inputFunction"), transforms.get(sourceProperty))
				);
			}

			tx.success();

			return type;
		}
	}
@ Override public ResultTransformer createMapping ( final App app , final String sourceType , final String targetType , final Map < String , String > propertyMappings , final Map < String , String > transforms ) throws FrameworkException { try ( final Tx tx = app . tx ( ) ) { final VirtualType type = app . create ( VirtualType . class , new NodeAttribute < > ( StructrApp . key ( VirtualType . class , "sourceType" ) , sourceType ) , new NodeAttribute < > ( StructrApp . key ( VirtualType . class , "name" ) , targetType ) ) ; int i = 0 ; for ( final Entry < String , String > entry : propertyMappings . entrySet ( ) ) { final String sourceProperty = entry . getKey ( ) ; final String targetProperty = entry . getValue ( ) ; app . create ( VirtualProperty . class , new NodeAttribute < > ( StructrApp . key ( VirtualProperty . class , "virtualType" ) , type ) , new NodeAttribute < > ( StructrApp . key ( VirtualProperty . class , "sourceName" ) , sourceProperty ) , new NodeAttribute < > ( StructrApp . key ( VirtualProperty . class , "targetName" ) , targetProperty ) , new NodeAttribute < > ( StructrApp . key ( VirtualProperty . class , "position" ) , i ++ ) , new NodeAttribute < > ( StructrApp . key ( VirtualProperty . class , "inputFunction" ) , transforms . get ( sourceProperty ) ) ) ; } tx . success ( ) ; return type ; } }
----- interface APIBuilder -----