Package org.zkybase.api.domain.node

Examples of org.zkybase.api.domain.node.Node


  @RequestMapping(value = "/{ciPath}/{id}", method = RequestMethod.GET, produces = "application/json")
  @ResponseBody
  public Dto get(@PathVariable String ciPath, @PathVariable Long id) {
    String ciType = getCiType(ciPath);
    GraphRepository<Node> repo = getRepo(ciType);
    Node node = repo.findOne(id);
    return getMapper(ciType).toDto(node);
  }
View Full Code Here


   
    // Map the DTO string to a DTO. We have to do it ourselves since @RequestBody doesn't work for interfaces.
    String ciType = getCiType(ciPath);
    Class<Dto> dtoClass = getDtoClass(ciType);
    Dto dto = (Dto) objectMapper.readValue(dtoStr, dtoClass);
    Node node = getMapper(ciType).toEntity(dto);
    getRepo(ciType).save(node);
   
    // Node now has an ID, so we can set it on the DTO. (Why am I doing this at all?)
//    Long id = node.getId();
//    dto.setId(id);
View Full Code Here

      @RequestBody Dto dto,
      HttpServletResponse response) {
   
    String ciType = getCiType(ciPath);
    GraphRepository<Node> repo = getRepo(ciType);
    Node node = repo.findOne(id);
    getMapper(ciType).updateEntity(node, dto);
    repo.save(node);
  }
View Full Code Here

TOP

Related Classes of org.zkybase.api.domain.node.Node

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.