Package com.impetus.kundera.graph

Examples of com.impetus.kundera.graph.Node


                    break;*/

                case REFRESH:
                    if (cascadeTypes.contains(CascadeType.REFRESH) || cascadeTypes.contains(CascadeType.ALL))
                    {
                        Node childNode = children.get(nodeLink);
                        childNode.refresh();
                    }
                    break;
                case DETACH:
                    if (cascadeTypes.contains(CascadeType.DETACH) || cascadeTypes.contains(CascadeType.ALL))
                    {
                        Node childNode = children.get(nodeLink);
                        childNode.detach();
                    }
                    break;
                }

            }
View Full Code Here


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

     * .
     */
    @Test
    public void testHandlePersist()
    {
        Node storeNode = StoreBuilder.buildStoreNode(pc, state, CascadeType.PERSIST);
        try
        {
            state.handlePersist(storeNode);
            Assert.fail("Persist operation in Detached state should have thrown exception");
        }
View Full Code Here

     * .
     */
    @Test
    public void testHandleRemove()
    {
        Node storeNode = StoreBuilder.buildStoreNode(pc, state, CascadeType.REMOVE);
        try
        {
            state.handleRemove(storeNode);
            Assert.fail("Remove operation in Detached state should have thrown exception");
        }
View Full Code Here

     * .
     */
    @Test
    public void testHandleRefresh()
    {
        Node storeNode = StoreBuilder.buildStoreNode(pc, state, CascadeType.REFRESH);
        try
        {
            state.handleRefresh(storeNode);
            Assert.fail("refresh operation in Detached state should have thrown exception");
        }
View Full Code Here

     * .
     */
    @Test
    public void testHandleMerge()
    {
        Node storeNode = StoreBuilder.buildStoreNode(pc, state, CascadeType.MERGE);
        state.handleMerge(storeNode);

        Assert.assertEquals(ManagedState.class, storeNode.getCurrentNodeState().getClass());
        Assert.assertTrue(storeNode.isUpdate());

//        for (Node childNode : storeNode.getChildren().values())
//        {
//            Assert.assertEquals(BillingCounter.class, childNode.getDataClass());
//            Assert.assertEquals(ManagedState.class, childNode.getCurrentNodeState().getClass());
View Full Code Here

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

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

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

     * .
     */
    @Test
    public void testHandleCommit()
    {
        Node storeNode = StoreBuilder.buildStoreNode(pc, state, CascadeType.PERSIST);
        state.handleCommit(storeNode);
    }
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.