Examples of success()


Examples of org.neo4j.graphdb.Transaction.success()

        final Node node = index.get("id", info.getId()).getSingle();
        assertNotNull(node);
        assertEquals(info.getId(), node.getProperty("id"));
        assertEquals(info.getVersion(),node.getProperty("version"));
        assertEquals(!info.hasRoot(),(Boolean)node.getProperty("no_root"));
        tx.success();tx.close();
    }

    @Test
    public void testCreateWithNullId() throws Exception {
        final GraphInfo info = storage.create(new GraphInfo(null, "init", "query", "message"));
View Full Code Here

Examples of org.neo4j.graphdb.Transaction.success()

        Transaction tx = gdb.beginTx();
        assertNotNull(info.getId());
        final Node node = index.get("id", info.getId()).getSingle();
        assertNotNull(node);
        assertEquals(info.getId(), node.getProperty("id"));
        tx.success();tx.close();
    }

    @Test
    public void testCreateWithEmptyId() throws Exception {
        final String id = " ";
View Full Code Here

Examples of org.neo4j.graphdb.Transaction.success()

        assertFalse(info.getId().trim().isEmpty());
        final Node node = index.get("id", info.getId()).getSingle();
        assertNull(index.get("id", id).getSingle());
        assertNotNull(node);
        assertEquals(info.getId(), node.getProperty("id"));
        tx.success();tx.close();
    }

    @Test
    public void testCreateWithIdWithSpace() throws Exception {
        final String id = "";
View Full Code Here

Examples of org.neo4j.graphdb.Transaction.success()

        assertFalse(info.getId().trim().isEmpty());
        final Node node = index.get("id", info.getId()).getSingle();
        assertNull(index.get("id", id).getSingle());
        assertNotNull(node);
        assertEquals(info.getId(), node.getProperty("id"));
        tx.success();tx.close();
    }

    private void delete(Node node) {
        final Transaction tx = gdb.beginTx();
        node.delete();
View Full Code Here

Examples of org.neo4j.graphdb.Transaction.success()

    }

    private void delete(Node node) {
        final Transaction tx = gdb.beginTx();
        node.delete();
        tx.success();tx.close();
    }

    @Test
    public void testCreate() throws Exception {
        final GraphInfo info = storage.create(new GraphInfo("id", "init", "query", "message"));
View Full Code Here

Examples of org.neo4j.graphdb.Transaction.success()

    public void setUp() throws Throwable {
        serverGraphDatabase.cleanContent();
        final Transaction tx = serverGraphDatabase.beginTx();
        remoteNode = serverGraphDatabase.createNode();
        remoteNode.setProperty(NAME, VALUE);
        tx.success();tx.close();

        consoleService = new ConsoleService();
        service = new Neo4jService();
    }
}
View Full Code Here

Examples of org.neo4j.graphdb.Transaction.success()

            ExecutionResult result = canProfile ? executionEngine.profile(query,params) : executionEngine.execute(query,params);
            final Collection<Map<String, Object>> data = IteratorUtil.asCollection(result);
            time = System.currentTimeMillis() - time;
            resumeTransaction(resumeTx);
            CypherResult cypherResult = new CypherResult(result.columns(), data, result.getQueryStatistics(), time, canProfile ? result.executionPlanDescription() : null, prettify(query));
            tx.success();
            return cypherResult;
        } finally {
            tx.close();
            awaitIndexOnline(query);
        }
View Full Code Here

Examples of org.neo4j.graphdb.Transaction.success()

        relationshipAutoIndexer = gdb.index().getRelationshipAutoIndexer();
        enableAutoIndex(nodeAutoIndexer);
        enableAutoIndex(relationshipAutoIndexer);
        autoIndexedProperties.addAll(nodeAutoIndexer.getAutoIndexedProperties());
        autoIndexedProperties.addAll(relationshipAutoIndexer.getAutoIndexedProperties());
        tx.success();tx.close();
    }

    private void enableAutoIndex(AutoIndexer<? extends PropertyContainer> autoIndexer) {
        autoIndexer.setEnabled(true);
        //autoIndexer.getAutoIndex();
View Full Code Here

Examples of org.neo4j.graphdb.Transaction.success()

    @Override
    public void setName(String name) {
        Transaction tx = db.beginTx();
        try {
            node.setProperty(AssetDB.NAME,name);
            tx.success();
        } finally {
            tx.finish();
        }
    }
View Full Code Here

Examples of org.neo4j.graphdb.Transaction.success()

            for(FlatColor color : swatches) {
                sb.append(Integer.toHexString(color.getRGBA()));
                sb.append(",");
            }
            this.node.setProperty("colors",sb.toString());
            tx.success();
        } finally {
            tx.finish();
        }
    }
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.