Package org.sonar.core.graph.jdbc

Examples of org.sonar.core.graph.jdbc.GraphDto


  public <T extends Perspective> T as(Class<T> perspectiveClass, String componentKey) {
    GraphPerspectiveLoader<T> builder = (GraphPerspectiveLoader<T>) loaders.get(perspectiveClass);
    if (builder == null) {
      throw new IllegalStateException();
    }
    GraphDto graphDto = dao.selectByComponent(builder.getPerspectiveKey(), componentKey);
    return doAs(builder, graphDto);
  }
View Full Code Here


  public <T extends Perspective> T as(Class<T> perspectiveClass, long snapshotId) {
    GraphPerspectiveLoader<T> builder = (GraphPerspectiveLoader<T>) loaders.get(perspectiveClass);
    if (builder == null) {
      throw new IllegalStateException();
    }
    GraphDto graphDto = dao.selectBySnapshot(builder.getPerspectiveKey(), snapshotId);
    return doAs(builder, graphDto);
  }
View Full Code Here

  private void serializePerspectiveData(GraphDtoMapper mapper, ComponentVertex component, Long snapshotId,
                                        GraphPerspectiveBuilder builder) {
    Graph subGraph = SubGraph.extract(component.element(), builder.path());
    String data = write(subGraph);
    mapper.insert(new GraphDto()
      .setData(data)
      .setFormat("graphson")
      .setPerspective(builder.getPerspectiveLoader().getPerspectiveKey())
      .setVersion(1)
      .setResourceId((Long) component.element().getProperty("rid"))
View Full Code Here

TOP

Related Classes of org.sonar.core.graph.jdbc.GraphDto

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.