Package dbbeans

Examples of dbbeans.Trees


    public void destroy(Integer id) throws NonexistentEntityException, RollbackFailureException, Exception {
        EntityManager em = null;
        try {
            utx.begin();
            em = getEntityManager();
            Trees trees;
            try {
                trees = em.getReference(Trees.class, id);
                trees.getId();
            } catch (EntityNotFoundException enfe) {
                throw new NonexistentEntityException("The trees with id " + id + " no longer exists.", enfe);
            }
            em.remove(trees);
            utx.commit();
View Full Code Here


    /**
     * Method used to add a new tree
     */
    public void addTree(String name, int user) {
        try {
            treesController.create(new Trees(0, name, user));
        } catch (RollbackFailureException ex) {
            Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);
        }
View Full Code Here

    }

    public void addTree(Tree tree) {
        String name=tree.getRoot().getData().toString();
        try {
            treesController.create(new Trees(name, 0));
           
        } catch (Exception exc) {
            exc.printStackTrace();
        }
    }
View Full Code Here

TOP

Related Classes of dbbeans.Trees

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.