A valid IMDb ID

@param imdbId The IMDB ID
@return
@throws OMDBException
965414
public OmdbBuilder setImdbId(final String imdbId) throws OMDBException {
        if (StringUtils.isBlank(imdbId)) {
            throw new OMDBException(ApiExceptionType.UNKNOWN_CAUSE, "Must provide an IMDB ID!");
        }
        params.add(Param.IMDB, imdbId);
        return this;
    }
1186788
public static String create(final OmdbParameters params) throws OMDBException {
        StringBuilder sb = new StringBuilder(BASE_URL);

        sb.append(DELIMITER_FIRST);
        //Add the APIKey first
        if (params.has(Param.APIKEY)) {
            String apikey = (String) params.get(Param.APIKEY);
            sb.append(Param.APIKEY.getValue()).append(apikey);
        } else {
                throw new OMDBException(ApiExceptionType.AUTH_FAILURE, "Must include an ApiKey to make a call");
            }
        
        //Needed for everything after
        sb.append(DELIMITER_SUBSEQUENT);
        
        if (params.has(Param.SEARCH)) {
            String search = (String) params.get(Param.SEARCH);
            sb.append(Param.SEARCH.getValue()).append(search.replace(" ", "+"));
        } else if (params.has(Param.IMDB)) {
            sb.append(Param.IMDB.getValue()).append(params.get(Param.IMDB));
        } else if (params.has(Param.TITLE)) {
            String title = (String) params.get(Param.TITLE);
            sb.append(Param.TITLE.getValue()).append(title.replace(" ", "+"));
        } else {
            throw new OMDBException(ApiExceptionType.INVALID_URL, "Must include a search or ID");
        }

        // Append the year
        appendParam(params, Param.YEAR, sb);

        // Append the plot requirement
        if (params.has(Param.PLOT)
                && (PlotType) params.get(Param.PLOT) != PlotType.getDefault()) {
            appendParam(params, Param.PLOT, sb);
        }

        // Append the tomatoes requirement
        appendParam(params, Param.TOMATOES, sb);

        // Append the Type
        appendParam(params, Param.RESULT, sb);

        // Append the JSON request - This is not used by this API
        appendParam(params, Param.DATA, sb);

        // Append the version
        appendParam(params, Param.VERSION, sb);

        // Append the callback function - This is not used by this API
        appendParam(params, Param.CALLBACK, sb);

        LOG.trace("Created URL: {}", sb.toString());
        return sb.toString();
    }
467002
public Where<T, ID> idEq(ID id) throws SQLException {
		if (idColumnName == null) {
			throw new SQLException("Object has no id column specified");
		}
		addClause(new SimpleComparison(idColumnName, idFieldType, id, SimpleComparison.EQUAL_TO_OPERATION));
		return this;
	}
377046
public Integer getNextIDSeq(final String id) {
        Validate.notNull(id, "ID cannot be null");
        Integer count = this.idCounts.get(id);
        if (count == null) {
            count = Integer.valueOf(1);
        }
        return count;
    }
3147
public ExternalID getPersonExternalIds(int personId) throws MovieDbException {
        TmdbParameters parameters = new TmdbParameters();
        parameters.add(Param.ID, personId);

        URL url = new ApiUrl(apiKey, MethodBase.PERSON).subMethod(MethodSub.EXTERNAL_IDS).buildUrl(parameters);
        String webpage = httpTools.getRequest(url);

        try {
            return MAPPER.readValue(webpage, ExternalID.class);
        } catch (IOException ex) {
            throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get person external IDs", url, ex);
        }
    }
79166
public OmdbVideoFull getInfo(OmdbParameters parameters) throws OMDBException {
        OmdbVideoFull result;
        //Api key should be added only if parameters do not have it already
        if (!parameters.has(Param.APIKEY)) {
            parameters.add(Param.APIKEY, this.apiKey);
        }
        URL url = OmdbUrlBuilder.createUrl(parameters);

        // Get the JSON
        String jsonData = requestWebPage(url);

        // Process the JSON into an object
        try {
            result = mapper.readValue(jsonData, OmdbVideoFull.class);

            if (result == null || !result.isResponse()) {
                throw new OMDBException(ApiExceptionType.ID_NOT_FOUND, result == null ? "No data returned" : result.getError());
            }
        } catch (IOException ex) {
            throw new OMDBException(ApiExceptionType.MAPPING_FAILED, jsonData, 0, url, ex);
        }

        return result;
    }
1169671
public Object getObjectWithId( IdKey id ) {
        if ( null != idToObject ) {
            return idToObject.get( id );
        }
        return null;
    }
367472
public Broadcast getBroadcast(String broadcastId) throws OpenTokException {
        if(StringUtils.isEmpty(broadcastId)) {
            throw new InvalidArgumentException("Broadcast id is null or empty");
        }
        String stream = this.client.getBroadcast(broadcastId);
        try {
            return broadcastReader.readValue(stream);
        } catch (Exception e) {
            throw new RequestException("Exception mapping json: " + e.getMessage());
        }
    }
944722
public void addObjectId( IdKey id, Object instance ) {
        if ( null == idToObject ) {
            idToObject = new HashMap<IdKey, Object>();
        }
        idToObject.put( id, instance );
    }
710928
public <T extends MPBase> T getById(String id) throws MPException {
        T resource = null;
        for (int i = 0; i < _resourceArray.size(); i++) {
            resource = getByIndex(i);
            try {
                Field field = resource.getClass().getDeclaredField("id");
                field.setAccessible(true);
                String resourceId = field.get(resource).toString();
                if (resourceId.equals(id)) {
                    break;
                }
            } catch (Exception exception) {
                throw new MPException(exception);
            }
        }
        return resource;
    }
36941
public int updateId(ID newId) throws SQLException {
		checkForDao();
		@SuppressWarnings("unchecked")
		T t = (T) this;
		return dao.updateId(t, newId);
	}
679054
public CmsUrlNameMappingFilter filterRejectStructureId(CmsUUID id) {

        if (id == null) {
            throw new IllegalArgumentException();
        }
        if (m_structureId != null) {
            throw new IllegalStateException();
        }
        CmsUrlNameMappingFilter result = new CmsUrlNameMappingFilter(this);
        result.m_rejectStructureId = id;
        return result;
    }
489993
@SuppressWarnings("unchecked")
    public <T extends XPathBuilder> T setId(final String id) {
        this.id = id;
        return (T) this;
    }
581897
protected void appendId(StringBuffer html, String id) {

        html.append(" name=\"");
        html.append(id);
        html.append("\" id=\"");
        html.append(id);
        html.append("\" ");
    }
170279
public static PrimitiveId from(String id) {
    return from(Hashing.sha256().hashString(id, StandardCharsets.UTF_8).asLong());
  }
329616
private static void validateId(String id) {

        if (id == null) {
            return;
        }
        int n = id.length();
        if (n < 1) {
            throw new IllegalArgumentException("Empty id attribute is not allowed");
        }
        for (int i = 0; i < n; i++) {
            char c = id.charAt(i);
            if (i == 0) {
                if (!Character.isLetter(c) && (c != '_')) {
                    throw new IllegalArgumentException(id);
                }
            } else {
                if (!Character.isLetter(c) &&
                        !Character.isDigit(c) &&
                        (c != '-') && (c != '_')) {
                    throw new IllegalArgumentException(id);
                }
            }
        }

    }
881454
public void addEntityId(long entityId)
    {
        if(this.entityIds == null)
            this.entityIds = new ArrayList<Long>();
        this.entityIds.add(entityId);
    }