public interface VersionStore
This is used by the VersionManager to store and retrieve Project Versions.
Most of the methods still work with GenericValue
s, 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.
Modifier and Type | Method and Description |
---|---|
Version |
createVersion(Version version) |
void |
deleteAllVersions(Long projectId)
Deletes all versions in a given project by removing them from database.
|
void |
deleteVersion(Version version)
Deletes given Version object by removing it from database.
|
Iterable<Version> |
getAllVersions()
Returns a list of GenericValues representing all Versions in JIRA, ordered by sequence.
|
Version |
getVersion(Long id) |
Iterable<Version> |
getVersionsByName(String name)
Returns a list of GenericValues representing all Versions in JIRA with a given name, case insensitively.
|
Iterable<Version> |
getVersionsByProject(Long projectId)
Returns a list of GenericValues representing all Versions in a project.
|
void |
storeVersion(Version version)
Stores an individual Version in the DB.
|
void |
storeVersions(Collection<Version> versions)
Stores a collection of Version objects.
|
@Nonnull Iterable<Version> getAllVersions()
@Nonnull Iterable<Version> getVersionsByName(String name)
name
- Version name@Nonnull Iterable<Version> getVersionsByProject(Long projectId)
projectId
- Project Idvoid storeVersion(@Nonnull Version version)
storeVersions(java.util.Collection<com.atlassian.jira.project.version.Version>)
, it can be more efficient.version
- The Version to store.storeVersions(java.util.Collection<com.atlassian.jira.project.version.Version>)
void storeVersions(@Nonnull Collection<Version> versions)
storeVersion() multiple times.
eg the CachingVersionStore
will reload the cache from DB with every call to storeVersion().
versions
- Collection of Version objects.storeVersion(Version)
void deleteVersion(@Nonnull Version version)
version
- to be deletedCopyright © 2002-2021 Atlassian. All Rights Reserved.