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);