Package net.sf.pmr.core.domain.basicProject

Examples of net.sf.pmr.core.domain.basicProject.BasicProject


        List collectionToReturn = null;

        if (object instanceof BasicProject) {

            BasicProject basicProject = (BasicProject) object;

            //getHibernateTemplate().lock(basicProject, LockMode.NONE);

            //collectionToReturn = basicProject.getMembers();
View Full Code Here


    * @see net.sf.pmr.core.service.BasicProjectService#addOrUpdate(int, java.lang.String, java.lang.String, int, long)
    */
    public Errors addOrUpdate(final int id, final String code, final String name, final int defaultMemberId, final long persistanceVersion) {

        // First call for a project instance
        BasicProject basicProject = CoreObjectFactory.getBasicProject();

        // populate the instance
        basicProject.setId(id);
        basicProject.setCode(code);
        basicProject.setName(name);
        basicProject.setPersistanceVersion(persistanceVersion);

        // then find the default member in the user repository
        User user = userRepository.findUserById(defaultMemberId);

        // add the user to the set of members
        Set members = new HashSet();
        members.add(user);
        basicProject.setMembers(members);

        // validation of the basicProject
        Errors errors = basicProjectValidator.validate(basicProject);

        if (!errors.hasErrors()) {
View Full Code Here

TOP

Related Classes of net.sf.pmr.core.domain.basicProject.BasicProject

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.