Package org.focusns.model.core

Examples of org.focusns.model.core.ProjectCategory


        //
        projectService.removeProject(project);
        //
        projectUserDao.delete(project.getCreatedById());
        //
        ProjectCategory category = projectCategoryService.getCategory(project.getCategoryId());
        projectCategoryService.removeCategory(category);

    }
View Full Code Here


        ProjectUser user = projectUserDao.selectByUsername(username);
        if (user!=null && user.getProjectId() > 0) {
            Project project = projectDao.select(user.getProjectId());
            user.setProject(project);
            //
            ProjectCategory projectCategory = projectCategoryDao.select(project.getCategoryId());
            project.setCategory(projectCategory);
        }
        //
        return user;
    }
View Full Code Here

    @Event(on = "CREATE_PROJECT_USER", point = Event.Point.AFTER)
    public void afterCreateProjectUser(EventContext ctx) throws Exception {
        //
        ProjectUser projectUser = (ProjectUser) ctx.getArguments()[0];
        ProjectCategory category = projectCategoryDao.selectByCode("people");
        ProjectTemplate projectTemplate = getProjectTemplate(category.getCode());
        //
        String projectCode = String.valueOf(10000000 + projectUser.getId());
        //
        Date now = new Date();
        Project project = new Project();
        project.setCode(projectCode);
        project.setTitle(projectUser.getNickname());
        project.setDescription(projectTemplate.getDescription());
        project.setCategoryId(category.getId());
        project.setCreatedAt(now);
        project.setModifiedAt(now);
        project.setCreatedById(projectUser.getId());
        project.setModifiedById(projectUser.getId());
        //
View Full Code Here

TOP

Related Classes of org.focusns.model.core.ProjectCategory

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.