com.atlassian.jira.project.version
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
 org.ofbiz.core.entity.GenericValue createVersion(Map<String,Object> versionParams)
           
 void deleteVersion(org.ofbiz.core.entity.GenericValue versionGV)
           
 List<org.ofbiz.core.entity.GenericValue> getAllVersions()
          Returns a list of GenericValues representing all Versions in JIRA, ordered by sequence.
 org.ofbiz.core.entity.GenericValue getVersion(Long id)
           
 List<org.ofbiz.core.entity.GenericValue> getVersionsByName(String name)
          Returns a list of GenericValues representing all Versions in JIRA with a given name, case insensitively.
 List<org.ofbiz.core.entity.GenericValue> 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.
 

Method Detail

getVersion

org.ofbiz.core.entity.GenericValue getVersion(Long id)

getAllVersions

List<org.ofbiz.core.entity.GenericValue> 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

List<org.ofbiz.core.entity.GenericValue> getVersionsByName(String name)
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

List<org.ofbiz.core.entity.GenericValue> getVersionsByProject(Long projectId)
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

org.ofbiz.core.entity.GenericValue createVersion(Map<String,Object> versionParams)

storeVersion

void storeVersion(Version version)
Stores an individual Version in the DB. If you want to store a collection of Versions, consider using storeVersions(java.util.Collection), it can be more efficient.

Parameters:
version - The Version to store.
See Also:
storeVersions(java.util.Collection)

storeVersions

void storeVersions(Collection<Version> versions)
Stores a collection of Version objects. This method can have performance benefits over calling storeVersion() multiple times. eg the CachingVersionStore will reload the cache from DB with every call to storeVersion().

Parameters:
versions - Collection of Version objects.
See Also:
storeVersion(Version)

deleteVersion

void deleteVersion(org.ofbiz.core.entity.GenericValue versionGV)


Copyright © 2002-2014 Atlassian. All Rights Reserved.