Package org.apache.openjpa.persistence.validation

Examples of org.apache.openjpa.persistence.validation.TraversableResolverImpl


        book = em.find(org.apache.openjpa.integration.validation.Book.class, 1);
        assertNotNull(book);
        // PathImpl path = PathImpl.createPathFromString("org.apache.openjpa.integration.validation.Book.pages");
        // Path.Node node = path.getLeafNode();
        Path.Node node = getLeafNodeFromString("org.apache.openjpa.integration.validation.Book.pages");
        TraversableResolver tr = new TraversableResolverImpl();
        assertTrue(tr.isReachable(book, node, Book.class, null, ElementType.METHOD));
        assertTrue(tr.isCascadable(book, node, Book.class, null, ElementType.METHOD));
        em.getTransaction().commit();
        closeEMF();
    }
View Full Code Here


        book = em.find(org.apache.openjpa.integration.validation.Book.class, 1);
        assertNotNull(book);
        // PathImpl path = PathImpl.createPathFromString("org.apache.openjpa.integration.validation.Book.title");
        // Path.Node node = path.getLeafNode();
        Path.Node node = getLeafNodeFromString("org.apache.openjpa.integration.validation.Book.title");
        TraversableResolver tr = new TraversableResolverImpl();
        assertFalse(tr.isReachable(book, node, Book.class, null, ElementType.FIELD));
        em.getTransaction().commit();
        closeEMF();
    }
View Full Code Here

        book = em.find(org.apache.openjpa.integration.validation.Book.class, 1);
        assertNotNull(book);
        // PathImpl path = PathImpl.createPathFromString("org.apache.openjpa.integration.validation.Book.pages");
        // Path.Node node = path.getLeafNode();
        Path.Node node = getLeafNodeFromString("org.apache.openjpa.integration.validation.Book.pages");
        TraversableResolver tr = new TraversableResolverImpl();
        assertTrue(tr.isReachable(book, node, Book.class, null, ElementType.METHOD));
        assertTrue(tr.isCascadable(book, node, Book.class, null, ElementType.METHOD));
        em.getTransaction().commit();
        closeEMF();
    }
View Full Code Here

        book = em.find(org.apache.openjpa.integration.validation.Book.class, 1);
        assertNotNull(book);
        // PathImpl path = PathImpl.createPathFromString("org.apache.openjpa.integration.validation.Book.title");
        // Path.Node node = path.getLeafNode();
        Path.Node node = getLeafNodeFromString("org.apache.openjpa.integration.validation.Book.title");
        TraversableResolver tr = new TraversableResolverImpl();
        assertFalse(tr.isReachable(book, node, Book.class, null, ElementType.FIELD));
        em.getTransaction().commit();
        closeEMF();
    }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.persistence.validation.TraversableResolverImpl

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.