Examples of registerTransactionEventHandler()


Examples of org.neo4j.graphdb.GraphDatabaseService.registerTransactionEventHandler()

    }

    public void testRollbackExceptionOnBeforeTxCommit() throws Exception {
        Neo4jGraph graph = (Neo4jGraph) graphTest.generateGraph();
        GraphDatabaseService rawGraph = graph.getRawGraph();
        rawGraph.registerTransactionEventHandler(new TransactionEventHandler<Object>() {
            @Override
            public Object beforeCommit(TransactionData data) throws Exception {
                if (true) {
                    throw new RuntimeException("jippo validation exception");
                }
View Full Code Here

Examples of org.neo4j.graphdb.GraphDatabaseService.registerTransactionEventHandler()

    }

    public void testRollbackExceptionOnBeforeTxCommit() throws Exception {
        Neo4j2Graph graph = (Neo4j2Graph) graphTest.generateGraph();
        GraphDatabaseService rawGraph = graph.getRawGraph();
        rawGraph.registerTransactionEventHandler(new TransactionEventHandler<Object>() {
            @Override
            public Object beforeCommit(TransactionData data) throws Exception {
                if (true) {
                    throw new RuntimeException("jippo validation exception");
                }
View Full Code Here

Examples of org.neo4j.graphdb.GraphDatabaseService.registerTransactionEventHandler()

*/
public class JustForDocs {

    private void justForDocs() {
        GraphDatabaseService database = new TestGraphDatabaseFactory().newImpermanentDatabase();
        database.registerTransactionEventHandler(new TransactionEventHandler<Object>() {
            @Override
            public Object beforeCommit(TransactionData data) throws Exception {
                ImprovedTransactionData improvedTransactionData = new LazyTransactionData(data);

                //have fun here with improvedTransactionData!
View Full Code Here

Examples of org.neo4j.graphdb.GraphDatabaseService.registerTransactionEventHandler()

        });
    }

    private void justForDocs2() {
        GraphDatabaseService database = new TestGraphDatabaseFactory().newImpermanentDatabase();
        database.registerTransactionEventHandler(new TransactionEventHandler.Adapter<Object>() {
            @Override
            public Object beforeCommit(TransactionData data) throws Exception {
                InclusionPolicies inclusionPolicies = InclusionPolicies.all()
                        .with(new NodeInclusionPolicy() {
                            @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.