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

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


            }
        }
    }

    private void minerTeams(List<Team> gitTeams) {
        EntityRepository repository = dao.findByID(repositoryToMinerId, EntityRepository.class);
        int i = 0;
        calculeSubProgress(i, gitTeams.size());
        while (!canceled && i < gitTeams.size()) {
            Team gitTeam = gitTeams.get(i);
            EntityTeam team = minerTeam(gitTeam);
            repository.addTeam(team);
            dao.edit(team);
            i++;
            calculeSubProgress(i, gitTeams.size());
        }
    }
View Full Code Here


        }
        return team;
    }

    private void minerMilestones(List<Milestone> gitMilestones) {
        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

    public static EntityRepository createEntity(Repository gitRepository, GenericDao dao, boolean primary) {
        if (gitRepository == null) {
            return null;
        }

        EntityRepository repo = getRepositoryByIdRepository(gitRepository.getId(), dao);

        if (primary || repo == null) {
            if (repo == null) {
                repo = new EntityRepository();
            }
            repo.setParent(RepositoryServices.createEntity(gitRepository.getParent(), dao, false));
            repo.setSource(RepositoryServices.createEntity(gitRepository.getSource(), dao, false));
            repo.setMasterBranch(gitRepository.getMasterBranch());
        }

        repo.setMineredAt(new Date());
        repo.setPrimaryMiner(primary);
        repo.setFork(gitRepository.isFork());
        repo.setHasDownloads(gitRepository.isHasDownloads());
        repo.setHasIssues(gitRepository.isHasIssues());
        repo.setHasWiki(gitRepository.isHasWiki());
        repo.setIsPrivate(gitRepository.isPrivate());
        repo.setCreatedAt(gitRepository.getCreatedAt());
        repo.setPushedAt(gitRepository.getPushedAt());
        repo.setUpdatedAt(gitRepository.getUpdatedAt());
        repo.setIdRepository(gitRepository.getId());
        repo.setSizeRepository(gitRepository.getSize());
        repo.setCloneUrl(gitRepository.getCloneUrl());
        repo.setDescription(gitRepository.getDescription());
        repo.setHomepage(gitRepository.getHomepage());
        repo.setGitUrl(gitRepository.getGitUrl());
        repo.setHtmlUrl(gitRepository.getHtmlUrl());
        repo.setLanguageRepository(gitRepository.getLanguage());
        repo.setMirrorUrl(gitRepository.getMirrorUrl());
        repo.setName(gitRepository.getName());
        repo.setSshUrl(gitRepository.getSshUrl());
        repo.setSvnUrl(gitRepository.getSvnUrl());
        repo.setUrl(gitRepository.getUrl());
        repo.setOwner(UserServices.createEntity(gitRepository.getOwner(), dao, false));

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

TOP

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

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.