Package org.jboss.dashboard.database.hibernate

Examples of org.jboss.dashboard.database.hibernate.HibernateTxFragment.execute()


                if (section != null) section.moveForwardInRegion(panel);
                UIServices.lookup().getSectionsManager().store(section);
            }
        };
        try {
            txFragment.execute();
        } catch (Exception e) {
            log.error("Can't move forward panel in region.", e);
        }
        return new ShowPanelPage();
    }
View Full Code Here


                    UIServices.lookup().getSectionsManager().store(section);
                }
            }
        };
        try {
            txFragment.execute();
        } catch (Exception e) {
            log.error("Panel " + panel.getPanelId() + " can't be removed.", e);
        }
        return new ShowPanelPage();
    }
View Full Code Here

                    protected void txFragment(Session session) throws Exception {
                        UIServices.lookup().getSectionsManager().store(section);
                    }
                };

                txFragment.execute();
                getMessagesComponentHandler().addMessage("ui.alert.sectionEdition.OK");
                setSection(section);
            } catch (Exception e) {
                log.error("Error: ", e);
                getMessagesComponentHandler().clearAll();
View Full Code Here

            protected void txFragment(Session session) throws Exception {
                Object workspaceFound = session.get(WorkspaceImpl.class, id, lock ? LockMode.UPGRADE : LockMode.NONE);
                exists[0] = workspaceFound != null;
            }
        };
        txFragment.execute();
        return exists[0];
    }

    public Map<String, String> generateUniqueWorkspaceName(Workspace workspace) throws Exception {
        return generateUniqueWorkspaceName(1, workspace, null);
View Full Code Here

                // Notify workspace removal
                fireWorkspaceRemoved(workspace);
            }
        };

        txFragment.execute();
    }

    public Workspace getWorkspace(final String id) throws Exception {
        final WorkspaceImpl[] workspace = new WorkspaceImpl[]{null};
View Full Code Here

            protected void txFragment(Session session) throws Exception {
                workspace[0] = (WorkspaceImpl) session.get(WorkspaceImpl.class, id);
            }
        };

        txFragment.execute();
        return workspace[0];
    }

    /**
     * Return all workspaces
View Full Code Here

                session.setFlushMode(oldFlushMode);
            }
        };

        try {
            txFragment.execute();
        } catch (Exception e) {
            log.error("Error:", e);
        }
        return workspaces.toArray(new WorkspaceImpl[workspaces.size()]);
    }
View Full Code Here

                    }
                }
                session.flush();
            }
        };
        txFragment.execute();
    }

    public Set<String> getAllWorkspacesIdentifiers() throws Exception {
        Set<String> s = new TreeSet<String>();
        WorkspaceImpl[] workspaces = getWorkspaces();
View Full Code Here

            protected void txFragment(Session session) throws Exception {
                session.delete(instance);
            }
        };

        txFragment.execute();
    }


    public void delete(final Panel panel) throws Exception {
View Full Code Here

            protected void txFragment(Session session) throws Exception {
                session.delete(panel);
            }
        };

        txFragment.execute();
    }


    /**
     * Persist panel status to database
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.