public class OfBizProjectComponentStore extends Object implements ProjectComponentStore
ProjectComponentStore. CachingProjectComponentStore| Modifier and Type | Field and Description |
|---|---|
static org.apache.log4j.Logger |
log |
| Constructor and Description |
|---|
OfBizProjectComponentStore(OfBizDelegator delegator,
DbConnectionManager dbConnectionManager) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsName(String name,
Long projectId)
Check whether component with specified name is stored.
|
void |
delete(Long componentId)
Remove the given component from the persistent storage.
|
void |
deleteAllComponents(Long projectId)
Deletes all components in given project.
|
MutableProjectComponent |
find(Long id)
Retrieve the MutableProjectComponent with the specified ID.
|
Collection |
findAll()
Retrieve all ProjectComponent objects stored and sort by name.
|
Collection<MutableProjectComponent> |
findAllForProject(Long projectId)
Retrieve all components that are related to the project with given ID and sort by name.
|
MutableProjectComponent |
findByComponentName(Long projectId,
String componentName)
Finds the ProjectComponent with the given name (case sensitive) in the project with the
given Id.
|
Collection<MutableProjectComponent> |
findByComponentNameCaseInSensitive(String componentName)
Finds the ProjectComponents with the given name (case insensitive) in all projects.
|
Collection |
findComponentsBylead(String userKey)
Retrieve a collection of components - where the lead of each component is the specified user.
|
Long |
findProjectIdForComponent(Long componentId)
Retrieve the project ID for the given component ID.
|
protected ComponentConverter |
getComponentConverter() |
ProjectComponent |
getProjectComponent(Long projectComponentId)
Returns the ProjectComponent for the given ID, or null.
|
MutableProjectComponent |
store(MutableProjectComponent component)
Persists the component.
|
public OfBizProjectComponentStore(OfBizDelegator delegator, DbConnectionManager dbConnectionManager)
public MutableProjectComponent find(Long id) throws EntityNotFoundException
find in interface ProjectComponentStoreid - component ID to search forEntityNotFoundException - if the component is not foundpublic ProjectComponent getProjectComponent(Long projectComponentId)
ProjectComponentStoregetProjectComponent in interface ProjectComponentStoreprojectComponentId - the IDpublic Collection<MutableProjectComponent> findAllForProject(Long projectId)
findAllForProject in interface ProjectComponentStoreprojectId - project IDprotected ComponentConverter getComponentConverter()
public MutableProjectComponent findByComponentName(Long projectId, String componentName) throws IllegalArgumentException
ProjectComponentStorefindByComponentName in interface ProjectComponentStoreprojectId - the id of the component's project.componentName - the name of the component to find.IllegalArgumentExceptionpublic Collection<MutableProjectComponent> findByComponentNameCaseInSensitive(String componentName)
ProjectComponentStorefindByComponentNameCaseInSensitive in interface ProjectComponentStorecomponentName - the name of the component to find.public Long findProjectIdForComponent(Long componentId) throws EntityNotFoundException
findProjectIdForComponent in interface ProjectComponentStorecomponentId - component IDEntityNotFoundException - if component not found for the given component IDpublic MutableProjectComponent store(MutableProjectComponent component) throws EntityNotFoundException, DataAccessException
store in interface ProjectComponentStorecomponent - component to persistEntityNotFoundException - in case of update if the component does not exist (maybe was deleted :-)DataAccessException - if cannot persist the componentpublic void delete(Long componentId) throws EntityNotFoundException
ProjectComponentStoredelete in interface ProjectComponentStorecomponentId - ID of the component.EntityNotFoundException - if component does not exist (maybe was removed previously).public void deleteAllComponents(@Nonnull Long projectId)
ProjectComponentStoredeleteAllComponents in interface ProjectComponentStoreprojectId - id of the project in which components will be deleted.public boolean containsName(String name, Long projectId)
containsName in interface ProjectComponentStorename - component name, null will cause IllegalArgumentExceptionprojectId - project IDIllegalArgumentException - if name or projectId is nullpublic Collection findComponentsBylead(String userKey)
findComponentsBylead in interface ProjectComponentStoreuserKey - the lead user's keypublic Collection findAll()
findAll in interface ProjectComponentStoreCopyright © 2002-2021 Atlassian. All Rights Reserved.