public static EntityIssueEvent createEntity(IssueEvent gitIssueEvent, GenericDao dao) {
if (gitIssueEvent == null) {
return null;
}
EntityIssueEvent issueEvent = getEventByIssueEventID(gitIssueEvent.getId(), dao);
if (issueEvent == null) {
issueEvent = new EntityIssueEvent();
issueEvent.setMineredAt(new Date());
issueEvent.setCreatedAt(gitIssueEvent.getCreatedAt());
issueEvent.setActor(UserServices.createEntity(gitIssueEvent.getActor(), dao, false));
issueEvent.setCommitId(gitIssueEvent.getCommitId());
issueEvent.setEvent(gitIssueEvent.getEvent());
issueEvent.setIdIssueEvent(gitIssueEvent.getId());
issueEvent.setUrl(gitIssueEvent.getUrl());
dao.insert(issueEvent);
}
return issueEvent;