Package org.jboss.dashboard.database.hibernate

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


                currentVersion.setStatus(null);
                session.update(currentVersion);
                session.flush();
            }
        };
        fragment.execute();
    }

    protected void storeModule(final InstalledModule currentVersion, final InitialModule newVersion) {
        try {
            new HibernateTxFragment() {
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

                fireAfterPanelClosed(panel);
            }
        };

        try {
            txFragment.execute();
        } catch (Exception e) {
            log.error("Can't remove panel from region.", e);
        }
        return new ShowPanelPage();
    }
View Full Code Here

                UIServices.lookup().getSectionsManager().store(section);
            }
        };

        try {
            txFragment.execute();
        } catch (Exception e) {
            log.error("Can't move back panel in region.", e);
        }
        return new ShowPanelPage();
    }
View Full Code Here

                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

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.