org.sonar.batch.index
Class DefaultResourcePersister
java.lang.Object
org.sonar.batch.index.DefaultResourcePersister
- All Implemented Interfaces:
- ResourcePersister
public final class DefaultResourcePersister
- extends Object
- implements ResourcePersister
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultResourcePersister
public DefaultResourcePersister(DatabaseSession session)
saveProject
public Snapshot saveProject(Project project,
Project parent)
- Specified by:
saveProject
in interface ResourcePersister
getSnapshot
public Snapshot getSnapshot(Resource reference)
- Specified by:
getSnapshot
in interface ResourcePersister
getSnapshotOrFail
public Snapshot getSnapshotOrFail(Resource resource)
throws ResourceNotPersistedException
- Specified by:
getSnapshotOrFail
in interface ResourcePersister
- Throws:
ResourceNotPersistedException
- if the resource is not persisted.
saveResource
public Snapshot saveResource(Project project,
Resource resource)
- Description copied from interface:
ResourcePersister
- Persist a resource in database. Returns null if the resource must not be persisted (scope lower than file)
- Specified by:
saveResource
in interface ResourcePersister
saveResource
public Snapshot saveResource(Project project,
Resource resource,
Resource parent)
- Description copied from interface:
ResourcePersister
- Persist a resource in database. Returns null if the resource must not be persisted (scope lower than file)
- Specified by:
saveResource
in interface ResourcePersister
getLastSnapshot
public Snapshot getLastSnapshot(Snapshot snapshot,
boolean onlyOlder)
- Description copied from interface:
ResourcePersister
- The current snapshot which is flagged as "last", different then the current analysis.
- Specified by:
getLastSnapshot
in interface ResourcePersister
onlyOlder
- true if the result must be anterior to the snapshot parameter
clear
public void clear()
- Specified by:
clear
in interface ResourcePersister
Copyright © 2009-2011 SonarSource. All Rights Reserved.