/** * Retrieve a collection of components - where the lead of each component is the specified user. * * @param userKey the lead user's key * @return collection of components - where the lead of each component is the specified user */ public Collection findComponentsBylead(String userKey) { return getComponentConverter().convertToComponents(findComponentGVs(FIELD_LEAD, userKey)); }
public Collection<MutableProjectComponent> findByComponentNameCaseInSensitive(String componentName) { if (componentName == null) { throw new IllegalArgumentException("Component Name is required, was null."); } final Collection<MutableProjectComponent> components = getComponentConverter().convertToComponents(delegator.findAll(OfBizDelegator.PROJECT_COMPONENT)); List<MutableProjectComponent> matched = new ArrayList<MutableProjectComponent>(); for (MutableProjectComponent component : components) { if (componentName.equalsIgnoreCase(component.getName())) { matched.add(component); } } return matched; }
/** * Retrieve all components that are related to the project with given ID and sort by name. * * @param projectId project ID * @return a collection of ProjectComponent objects that are related to the project with given ID */ public Collection<MutableProjectComponent> findAllForProject(Long projectId) { return getComponentConverter().convertToComponents(findComponentGVs(FIELD_PROJECT, projectId,FIELD_NAME)); }
/** * Retrieve all ProjectComponent objects stored and sort by name. * * @return all ProjectComponent objects stored */ public Collection findAll() { return getComponentConverter().convertToComponents(delegator.findAll(OfBizDelegator.PROJECT_COMPONENT, CollectionBuilder.list(FIELD_NAME))); }