Find profile by linkedid.
@param linkedid to be searched for
@return profile found
166817
@View(name = "by_linkedid", map = "function(doc) { if(doc.linkedid){ emit(doc.linkedid, doc) } }")
    public CouchDbProfileDocument findByLinkedid(final String linkedid) {
        return queryView("by_linkedid", linkedid).stream().findFirst().orElse(null);
    }
159771
public JobProfile readJobProfile(JobID jobId) {
    JobProfile jobProfile = null;
    if (active) {
      try {
        FSDataInputStream dataIn = getJobInfoFile(jobId);
        if (dataIn != null) {
          readJobStatus(dataIn);
          jobProfile = readJobProfile(dataIn);
          dataIn.close();
        }
      } catch (IOException ex) {
        LOG.warn("Could not read [" + jobId + "] job profile : " + ex, ex);
      }
    }
    return jobProfile;
  }
387626
public E getById(String id) {
        if (id == null) {
            for (E element : this) {
                if (element != null && element.getId() == null) {
                    return element;
                }
            }
        } else {
            for (E element : this) {
                if (element != null && id.equals(element.getId())) {
                    return element;
                }
            }
        }
        return null;
    }
38497
@Help(help = "Find the object of type {#} through the id")
  public T findById(final String id) throws SDKException {
    return (T) requestGet(id, clazz);
  }
458745
public String getProfileIdFromClientId(int id) {
        return (String) sqlService.getFromTable(Constants.CLIENT_PROFILE_ID, Constants.GENERIC_ID, id, Constants.DB_TABLE_CLIENT);
    }
173922
public Edge lookupEdgeById(int id) {
        Iterator<Edge> i = edgeIterator();
        while (i.hasNext()) {
            Edge edge = i.next();
            if (edge.getId() == id) {
                return edge;
            }
        }
        return null;
    }
1081214
public CoreActivity findActivity(String activityId) {
    CoreActivity localActivity = getChildActivity(activityId);
    if (localActivity!=null) {
      return localActivity;
    }
    for (CoreActivity activity: getActivities()) {
      CoreActivity nestedActivity = activity.findActivity(activityId);
      if (nestedActivity!=null) {
        return nestedActivity;
      }
    }
    return null;
  }
984303
def profile(self, name):
        """"""
        self.selected_profile = self.profiles.get(name)
        return self.profiles.get(name)
638387
public Permalink findNearest(String id) {
        List<String> ids = new ArrayList<>();
        for (Permalink p : this)
            ids.add(p.getId());
        String nearest = EditDistance.findNearest(id, ids);
        if(nearest==null)   return null;
        return get(nearest);
    }
49032
public String getGroupIdsInPathProfile(int profileId, int pathId) {
        return (String) sqlService.getFromTable(Constants.PATH_PROFILE_GROUP_IDS, Constants.GENERIC_ID, pathId,
                                                Constants.DB_TABLE_PATH);
    }
718321
protected List<HalResource<?>> resolveCachedLinks(String[] linkedIds, Cache cache, List<String> notCachedLinkedIds) {
    ArrayList<HalResource<?>> resolvedResources = new ArrayList<HalResource<?>>();

    for (String linkedId : linkedIds) {
      HalResource<?> resource = (HalResource<?>) cache.get(linkedId);
      if (resource != null) {
        resolvedResources.add(resource);
      }
      else {
        notCachedLinkedIds.add(linkedId);
      }
    }

    return resolvedResources;
  }
84919
public function comments($uid) {
	  // check passed data
	  if(!is_string($uid)) {
	    // bad data passed
		  throw new LinkedInException('LinkedIn->comments(): bad data passed, $uid must be of type string.');
	  }
		
		// construct and send the request
    $query    = self::_URL_API . '/v1/people/~/network/updates/key=' . $uid . '/update-comments';
    $response = $this->fetch('GET', $query);
    
  	/**
	   * Check for successful request (a 200 response from LinkedIn server) 
	   * per the documentation linked in method comments above.
	   */ 
    return $this->checkResponse(200, $response);
	}
570355
public AccountHeaderBuilder withProfiles(@NonNull List<IProfile> profiles) {
        if (mDrawer != null) {
            mDrawer.mDrawerBuilder.idDistributor.checkIds(profiles);
        }
        this.mProfiles = profiles;
        return this;
    }
893128
public function getProfile($type) {
    // Get the OAuth token from LinkedIn.
    if (!$access_token = $this->authManager->getAccessToken($type)) {
      drupal_set_message($this->t('@network login failed. Token is not valid.', [
        '@network' => $this->t('LinkedIn'),
      ]), 'error');
      return $this->redirect('user.' . $type);
    }

    // Get user's LinkedIn profile from LinkedIn API.
    if (!($profile = $this->authManager->getProfile()) || empty($profile['id'])) {
      drupal_set_message($this->t('@network login failed, could not load @network profile. Contact the site administrator.', [
        '@network' => $this->t('LinkedIn'),
      ]), 'error');
      return $this->redirect('user.' . $type);
    }

    $this->accessToken = $access_token;

    return $profile;
  }
36609
public List<Client> findAllClients(int profileId) throws Exception {
        ArrayList<Client> clients = new ArrayList<Client>();

        PreparedStatement query = null;
        ResultSet results = null;

        try (Connection sqlConnection = sqlService.getConnection()) {
            query = sqlConnection.prepareStatement(
                "SELECT * FROM " + Constants.DB_TABLE_CLIENT +
                    " WHERE " + Constants.GENERIC_PROFILE_ID + " = ?"
            );
            query.setInt(1, profileId);
            results = query.executeQuery();
            while (results.next()) {
                clients.add(this.getClientFromResultSet(results));
            }
        } catch (Exception e) {
            throw e;
        } finally {
            try {
                if (results != null) {
                    results.close();
                }
            } catch (Exception e) {
            }
            try {
                if (query != null) {
                    query.close();
                }
            } catch (Exception e) {
            }
        }
        return clients;
    }
303197
public static linkset_binding get(nitro_service service, String id) throws Exception{
		linkset_binding obj = new linkset_binding();
		obj.set_id(id);
		linkset_binding response = (linkset_binding) obj.get_resource(service);
		return response;
	}
908556
public int getPathId(String pathName, int profileId) {
        PreparedStatement queryStatement = null;
        ResultSet results = null;
        // first get the pathId for the pathName/profileId
        int pathId = -1;
        try (Connection sqlConnection = sqlService.getConnection()) {
            queryStatement = sqlConnection.prepareStatement(
                "SELECT " + Constants.GENERIC_ID + " FROM " + Constants.DB_TABLE_PATH
                    + " WHERE " + Constants.PATH_PROFILE_PATHNAME + "= ? "
                    + " AND " + Constants.GENERIC_PROFILE_ID + "= ?"
            );
            queryStatement.setString(1, pathName);
            queryStatement.setInt(2, profileId);
            results = queryStatement.executeQuery();
            if (results.next()) {
                pathId = results.getInt(Constants.GENERIC_ID);
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (results != null) {
                    results.close();
                }
            } catch (Exception e) {
            }
            try {
                if (queryStatement != null) {
                    queryStatement.close();
                }
            } catch (Exception e) {
            }
        }

        return pathId;
    }