Package com.impetus.kundera.graph

Examples of com.impetus.kundera.graph.Node


     * .
     */
    @Test
    public void testHandleContains()
    {
        Node storeNode = StoreBuilder.buildStoreNode(pc, state, CascadeType.PERSIST);
        state.handleContains(storeNode);
    }
View Full Code Here


     * .
     */
    @Test
    public void testHandleClear()
    {
        Node storeNode = StoreBuilder.buildStoreNode(pc, state, CascadeType.PERSIST);
        state.handleClear(storeNode);
    }
View Full Code Here

    @Test
    public void testHandleFlush()
    {
        try
        {
            Node storeNode = StoreBuilder.buildStoreNode(pc, state, CascadeType.PERSIST);
            state.handleFlush(storeNode);
            Assert.fail("Exception should be thrown because client is not available");
        }
        catch (Exception e)
        {
View Full Code Here

        store.addCounter(new BillingCounter(3, "C"));

        ObjectGraph graph = graphBuilder.getObjectGraph(store, null);

        Assert.assertNotNull(graph);
        Node headNode = graph.getHeadNode();
        Map<String, Node> nodeMappings = graph.getNodeMapping();

        Assert.assertNotNull(headNode);
        Assert.assertNotNull(nodeMappings);
        Assert.assertFalse(nodeMappings.isEmpty());
        Assert.assertEquals(4, nodeMappings.size());

        Assert.assertTrue(headNode.getParents() == null);
        Assert.assertEquals(3, headNode.getChildren().size());
    }
View Full Code Here

        Assert.assertNotNull(pc.getMainCache());
        Assert.assertEquals(1, pc.getMainCache().getHeadNodes().size());

        PersistenceDelegator pd = new PersistenceDelegator(emfImpl.getKunderaMetadataInstance(), pc);

        Node headNode = pc.getMainCache().getNodeFromCache(ObjectGraphUtils.getNodeId("1", Store.class), pd);

        Assert.assertNotNull(headNode);
        Assert.assertNull(headNode.getParents());
        Assert.assertEquals(3, headNode.getChildren().size());

        Assert.assertEquals(4, pc.getMainCache().size());

        markAllNodeAsDirty();
        flushManager.buildFlushStack(headNode, EventType.INSERT);
View Full Code Here

        Assert.assertNotNull(pc.getMainCache());
        Assert.assertEquals(1, pc.getMainCache().getHeadNodes().size());
       
        PersistenceDelegator pd = new PersistenceDelegator(emfImpl.getKunderaMetadataInstance(), pc);

        Node headNode = pc.getMainCache().getNodeFromCache(ObjectGraphUtils.getNodeId("1", Store.class), pd);

        Assert.assertNotNull(headNode);
        Assert.assertNull(headNode.getParents());
        Assert.assertEquals(3, headNode.getChildren().size());

        Assert.assertEquals(4, pc.getMainCache().size());
    }
View Full Code Here

    @Test
    public void testFlushStackPush()
    {
        PersistenceCache pc = new PersistenceCache();
        fs.push(new Node("A", new Object().getClass(), null, pc, "A", null));
        fs.push(new Node("B", new Object().getClass(), null, pc, "B", null));
        fs.push(new Node("C", new Object().getClass(), null, pc, "C", null));
        fs.push(new Node("D", new Object().getClass(), null, pc, "D", null));

        Assert.assertEquals(4, fs.size());
    }
View Full Code Here

        ObjectGraph graph = graphBuilder.getObjectGraph(a, null);
        pc.getMainCache().addGraphToCache(graph, pc);

        PersistenceDelegator pd = new PersistenceDelegator(emfImpl.getKunderaMetadataInstance(), pc);

        Node headNode = pc.getMainCache()
                .getNodeFromCache(ObjectGraphUtils.getNodeId("c1", PhotoUni_1_1_1_1.class), pd);

        markAllNodeAsDirty();
        flushManager.buildFlushStack(graph.getHeadNode(), EventType.INSERT);
View Full Code Here

TOP

Related Classes of com.impetus.kundera.graph.Node

Copyright © 2018 www.massapicom. 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.