|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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<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()
|
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 manager| Method Detail |
|---|
public MutableProjectComponent find(Long id)
throws EntityNotFoundException
find in interface ProjectComponentStoreid - component ID to search for
EntityNotFoundException - if the component is not foundpublic Collection<MutableProjectComponent> findAllForProject(Long projectId)
findAllForProject in interface ProjectComponentStoreprojectId - project ID
protected ComponentConverter getComponentConverter()
public MutableProjectComponent findByComponentName(Long projectId,
String componentName)
throws IllegalArgumentException
ProjectComponentStore
findByComponentName in interface ProjectComponentStoreprojectId - the id of the component's project.componentName - the name of the component to find.
IllegalArgumentExceptionpublic Collection<MutableProjectComponent> findByComponentNameCaseInSensitive(String componentName)
ProjectComponentStore
findByComponentNameCaseInSensitive in interface ProjectComponentStorecomponentName - the name of the component to find.
public Long findProjectIdForComponent(Long componentId)
throws EntityNotFoundException
findProjectIdForComponent in interface ProjectComponentStorecomponentId - component ID
EntityNotFoundException - if component not found for the given component ID
public MutableProjectComponent store(MutableProjectComponent component)
throws EntityNotFoundException,
DataAccessException
store in interface ProjectComponentStorecomponent - component to persist
EntityNotFoundException - in case of update if the component does not exist (maybe was deleted :-)
DataAccessException - if cannot persist the component
public void delete(Long componentId)
throws EntityNotFoundException
ProjectComponentStore
delete in interface ProjectComponentStorecomponentId - ID of the component.
EntityNotFoundException - if component does not exist (maybe was removed previously).
public boolean containsName(String name,
Long projectId)
containsName in interface ProjectComponentStorename - component name, null will cause IllegalArgumentExceptionprojectId - project ID
IllegalArgumentException - if name or projectId is nullpublic Collection findComponentsBylead(String userKey)
findComponentsBylead in interface ProjectComponentStoreuserKey - the lead user's key
public Collection findAll()
findAll in interface ProjectComponentStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||