Gets a specific agency.

@param  agencyId  		The id of the agency you want to get.
@return      			An agency.
503788
public TransportApiResult<Agency> getAgency(String agencyId)
    {
    	if (Extensions.isNullOrWhiteSpace(agencyId))
    	{
    		throw new IllegalArgumentException("AgencyId is required.");
    	}

    	return TransportApiClientCalls.getAgency(tokenComponent, settings, agencyId);
    }
9999
protected Person getPersonById(String id) {
		Person person = null;
		try {
			Long personId = Long.valueOf(id);
			if (logger.isDebugEnabled()) {
				logger.debug("Retrieving Person with id=[{}]", personId);
			}
			person = entityManager.find(Person.class, personId);
		} catch (NumberFormatException e) {
			if (logger.isWarnEnabled()) {
				logger.warn("Invalid number format: {}", id);
			}
		}
		if (person == null) {
			throw new IllegalArgumentException();
		}
		return person;
	}
711605
public static Application get(final String id) throws Exception {
        assert(id != null);

        final BandwidthClient client = BandwidthClient.getInstance();
        return Application.get(client ,id);
    }
45097
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = {
        CascadeType.ALL
    })
    @JoinColumn(name = "AGENT")
    public org.openprovenance.prov.model.QualifiedName getAgent() {
        return agent;
    }
146034
@Nullable
    public Relationship getRelationship(@Nonnull String id) {
        if (id == null || id.trim().length() == 0) {
            throw new IllegalArgumentException("A relationship ID must be specified.");
        }

        return relationshipsById.get(id);
    }
1222843
public RegisteredService get(final long id) {
        val keys = new HashMap<String, AttributeValue>();
        keys.put(ColumnNames.ID.getColumnName(), new AttributeValue(String.valueOf(id)));
        return getRegisteredServiceByKeys(keys);
    }
432486
public T getProvider(final String id) {
        return (T) beanFactory.getBean(providerFactory.beanName(id));
    }
1195108
public IClientStream getStreamByChannelId(int channelId) {
        // channels 2 and 3 are "special" and don't have an IClientStream associated
        if (channelId < 4) {
            return null;
        }
        Number streamId = getStreamIdForChannelId(channelId);
        if (log.isTraceEnabled()) {
            log.trace("Stream requested for channel id: {} stream id: {} streams: {}", channelId, streamId, streams);
        }
        return getStreamById(streamId);
    }
360198
public function getInfoAction($actorId, $id)
    {
        $em = $this->getDoctrine()->getManager();

        /** @var Address $entity */
        $entity = $em->getRepository('EcommerceBundle:Address')->findOneById($id);

        $addressResponse = new stdClass();
        $addressResponse->id = $entity->getId();
        $addressResponse->address = $entity->getAddress();
        $addressResponse->dni = $entity->getDni();
        $addressResponse->city = $entity->getCity();
        $addressResponse->state = $entity->getState()->getId();
        $addressResponse->country = $entity->getCountry()->getId();
        $addressResponse->phone = $entity->getPhone();
        $addressResponse->phone2 = $entity->getPhone2();
        $addressResponse->postalCode = $entity->getPostalCode();
        $addressResponse->preferredSchedule = $entity->getPreferredSchedule();
        
        return new JsonResponse($addressResponse);
    }
565905
public AbstractNode getNode(final String id) {

		final SecurityContext securityContext = getWebSocket().getSecurityContext();
		final App app = StructrApp.getInstance(securityContext);

		try (final Tx tx = app.tx()) {

			final AbstractNode node = (AbstractNode) app.getNodeById(id);

			tx.success();

			return node;

		} catch (FrameworkException fex) {
			logger.warn("Unable to get node", fex);
		}

		return null;
	}
1178963
@GET
	@Produces(MediaType.APPLICATION_JSON)
	@Path("/{dashboardId}")
	@Description("Returns a dashboard by its ID.")
	public DashboardDto getDashboardByID(@Context HttpServletRequest req,
			@PathParam("dashboardId") BigInteger dashboardId) {
		if (dashboardId == null || dashboardId.compareTo(BigInteger.ZERO) < 1) {
			throw new WebApplicationException("Dashboard Id cannot be null and must be a positive non-zero number.", Status.BAD_REQUEST);
		}

		Dashboard dashboard = dService.findDashboardByPrimaryKey(dashboardId);

		if (dashboard != null && !dashboard.isShared()) {
			validateAndGetOwner(req, null);
			validateResourceAuthorization(req, dashboard.getOwner(), getRemoteUser(req));
		}
		if (dashboard != null) {
			return DashboardDto.transformToDto(dashboard);
		}
		throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);
	}
430381
public OvhOvhPabxHuntingAgentLiveStatus billingAccount_easyHunting_serviceName_hunting_agent_agentId_liveStatus_GET(String billingAccount, String serviceName, Long agentId) throws IOException {
		String qPath = "/telephony/{billingAccount}/easyHunting/{serviceName}/hunting/agent/{agentId}/liveStatus";
		StringBuilder sb = path(qPath, billingAccount, serviceName, agentId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhOvhPabxHuntingAgentLiveStatus.class);
	}
142515
public RegisteredServiceDocument get(final long id) {
        try {
            return this.get(String.valueOf(id));
        } catch (final DocumentNotFoundException e) {
            LOGGER.debug("Service [{}] not found. [{}]", id, e.getMessage());
            return null;
        }
    }
717214
public Optional<LinkedResource> getById(String id)
  {
    return Optional.fromNullable(resourcesById.get(id));
  }
634700
public User getUserById(int id) {
		for (User u : users)
			if (u.getId() == id)
				return u;
		return null;
	}
1122555
public CrowdAgent getAgent(int idx) {
        return idx < 0 || idx >= m_agents.length ? null : m_agents[idx];
    }
1308653
public IssueCategory getByID(String categoryID)
    {
        IssueCategory issueCategory = this.issueCategories.get(categoryID);
        if (issueCategory == null)
        {
            // We do not have this one yet, so store it as a placeholder. It will presumably be loaded later on.
            issueCategory = new IssueCategory(categoryID, "placeholder", categoryID, categoryID, 0, true);
            this.issueCategories.put(categoryID, issueCategory);
        }
        return issueCategory;
    }