@InjectableComponent public class

ProjectResolver

extends Object
implements NameResolver<T>
java.lang.Object
   ↳ com.atlassian.jira.jql.resolver.ProjectResolver

Class Overview

Resolves Project objects and ids from their names.

Summary

Public Constructors
ProjectResolver(ProjectManager projectManager)
Public Methods
boolean equals(Object o)
Project get(Long id)
Get by id.
Collection<Project> getAll()
Gets all domain objects of this type in the underlying database.
List<String> getIdsFromName(String name)
Returns the list of ids of T objects that have the given name.
int hashCode()
boolean idExists(Long id)
Returns true if the id would resolve to a domain object.
boolean nameExists(String name)
Returns true if the name would resolve to a domain object.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.jql.resolver.NameResolver

Public Constructors

public ProjectResolver (ProjectManager projectManager)

Public Methods

public boolean equals (Object o)

public Project get (Long id)

Get by id.

Parameters
id the id.
Returns
  • the domain object or null on lookup failure.

public Collection<Project> getAll ()

Gets all domain objects of this type in the underlying database. Note that calling this may not be a good idea for some domain object types.

Returns
  • all objects of the configured type in the database (possibly empty, never null).

public List<String> getIdsFromName (String name)

Returns the list of ids of T objects that have the given name. Names may be unique but often are not, hence the List return type.

Parameters
name the name of the T.
Returns
  • all IDs of objects matching the name or the empty list on name lookup failure.

public int hashCode ()

public boolean idExists (Long id)

Returns true if the id would resolve to a domain object.

Parameters
id the primary key.
Returns
  • true only if the id resolves to a domain object in the database.

public boolean nameExists (String name)

Returns true if the name would resolve to a domain object.

Parameters
name the addressable name.
Returns
  • true only if the name resolves to a domain object in the database.