Check for existence (or lack thereof) of a field.

@param shouldExist
@return the criteria
551998
public Criteria exists(boolean shouldExist) {
        this.criteriaType = RelationalOperator.EXISTS;
        this.right = ValueNode.toValueNode(shouldExist);
        this.left = left.asPathNode().asExistsCheck(shouldExist);
        return this;
    }
842019
public boolean exists(int specIndex) {
        return specIndex >= 0 && specIndex < resultList.size()
                && !(resultList.get(specIndex).value() instanceof Exception);
    }
433825
public boolean destinationExists(JsDestinationAddress addr) throws SIMPNullParameterException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "destinationExists", new Object[] { addr });

        // Now look for the destination in the hash table
        boolean exists = destinationExists(addr.getDestinationName(), addr.getBusName());

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "destinationExists", new Boolean(exists));

        return exists;
    }
561099
@Override
    public boolean layoutExists(LayoutIdentifier layout) {
        return getLayouts(layout.shared).contains(layout.name);
    }
256045
public boolean checkExistingExpression(
    String topicExpression,
    boolean isWildcarded)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.entry(
          tc,
          "checkExistingExpression",
          new Object[] {topicExpression, new Boolean(isWildcarded)});
    boolean alreadyRegistered = false;

    if(isWildcarded)
    {
      if(_registeredWildcardConsumerMonitors.containsKey(topicExpression))
        alreadyRegistered = true;
    }
    else
    {
      if(_registeredExactConsumerMonitors.containsKey(topicExpression))
        alreadyRegistered = true;
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "checkExistingExpression", new Boolean(alreadyRegistered));

    return alreadyRegistered;
  }
700836
@SuppressWarnings("unchecked")
    public List<E> findByCriteria(Criterion... criterion) throws HibernateException {
        LOG.trace("Finding instances of " + entityClass.getSimpleName()
            + " based on " + criterion.length + " criteria");

        Criteria criteria = createDistinctRootEntityCriteria(criterion);
        return criteria.list();
    }
1005130
@Override
    public boolean objectExists(String objectKey) {
        try {
            return objectStore.exists(objectKey);
        } catch (LowlevelStorageException e) {
            logger.error(e.toString(),e);
            throw new FaultException(
                    "System error determining existence of blob", e);
        }
    }
563878
public boolean has() {

		boolean exists = has(EXTENSION_NAME, null, null);

		if (exists) {
			exists = hasColumn();
		}

		return exists;
	}
90068
private GenericCriteriaPrompt getPromptValue(FieldType field, byte[] block)
   {
      int textOffset = getPromptOffset(block);
      String value = MPPUtility.getUnicodeString(m_criteriaData, m_criteriaTextStart + textOffset);
      GenericCriteriaPrompt prompt = new GenericCriteriaPrompt(field.getDataType(), value);
      if (m_prompts != null)
      {
         m_prompts.add(prompt);
      }
      return prompt;
   }
57794
public static <T> MatcherDecoratorsBuilder<T> should(final Matcher<? super T> matcher) {
        return MatcherDecoratorsBuilder.should(matcher);
    }
741989
public boolean isExists(String index) {
        IndicesExistsRequestBuilder indicesExistsRequestBuilder =
                admin().indices().prepareExists(index);
        return JMElasticsearchUtil
                .logRequestQueryAndReturn("isExists",
                        indicesExistsRequestBuilder,
                        indicesExistsRequestBuilder.execute())
                .isExists();
    }
588794
protected Element updateElement(Counter counter, Element parent, String name, boolean shouldExist)
   {
      Element element = parent.getChild(name, parent.getNamespace());
      if ((element != null) && shouldExist)
      {
         counter.increaseCount();
      }
      if ((element == null) && shouldExist)
      {
         element = factory.element(name, parent.getNamespace());
         insertAtPreferredLocation(parent, element, counter);
         counter.increaseCount();
      }
      if (!shouldExist && (element != null))
      {
         int index = parent.indexOf(element);
         if (index > 0)
         {
            Content previous = parent.getContent(index - 1);
            if (previous instanceof Text)
            {
               Text txt = (Text) previous;
               if (txt.getTextTrim().length() == 0)
               {
                  parent.removeContent(txt);
               }
            }
         }
         parent.removeContent(element);
      }
      return element;
   }
245526
public boolean destinationExists(String destinationName, String busName) throws SIMPNullParameterException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "destinationExists", new Object[] { destinationName, busName });

        // Check that the destination name is not null.  If it is, throw a
        // SIMPNullParameterException
        if (destinationName == null)
        {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(
                           tc,
                           "destinationExists",
                           "Destination name null");

            throw new SIMPNullParameterException(
                            nls_cwsik.getFormattedMessage(
                                                          "MISSING_PARAM_ERROR_CWSIP0044",
                                                          new Object[] { messageProcessor.getMessagingEngineName() }, null));

        }

        // Now look for the destination in the hash table
        boolean exists = destinationIndex.containsKey(busName, destinationName);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "destinationExists", new Boolean(exists));

        return exists;

    }
1259686
public <S,V> S when(S subject, Feature<? super S, V> feature, Matcher<? super V> criteria) {
        return when(subject, feature, eventually(), criteria);
    }
962105
public function whereExists($name, $exists = true)
    {

        if ($exists) {
            $this->must[] = ["exists" => ["field" => $name]];
        } else {
            $this->must_not[] = ["exists" => ["field" => $name]];
        }

        return $this;
    }
1180188
public static final void validateSearchCriteria(SearchCriteriaBean criteria) throws InvalidSearchCriteriaException {
        if (criteria.getPaging() != null) {
            if (criteria.getPaging().getPage() < 1) {
                throw new InvalidSearchCriteriaException(Messages.i18n.format("SearchCriteriaUtil.MissingPage")); //$NON-NLS-1$
            }
            if (criteria.getPaging().getPageSize() < 1) {
                throw new InvalidSearchCriteriaException(Messages.i18n.format("SearchCriteriaUtil.MissingPageSize")); //$NON-NLS-1$
            }
        }
        int count = 1;
        for (SearchCriteriaFilterBean filter : criteria.getFilters()) {
            if (filter.getName() == null || filter.getName().trim().length() == 0) {
                throw new InvalidSearchCriteriaException(Messages.i18n.format("SearchCriteriaUtil.MissingSearchFilterName", count)); //$NON-NLS-1$
            }
            if (filter.getValue() == null || filter.getValue().trim().length() == 0) {
                throw new InvalidSearchCriteriaException(Messages.i18n.format("SearchCriteriaUtil.MissingSearchFilterValue", count)); //$NON-NLS-1$
            }
            if (filter.getOperator() == null || !validOperators.contains(filter.getOperator())) {
                throw new InvalidSearchCriteriaException(Messages.i18n.format("SearchCriteriaUtil.MissingSearchFilterOperator", count)); //$NON-NLS-1$
            }
            count++;
        }
        if (criteria.getOrderBy() != null && (criteria.getOrderBy().getName() == null || criteria.getOrderBy().getName().trim().length() == 0)) {
            throw new InvalidSearchCriteriaException(Messages.i18n.format("SearchCriteriaUtil.MissingOrderByName")); //$NON-NLS-1$
        }
    }
213701
public FormValidation doViewExistsCheck(@QueryParameter String value, @QueryParameter boolean exists) {
        checkPermission(View.CREATE);

        String view = Util.fixEmpty(value);
        if (view == null) return FormValidation.ok();
        if (exists) {
        	return (getView(view)!=null) ?
            		FormValidation.ok() :
            		FormValidation.error(Messages.MyViewsProperty_ViewExistsCheck_NotExist(view));
        } else {
        	return (getView(view)==null) ?
        			FormValidation.ok() :
        			FormValidation.error(Messages.MyViewsProperty_ViewExistsCheck_AlreadyExists(view));
        }
    }