QuestionPoolFacade pool = new QuestionPoolFacade(); pool.setOwnerId(SessionManager.getCurrentSessionUserId()); pool.setTitle(importPool.getTitle()); pool.setDescription(importPool.getDescription());
/** * IMPORTANT: this constructor do not have "data", this constructor is * merely used for holding questionPoolId, Title * for displaying purpose (used by the pulldown list in authoring). * This constructor does not persist data (which it has none) to DB * @param id * @param title */ public QuestionPoolFacade(Long id, String title) { this.questionPoolId = id; this.title= title; this.data = new QuestionPoolData(); QuestionPoolImpl questionPoolImpl = new QuestionPoolImpl(); //<-- place holder questionPool = (QuestionPool)questionPoolImpl; try { questionPool.updateData(this.data); setQuestionPoolId(id); setTitle(title); } catch (QuestionPoolException ex) { throw new DataFacadeException(ex.getMessage()); } }
destinationPool.setTitle(sourcePool.getTitle()); destinationPool.setDescription(sourcePool.getDescription());
/** * IMPORTANT: this constructor do not have "data", this constructor is * merely used for holding questionPoolId, Title * for displaying purpose (used by the pulldown list in authoring). * This constructor does not persist data (which it has none) to DB * @param id * @param title */ public QuestionPoolFacade(Long id, String title) { this.questionPoolId = id; this.title= title; this.data = new QuestionPoolData(); QuestionPoolImpl questionPoolImpl = new QuestionPoolImpl(); //<-- place holder questionPool = (QuestionPool)questionPoolImpl; try { questionPool.updateData(this.data); setQuestionPoolId(id); setTitle(title); } catch (QuestionPoolException ex) { throw new DataFacadeException(ex.getMessage()); } }
/** * IMPORTANT: this constructor do not have "data", this constructor is * merely used for holding questionPoolId, Title, parentId * for validation question pool * This constructor does not persist data (which it has none) to DB * @param id * @param title * @param parentid */ public QuestionPoolFacade(Long id, String title, Long parentId) { this.questionPoolId = id; this.title= title; this.parentPoolId=parentId; this.data = new QuestionPoolData(); QuestionPoolImpl questionPoolImpl = new QuestionPoolImpl(); //<-- place holder questionPool = (QuestionPool)questionPoolImpl; try { questionPool.updateData(this.data); setParentPoolId(parentId); setQuestionPoolId(id); setTitle(title); } catch (QuestionPoolException ex) { throw new DataFacadeException(ex.getMessage()); } }
/** * IMPORTANT: this constructor do not have "data", this constructor is * merely used for holding questionPoolId, Title, parentId * for validation question pool * This constructor does not persist data (which it has none) to DB * @param id * @param title * @param parentid */ public QuestionPoolFacade(Long id, String title, Long parentId) { this.questionPoolId = id; this.title= title; this.parentPoolId=parentId; this.data = new QuestionPoolData(); QuestionPoolImpl questionPoolImpl = new QuestionPoolImpl(); //<-- place holder questionPool = (QuestionPool)questionPoolImpl; try { questionPool.updateData(this.data); setParentPoolId(parentId); setQuestionPoolId(id); setTitle(title); } catch (QuestionPoolException ex) { throw new DataFacadeException(ex.getMessage()); } }