public class OfBizVersionStore extends Object implements VersionStore
Constructor and Description |
---|
OfBizVersionStore(EntityEngine entityEngine,
DbConnectionManager dbConnectionManager) |
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.
|
public OfBizVersionStore(EntityEngine entityEngine, DbConnectionManager dbConnectionManager)
@Nonnull public Iterable<Version> getAllVersions()
VersionStore
getAllVersions
in interface VersionStore
@Nonnull public Iterable<Version> getVersionsByName(@Nonnull String name)
VersionStore
getVersionsByName
in interface VersionStore
name
- Version name@Nonnull public Iterable<Version> getVersionsByProject(@Nonnull Long projectId)
VersionStore
getVersionsByProject
in interface VersionStore
projectId
- Project Id@Nonnull public Version createVersion(@Nonnull Version version)
createVersion
in interface VersionStore
public void storeVersion(@Nonnull Version version)
VersionStore
VersionStore.storeVersions(java.util.Collection<com.atlassian.jira.project.version.Version>)
, it can be more efficient.storeVersion
in interface VersionStore
version
- The Version to store.VersionStore.storeVersions(java.util.Collection<com.atlassian.jira.project.version.Version>)
public void storeVersions(@Nonnull Collection<Version> versions)
VersionStore
storeVersion() multiple times.
eg the CachingVersionStore
will reload the cache from DB with every call to storeVersion().
storeVersions
in interface VersionStore
versions
- Collection of Version objects.VersionStore.storeVersion(Version)
public Version getVersion(@Nonnull Long id)
getVersion
in interface VersionStore
public void deleteVersion(@Nonnull Version version)
VersionStore
deleteVersion
in interface VersionStore
version
- to be deletedpublic void deleteAllVersions(@Nonnull Long projectId)
VersionStore
deleteAllVersions
in interface VersionStore
projectId
- of the project in which the versions will be deleted.Copyright © 2002-2021 Atlassian. All Rights Reserved.