code: public boolean isWorkActivity(Long pWorkId) {
  
          if(this.activities == null){
              return false;
          }
          for(int i=0; i<activities.size(); i++){
              if(pWorkId.longValue() == activities.get(i).getId().longValue()){
                  return true;
              }
          }
          return false;
      }
docs: checks if the passed in workId is
  Activity
  @return boolean status