Ejemplo n.º 1
0
 private ProjectResource getProjectResource(Long resourceCategoryId) {
   ProjectResource projectResource = null;
   if (this.project.getProjectResourceList() == null) {
     return null;
   }
   this.project.getProjectResourceList().size();
   if (this.project != null && this.project.getProjectResourceList() != null) {
     for (ProjectResource pResource : this.project.getProjectResourceList()) {
       if (pResource.getResourceCategoryId().compareTo(resourceCategoryId) == 0) {
         projectResource = pResource;
         break;
       }
     }
   }
   return projectResource;
 }
Ejemplo n.º 2
0
  private int getProjectResourceIndex(Long categoryResourceId) {
    int indexFound = -1;
    if (this.project.getProjectResourceList() != null
        && this.project.getProjectResourceList().size() > 0) {
      ProjectResource projectResource;

      for (int j = 0; j < this.project.getProjectResourceList().size(); j++) {
        projectResource = this.project.getProjectResourceList().get(j);
        if (projectResource.getResourceCategoryId().compareTo(categoryResourceId) == 0) {
          // this.project.getProjectResourceList().remove(j);
          indexFound = j;
          break;
        }
      }
    }
    return indexFound;
  }