Examples of VoteRecord


Examples of org.osforce.connect.entity.commons.VoteRecord

  }
 
  @RequestMapping(value="/vote-action", method=RequestMethod.GET)
  public @ResponseBody Object doVoteAction(@RequestParam String code,
      @RequestParam Long linkedId,@RequestParam String entity, @RequestAttr User user) {
    VoteRecord voteRecord = voteRecordService.getVoteRecord(linkedId, entity, user);
    if(voteRecord==null) {
      voteRecord = new VoteRecord(code, linkedId, entity);
      voteRecord.setUser(user);
      voteRecordService.createVoteRecord(voteRecord);
    } else {
      voteRecord.setCode(code);
      voteRecord.setLinkedId(linkedId);
      voteRecord.setEntity(entity);
      voteRecord.setUser(user);
      voteRecordService.updateVoteRecord(voteRecord);
    }
    return Collections.singletonMap("id", voteRecord.getId());
  }
View Full Code Here

Examples of org.osforce.connect.entity.commons.VoteRecord

  }
 
  @AfterReturning("execution(* org.osforce.connect.service.commons.VoteRecordService.createVoteRecord(..)) ||"
      + "execution(* org.osforce.connect.service.commons.VoteRecordService.updateVoteRecord(..))")
  public void updateVoteRecord(JoinPoint jp) {
    VoteRecord voteRecord = (VoteRecord) jp.getArgs()[0];
    Map<Object, Object> context = CollectionUtil.newHashMap();
    context.put("answerId", voteRecord.getLinkedId());
    //
    answerVoteCountTask.doAsyncTask(context);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.