Package cn.edu.pku.dr.requirement.elicitation.data

Examples of cn.edu.pku.dr.requirement.elicitation.data.Problem


        dp.update(temp);
        returnMessage = "保存成功";
    }

    public void addProblem() throws EasyJException {
        Problem problem = (Problem) object;
        problem.setCreatorId(userId);
        problem.setBuildTime(new java.sql.Date(System.currentTimeMillis()));
        problem.setUpdateTime(new java.sql.Date(System.currentTimeMillis()));
        /* todo:将来需要改成用户对应的角色 */
        problem.setRoleId(new Long(1));
        problem.setStatusId(new Integer(0));
        problem.setProblemAward(new Short((short) 0));
        problem.setVotingNum(new Long(0));
        if (problem.getProblemId() == null)
            problem = (Problem) dp.create(problem);
        else {
            problem.setUseState("Y");
            dp.update(problem);
        }

        String problemContent = request.getParameter("problemContent");
        // 增加完problem之后,需要增加对应的problem_version
        ProblemVersion version = new ProblemVersion();
        version.setCreatorId(userId);
        version.setProblemContent(problemContent);
        version.setProblemId(problem.getProblemId());
        version.setProblemVersionId(new Long(1));
        dp.update(version);
        returnMessage = "problemId=" + problem.getProblemId() + "<message>保存成功";
    }
View Full Code Here


    public void getProblem() throws EasyJException, IOException {
        ProblemImpl targetObject = new ProblemImpl();
        ProblemInterface problemInterface = null;
        Object proxy = ProblemPorxyFactory.getProxy(targetObject);
        problemInterface = (ProblemInterface) proxy;
        Problem problem = new Problem();
        problem = (Problem) object;
        try {
            response.getWriter().println(
                    problemInterface.getProblem(problem, false, false)
                            .toString());
View Full Code Here

    public void getAmbiguity() throws EasyJException, IOException {
        ProblemImpl targetObject = new ProblemImpl();
        ProblemInterface problemInterface = null;
        Object proxy = ProblemPorxyFactory.getProxy(targetObject);
        problemInterface = (ProblemInterface) proxy;
        Problem problem = new Problem();
        problem = (Problem) object;
        try {
            response.getWriter().println(
                    problemInterface.getAmbiguity(problem, request).toString());
        } catch (EasyJException e) {
View Full Code Here

    public void modifyProblem() throws EasyJException, IOException {
        ProblemImpl targetObject = new ProblemImpl();
        ProblemInterface problemInterface = null;
        Object proxy = ProblemPorxyFactory.getProxy(targetObject);
        problemInterface = (ProblemInterface) proxy;
        Problem problem = new Problem();
        problem = (Problem) object;
        returnMessage = problemInterface.modifyProblem(problem, dp, request);

    }
View Full Code Here

    public void newProblem() throws EasyJException, IOException {
        ProblemImpl targetObject = new ProblemImpl();
        ProblemInterface problemInterface = null;
        Object proxy = ProblemPorxyFactory.getProxy(targetObject);
        problemInterface = (ProblemInterface) proxy;
        Problem problem = new Problem();
        problem = (Problem) object;
        returnMessage = problemInterface.newProblem(problem, dp, request);

    }
View Full Code Here

TOP

Related Classes of cn.edu.pku.dr.requirement.elicitation.data.Problem

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.