Package br.edu.utfpr.cm.JGitMinerWeb.model.miner

Examples of br.edu.utfpr.cm.JGitMinerWeb.model.miner.EntityMilestone


        EntityRepository repository = dao.findByID(repositoryToMinerId, EntityRepository.class);
        int i = 0;
        calculeSubProgress(i, gitMilestones.size());
        while (!canceled && i < gitMilestones.size()) {
            Milestone gitMilestone = gitMilestones.get(i);
            EntityMilestone milestone = minerMilestone(gitMilestone, repository);
            repository.addMilestone(milestone);
            dao.edit(milestone);
            i++;
            calculeSubProgress(i, gitMilestones.size());
        }
View Full Code Here


            calculeSubProgress(i, gitMilestones.size());
        }
    }

    private EntityMilestone minerMilestone(Milestone gitMilestone, EntityRepository repository) {
        EntityMilestone milestone = null;
        try {
            milestone = MilestoneServices.createEntity(gitMilestone, repository, dao);
            out.printLog("Milestone gravado com sucesso: " + gitMilestone.getTitle() + " - Number: " + gitMilestone.getNumber());
        } catch (Exception ex) {
            ex.printStackTrace();
View Full Code Here

    public static EntityMilestone createEntity(Milestone gitMilestone, EntityRepository repository, GenericDao dao) {
        if (gitMilestone == null) {
            return null;
        }

        EntityMilestone milestone = getMilestoneByURL(gitMilestone.getUrl(), dao);

        if (milestone == null) {
            milestone = new EntityMilestone();
            milestone.setCreator(UserServices.createEntity(gitMilestone.getCreator(), dao, false));
            milestone.setUrl(gitMilestone.getUrl());
            milestone.setNumber(gitMilestone.getNumber());
            milestone.setCreatedAt(gitMilestone.getCreatedAt());
            if (repository != null) {
                milestone.setRepository(repository);
            }
        }

        milestone.setDueOn(gitMilestone.getDueOn());
        milestone.setClosedIssues(gitMilestone.getClosedIssues());
        milestone.setOpenIssues(gitMilestone.getOpenIssues());
        milestone.setDescription(gitMilestone.getDescription());
        milestone.setStateMilestone(gitMilestone.getState());
        milestone.setTitle(gitMilestone.getTitle());

        if (milestone.getId() == null || milestone.getId().equals(0l)) {
            dao.insert(milestone);
        } else {
            dao.edit(milestone);
        }
View Full Code Here

TOP

Related Classes of br.edu.utfpr.cm.JGitMinerWeb.model.miner.EntityMilestone

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.