java.lang.Object | |
↳ | com.atlassian.jira.bc.project.component.CachingProjectComponentStore |
Decorates an implementation of the project component delegateStore with caching. The actual delegateStore implementation is delegated so this class is a Composite and also a Decorator.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new instance of this class backed by given delegateStore.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Checks whether component with specified name is stored.
| |||||||||||
Removes the component from the persistent storage and a cache.
| |||||||||||
Looks up the project component by the given ID and returns it.
| |||||||||||
Retrieve all ProjectComponent objects stored.
| |||||||||||
Looks up all components that are related to the project with given ID.
| |||||||||||
Looks up the component with the given name in the project with the given id.
| |||||||||||
Finds one or more ProjectComponent with a given name.
| |||||||||||
Retrieves all ProjectComponents that have the given user as their lead.
| |||||||||||
Looks up the project ID for the given component ID.
| |||||||||||
Persist the component.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.jira.bc.project.component.ProjectComponentStore
|
Creates a new instance of this class backed by given delegateStore. Initialises the cache with the data in the persistence store.
delegateStore | underlying persistence store |
---|
Checks whether component with specified name is stored.
name | component name, null will cause IllegalArgumentException |
---|
IllegalArgumentException | if name or projectId is null |
---|
Removes the component from the persistent storage and a cache.
componentId | the id of the component to delete |
---|
EntityNotFoundException | if component does not exist (maybe was removed previously :-) |
---|
Looks up the project component by the given ID and returns it. If not found, throws the EntityNotFoundException, it never returns null.
id | project component ID |
---|
EntityNotFoundException | if the component not found |
---|
Retrieve all ProjectComponent objects stored.
Looks up all components that are related to the project with given ID.
projectId | project ID |
---|
Looks up the component with the given name in the project with the given id. Not synchronised, because we get a private copy of the list from findAllForProject()
projectId | id of the project. |
---|---|
componentName | name of the component. |
EntityNotFoundException | if no such component can be found. |
---|
Finds one or more ProjectComponent with a given name. Not synchronised, because findAll() returns a private copy of all components.
componentName | the name of the component to find. |
---|
EntityNotFoundException |
---|
Retrieves all ProjectComponents that have the given user as their lead. Not synchronised, because findAll() returns a private copy of all components.
userKey | key of the lead user |
---|
Looks up the project ID for the given component ID. If project is not found, throws EntityNotFoundException.
componentId | component ID |
---|
EntityNotFoundException | if project not found for the given component ID |
---|
Persist the component. If component has no ID (null) it is inserted to the database and added to the cache, otherwise an update operation is performed on both cache and database. Note: this method doesn't need to be synchronized because it just delegates to others that are.
component | component to persist |
---|
EntityNotFoundException | in case of update if the component does not exist (maybe was deleted :-) |
---|---|
DataAccessException | if cannot persist the component |