private UserActionResult genUserAction(EntityAction action) {
    UserActionResult userActionResult = new UserActionResult();
    userActionResult.setActionType(action.getActionType());
    userActionResult.setTime(action.getTime());
    Id actorId = action.getActorId();
    if (actorId != null) {
      userActionResult.setActor(EntityUser.load(actorId));
    }
    userActionResult.setUserType(action.getUserType());
    Id documentId = action.getDocumentId();
    if (documentId != null) {
      userActionResult.setDocument(EntityDocument.load(documentId));
    }
    Id delegateId = action.getDelegateId();
    if (delegateId != null) {
      userActionResult.setDelegate(EntityUser.load(delegateId));
    }
    Id voteId = action.getVoteId();
    if (voteId != null) {
      userActionResult.setVote(EntityVote.load(voteId));
    }
    userActionResult.setVoteDecision(action.getVoteDecision());
    return userActionResult;
  }