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

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


    public static EntityCommit createEntity(Commit gitCommit, GenericDao dao) {
        if (gitCommit == null) {
            return null;
        }

        EntityCommit commit = getCommitByURL(gitCommit.getUrl(), dao);

        if (commit == null) {
            commit = new EntityCommit();
        }

        commit.setMineredAt(new Date());
        commit.setAuthor(CommitUserServices.createEntity(gitCommit.getAuthor(), dao));
        commit.setCommitter(CommitUserServices.createEntity(gitCommit.getCommitter(), dao));
        commit.setCommentCount(gitCommit.getCommentCount());
        commit.setMessage(gitCommit.getMessage());
//        createParents(commit, gitCommit.getParents(), gitRepo, dao);
        commit.setSha(gitCommit.getSha());
        //  commit.setTree(TreeServices.createTreeEntity(gitCommit.getTree(), gitRepo, dao));
        commit.setUrl(gitCommit.getUrl());

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

TOP

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

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.