Package com.art.anette.datamodel.dataobjects.relations

Examples of com.art.anette.datamodel.dataobjects.relations.EmployeeProjectRelation


            return existsProject(wp.getProjectId()) && isAllowedToView(wp.getProject());
        } else if (dObj instanceof Task) {
            final Task t = (Task) dObj;
            return existsWorkPackage(t.getWorkPackageId()) && isAllowedToView(t.getWorkPackage());
        } else if (dObj instanceof EmployeeProjectRelation) {
            final EmployeeProjectRelation epr = (EmployeeProjectRelation) dObj;
            return existsProject(epr.getRightId()) && isAllowedToView(epr.getRight());
        } else if (dObj instanceof EmployeeWorkPackageRelation) {
            final EmployeeWorkPackageRelation ewpr = (EmployeeWorkPackageRelation) dObj;
            return existsWorkPackage(ewpr.getRightId()) && isAllowedToView(ewpr.getRight());
        } else {
            return exists(dObj) || (dObj.isNew() && isAllowedToEdit(dObj));
View Full Code Here


            if (user.isManager(employee.getDepartment())) {
                return true;
            }
            return false;
        } else if (obj instanceof EmployeeProjectRelation) {
            EmployeeProjectRelation relation = (EmployeeProjectRelation) obj;
            return user.isAllowedToEdit(relation.getRight());
        } else if (obj instanceof EmployeeWorkPackageRelation) {
            EmployeeWorkPackageRelation relation = (EmployeeWorkPackageRelation) obj;
            return user.isAllowedToEdit(relation.getRight());
        } else if (obj instanceof WorkPackageDependsRelation) {
            WorkPackageDependsRelation relation = (WorkPackageDependsRelation) obj;
            return user.isAllowedToEdit(relation.getLeft()) && user.isAllowedToEdit(relation.getRight());
        } else if (obj instanceof FTOverride) {
            FTOverride ftOverride = (FTOverride) obj;
            return user.isCompanyManager();
        }
View Full Code Here

            }

            String q = SQLFormatter.generateQuery("SELECT * FROM %s WHERE project IN (%s) AND %s", EmployeeProjectRelation.getTableName(), project, getTimestampQuery(ts));
            ResultSet rs = dbConnector.query(q);
            while (rs.next()) {
                result.add(new EmployeeProjectRelation(sdbc, rs));
            }
            rs.close();

        } catch (SQLException ex) {
            logger.severe(null, ex);
View Full Code Here

            e.setDepartmentId(mdObj.getId());
        } else if (mdObj instanceof Project) {
            EPRData eprd = new EPRData();
            eprd.employee = e.getId();
            eprd.project = mdObj.getId();
            addModifiedDataObject(new EmployeeProjectRelation(null, eprd));
        } else if (mdObj instanceof WorkPackage) {
            EWPRData ewprd = new EWPRData();
            ewprd.employee = e.getId();
            ewprd.workpackage = mdObj.getId();
            addModifiedDataObject(new EmployeeWorkPackageRelation(null, ewprd));
View Full Code Here

            e.remove();
        } else if (mdObj instanceof Project) {
            EPRData eprd = new EPRData();
            eprd.employee = e.getId();
            eprd.project = mdObj.getId();
            employeeProjectRelations.get(new EmployeeProjectRelation(null, eprd)).remove();

        } else if (mdObj instanceof WorkPackage) {
            for (Task t : ((WorkPackage) mdObj).getTasks(null)) {
                t.remove();
            }
View Full Code Here

TOP

Related Classes of com.art.anette.datamodel.dataobjects.relations.EmployeeProjectRelation

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.