com.lordofthejars.nosqlunit.neo4j.extension.springtemplate.SpringTemplateInsertionStrategy Maven / Gradle / Ivy
package com.lordofthejars.nosqlunit.neo4j.extension.springtemplate;
import java.io.InputStream;
import java.util.List;
import org.neo4j.graphdb.GraphDatabaseService;
import org.springframework.data.neo4j.config.JtaTransactionManagerFactoryBean;
import org.springframework.data.neo4j.support.Neo4jTemplate;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallback;
import org.springframework.transaction.support.TransactionTemplate;
import com.lordofthejars.nosqlunit.neo4j.Neo4jConnectionCallback;
import com.lordofthejars.nosqlunit.neo4j.Neo4jInsertionStrategy;
public class SpringTemplateInsertionStrategy implements Neo4jInsertionStrategy {
@Override
public void insert(Neo4jConnectionCallback connection, InputStream dataset) throws Throwable {
Neo4jTemplate neo4jTemplate = neo4jTemplate(connection);
List