|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.bc.project.component.OfBizProjectComponentStore
public class OfBizProjectComponentStore
Ofbiz non-caching implementation of ProjectComponentStore
. CachingProjectComponentStore
Field Summary | |
---|---|
static org.apache.log4j.Logger |
log
|
Constructor Summary | |
---|---|
OfBizProjectComponentStore(OfBizDelegator delegator)
Create a new instance of the class backed by the delegator specified. |
Method Summary | |
---|---|
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. |
MutableProjectComponent |
find(Long id)
Retrieve the MutableProjectComponent with the specified ID. |
Collection |
findAll()
Retrieve all ProjectComponent objects stored and sort by name. |
Collection |
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 userName)
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. |
MutableProjectComponent |
store(MutableProjectComponent component)
Persists the component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.log4j.Logger log
Constructor Detail |
---|
public OfBizProjectComponentStore(OfBizDelegator delegator)
delegator
- persistent store managerMethod Detail |
---|
public MutableProjectComponent find(Long id) throws EntityNotFoundException
find
in interface ProjectComponentStore
id
- component ID to search for
EntityNotFoundException
- if the component is not foundpublic Collection findAllForProject(Long projectId)
findAllForProject
in interface ProjectComponentStore
projectId
- project ID
public MutableProjectComponent findByComponentName(Long projectId, String componentName) throws IllegalArgumentException
ProjectComponentStore
findByComponentName
in interface ProjectComponentStore
projectId
- the id of the component's project.componentName
- the name of the component to find.
IllegalArgumentException
public Collection<MutableProjectComponent> findByComponentNameCaseInSensitive(String componentName)
ProjectComponentStore
findByComponentNameCaseInSensitive
in interface ProjectComponentStore
componentName
- the name of the component to find.
public Long findProjectIdForComponent(Long componentId) throws EntityNotFoundException
findProjectIdForComponent
in interface ProjectComponentStore
componentId
- component ID
EntityNotFoundException
- if component not found for the given component IDpublic MutableProjectComponent store(MutableProjectComponent component) throws EntityNotFoundException, DataAccessException
store
in interface ProjectComponentStore
component
- component to persist
EntityNotFoundException
- 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
ProjectComponentStore
delete
in interface ProjectComponentStore
componentId
- ID of the component.
EntityNotFoundException
- if component does not exist (maybe was removed previously).public boolean containsName(String name, Long projectId)
containsName
in interface ProjectComponentStore
name
- component name, null will cause IllegalArgumentExceptionprojectId
- project ID
IllegalArgumentException
- if name or projectId is nullpublic Collection findComponentsBylead(String userName)
findComponentsBylead
in interface ProjectComponentStore
userName
- the lead user name
public Collection findAll()
findAll
in interface ProjectComponentStore
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |