Examples of TreeLocal


Examples of org.jboss.test.cmp2.cmrtransaction.interfaces.TreeLocal

    public void setup()
    {
        try
        {
            TreeLocalHome tlh = getTreeLocalHome();
            TreeLocal tl = null;
            try
            {
                tl = tlh.findByPrimaryKey("Parent");
                tl.remove();
            }
            catch (ObjectNotFoundException f) {}
            try
            {
                tl = tlh.findByPrimaryKey("Child 1");
                tl.remove();
            }
            catch (ObjectNotFoundException f) {}
            try
            {
                tl = tlh.findByPrimaryKey("Child 2");
                tl.remove();
            }
            catch (ObjectNotFoundException f) {}
        }
        catch (NamingException n)
        {
View Full Code Here

Examples of org.jboss.test.cmp2.cmrtransaction.interfaces.TreeLocal

    public void createNodes()
    {
        try
        {
            TreeLocalHome tlh = getTreeLocalHome();
            TreeLocal parent = null;
            parent = tlh.create("Parent", null);
            tlh.create("Child 1", parent);
            tlh.create("Child 2", null);
        }
        catch (NamingException n)
View Full Code Here

Examples of org.jboss.test.cmp2.cmrtransaction.interfaces.TreeLocal

    public void rearrangeNodes()
    {
        try
        {
            TreeLocalHome tlh = getTreeLocalHome();
            TreeLocal target = tlh.findByPrimaryKey("Child 2");
            TreeLocal sibling = null;
            sibling = tlh.findByPrimaryKey("Child 1");
            /*
            TreeLocal parent = tlh.findByPrimaryKey("Parent");
            Collection coll = parent.getMenuChildren();
            Iterator iter = coll.iterator();
            sibling = (TreeLocal) iter.next();
            */
            target.setMenuParent(sibling.getMenuParent());
            target.setPrecededBy(sibling);
        }
        catch (NamingException n)
        {
            throw new EJBException(n);
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.