Package beans.user.job.entity

Examples of beans.user.job.entity.DangerJob


        while(iterator.hasNext()) {
            ProfcheckupContractChunk chunk = new ProfcheckupContractChunk();
            Object[] objects = (Object[]) iterator.next();
           
            Polis pol = (Polis)objects[0];
            DangerJob d = (DangerJob)objects[1];

            chunk.danger = d.getDetails((RightChecker) this);
            chunk.polis = pol.getDetails((RightChecker) this);
            chunk.contract = pol.getContract().getDetails((RightChecker) this);
            chunk.client = pol.getClient().getDetails((RightChecker) this);
            System.out.println("danger: " + chunk.danger.dangerId + " job: " + chunk.danger.jobId + " polis: " + chunk.polis.id + " contract: " + chunk.contract.id + " client: " + pol.getClient().getFio());
            list.add(chunk);
View Full Code Here


        Field f[] = {
            new Field("key.job", jobId),
            new Field("key.danger", details.dangerId)
        };
        List list = findEntityList(DangerJob.class, f);
        DangerJob dangerJob = null;
        AuditDoc<DangerJob> auditDJ;
        if (!list.isEmpty()){
            dangerJob = findEntityList(DangerJob.class, f).get(0);//Должна быть одна
            auditDJ = new AuditDoc<DangerJob>(dangerJob, getCollaborator());
            dangerJob.setLastExam(details.lastExam);
            dangerJob.setExamManually(true);///Если заюзано из бина значит руками
        }else {
            auditDJ = new AuditDoc<DangerJob>(null, getCollaborator());
            dangerJob = new DangerJob();
            dangerJob.setKey(new DangerJobPK(details.dangerId, jobId));
            dangerJob.setDanger(findEntity(Danger.class, details.dangerId));
            dangerJob.setJob(findEntity(Job.class, jobId));
            dangerJob.setLastExam(details.lastExam);
            dangerJob.setExamManually(details.lastExamManually);
        }
        int id = saveEntity(dangerJob);
        auditDJ.check(dangerJob);
        return new ModificationInfo(id, persistAudit(auditDJ));
View Full Code Here

        }

        Iterator list = findEntityList(DangerJob.class, "key.job", jobId).iterator();
        Set<DangerJobDetails> res = new HashSet<DangerJobDetails>();
        while (list.hasNext()) {
            DangerJob ds = (DangerJob) list.next();
            DangerJobDetails chunk = new DangerJobDetails();
            chunk.jobId = jobId;
            chunk.dangerId = ds.getKey().getDanger();
            chunk.lastExam = ds.getLastExam();
            chunk.lastExamManually = ds.isExamManually();
            res.add(chunk);
        }

        return res;
    }
View Full Code Here

        checkEntityExist();
        Field f[] = {
            new Field("key.job", jobId),
            new Field("key.danger", details.dangerId)
        };
        DangerJob dangerJob = findEntityList(DangerJob.class, f).get(0);//Должна быть одна
        checkTheSame(findEntity(Job.class, dangerJob.getKey().getJob()));
        AuditDoc<DangerJob> auditDJ = new AuditDoc<DangerJob>(dangerJob, getCollaborator());
        manager.remove(dangerJob);
        auditDJ.check(null);
        return new ModificationInfo(0, persistAudit(auditDJ));
    }
View Full Code Here

TOP

Related Classes of beans.user.job.entity.DangerJob

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.