Interface VersionStore
- All Known Implementing Classes:
CachingVersionStore,OfBizVersionStore
public interface VersionStore
Interface for the VersionStore.
This is used by the VersionManager to store and retrieve Project Versions.
Most of the methods still work with GenericValues, because this happens to be useful to the DefaultVersionManager.
(Specifically, it uses EntityUtil.filterByAnd() to filter the List of GenericValues returned by the getAllVersions() method).
On the other hand, storeVersions() takes a List of Version objects because this is what the DefaultVersionManager wants.
-
Method Summary
Modifier and TypeMethodDescriptioncreateVersion(Version version) voiddeleteAllVersions(Long projectId) Deletes all versions in a given project by removing them from database.voiddeleteVersion(Version version) Deletes given Version object by removing it from database.Returns a list of GenericValues representing all Versions in JIRA, ordered by sequence.getVersion(Long id) getVersionsByName(String name) Returns a list of GenericValues representing all Versions in JIRA with a given name, case insensitively.getVersionsByProject(Long projectId) Returns a list of GenericValues representing all Versions in a project.voidstoreVersion(Version version) Stores an individual Version in the DB.voidstoreVersions(Collection<Version> versions) Stores a collection of Version objects.
-
Method Details
-
getVersion
-
getAllVersions
Returns a list of GenericValues representing all Versions in JIRA, ordered by sequence.- Returns:
- a list of GenericValues representing all Versions in JIRA, ordered by sequence.
-
getVersionsByName
Returns a list of GenericValues representing all Versions in JIRA with a given name, case insensitively.- Parameters:
name- Version name- Returns:
- a list of GenericValues representing all Versions in JIRA with a given name, case insensitively.
-
getVersionsByProject
Returns a list of GenericValues representing all Versions in a project.- Parameters:
projectId- Project Id- Returns:
- a list of GenericValues representing all Versions in a project
-
createVersion
-
storeVersion
Stores an individual Version in the DB. If you want to store a collection of Versions, consider usingstoreVersions(java.util.Collection<com.atlassian.jira.project.version.Version>), it can be more efficient.- Parameters:
version- The Version to store.- See Also:
-
storeVersions
Stores a collection of Version objects. This method can have performance benefits over callingstoreVersion()multiple times. eg theCachingVersionStorewill reload the cache from DB with every call tostoreVersion().- Parameters:
versions- Collection of Version objects.- See Also:
-
deleteVersion
Deletes given Version object by removing it from database.- Parameters:
version- to be deleted
-
deleteAllVersions
Deletes all versions in a given project by removing them from database.- Parameters:
projectId- of the project in which the versions will be deleted.
-