org.sonar.batch.index
Interface ResourcePersister

All Known Implementing Classes:
DefaultResourcePersister

public interface ResourcePersister


Method Summary
 void clear()
           
 Snapshot getLastSnapshot(Snapshot snapshot, boolean onlyOlder)
          The current snapshot which is flagged as "last", different then the current analysis.
 Snapshot getSnapshot(Resource resource)
           
 Snapshot getSnapshotOrFail(Resource resource)
           
 Snapshot saveProject(Project project, Project parent)
           
 Snapshot saveResource(Project project, Resource resource)
          Persist a resource in database.
 Snapshot saveResource(Project project, Resource resource, Resource parent)
          Persist a resource in database.
 

Method Detail

saveProject

Snapshot saveProject(Project project,
                     Project parent)

saveResource

Snapshot saveResource(Project project,
                      Resource resource,
                      Resource parent)
Persist a resource in database. Returns null if the resource must not be persisted (scope lower than file)


saveResource

Snapshot saveResource(Project project,
                      Resource resource)
Persist a resource in database. Returns null if the resource must not be persisted (scope lower than file)


getSnapshot

Snapshot getSnapshot(Resource resource)

getSnapshotOrFail

Snapshot getSnapshotOrFail(Resource resource)
Throws:
ResourceNotPersistedException - if the resource is not persisted.

getLastSnapshot

Snapshot getLastSnapshot(Snapshot snapshot,
                         boolean onlyOlder)
The current snapshot which is flagged as "last", different then the current analysis.

Parameters:
onlyOlder - true if the result must be anterior to the snapshot parameter

clear

void clear()


Copyright © 2009-2012 SonarSource. All Rights Reserved.