/* (non-Javadoc)
@see com.ibm.wsspi.sib.core.SICoreConnection#createSelectionCriteria()
325162
public SelectionCriteria createSelectionCriteria()
    throws SIErrorException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "createSelectionCriteria" );        
    
    SelectionCriteria criteria = new SelectionCriteriaImpl(null,
                                                           "",
                                                           SelectorDomain.SIMESSAGE);
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "createSelectionCriteria", criteria);
      
    return criteria;
  }
727878
private GraphicalIndicatorCriteria processCriteria(FieldType type)
   {
      GraphicalIndicatorCriteria criteria = new GraphicalIndicatorCriteria(m_properties);
      criteria.setLeftValue(type);

      int indicatorType = MPPUtility.getInt(m_data, m_dataOffset);
      m_dataOffset += 4;
      criteria.setIndicator(indicatorType);

      if (m_dataOffset + 4 < m_data.length)
      {
         int operatorValue = MPPUtility.getInt(m_data, m_dataOffset);
         m_dataOffset += 4;
         TestOperator operator = (operatorValue == 0 ? TestOperator.IS_ANY_VALUE : TestOperator.getInstance(operatorValue - 0x3E7));
         criteria.setOperator(operator);

         if (operator != TestOperator.IS_ANY_VALUE)
         {
            processOperandValue(0, type, criteria);

            if (operator == TestOperator.IS_WITHIN || operator == TestOperator.IS_NOT_WITHIN)
            {
               processOperandValue(1, type, criteria);
            }
         }
      }

      return (criteria);
   }
792672
public void setQueryCriteria(QueryDefinition querydef) {
    this.querydef = querydef;
    summary      = null;
    metrics      = null;
    facets       = null;
    warnings     = null;
    reports      = null;
    planEvents   = null;
    constraints  = null;
    events       = null;
    totalResults = -1;
    start        = -1;
    pageLength   = 0;
    snippetType  = null;
    qtext        = null;
    queryEvents  = null;
  }
363532
@Override
	public void visit(LogicalCriterion criterion, Object context) {
		LogicalCriterionDto clone = new LogicalCriterionDto(criterion.getOperator());
		List<Criterion> clonedChildren = new ArrayList<Criterion>(criterion.getChildren().size());
		for (Criterion criterionDto : criterion.getChildren()) {
			clonedChildren.add(clone((CriterionDto) criterionDto));
		}
		clone.setChildren(clonedChildren);
		((CriterionContext) context).setCriterion(clone);
	}
1175496
public void setCampaignCriterion(com.google.api.ads.adwords.axis.v201809.cm.CampaignCriterion campaignCriterion) {
        this.campaignCriterion = campaignCriterion;
    }
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();
    }
121498
protected final <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery) {
        return this.getEntityManager().createQuery(criteriaQuery);
    }
1257242
public function createCriteria(array $options = [], $persistent = false)
    {
        $componentId = isset($options['componentId']) ? $options['componentId'] : null;
        $pager = isset($options['pager']) ? $options['pager'] : [];
        $filter = isset($options['filter']) ? $options['filter'] : null;
        $sorter = isset($options['sorter']) ? $options['sorter'] : [];

        return new DisplayCriteria(
            $this->createPager($componentId, $pager, $persistent),
            $this->createSorter($componentId, $sorter, $persistent),
            $this->createFilter($componentId, $filter, $persistent)
        );
    }
791013
public void fireEntryCriteria(CmmnActivityExecution execution) {
    boolean manualActivation = evaluateManualActivationRule(execution);
    if (manualActivation) {
      execution.enable();

    } else {
      execution.start();
    }
  }
574534
public void setSelectionCriteriaListOnRestore(SelectionCriteria[] selectionCriteriaList)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setSelectionCriteriaListOnRestore", selectionCriteriaList);

        if (selectionCriteriaList != null)
        {
            this.topics = new String[selectionCriteriaList.length];
            for (int i = 0; i < selectionCriteriaList.length; i++)
            {
                topics[i] = (selectionCriteriaList[i] == null) ? null : selectionCriteriaList[i].getDiscriminator();
            }
            this.selectionCriteriaList = selectionCriteriaList;
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setSelectionCriteriaListOnRestore");
    }
781784
public static com.liferay.commerce.user.segment.model.CommerceUserSegmentCriterion addCommerceUserSegmentCriterion(
		com.liferay.commerce.user.segment.model.CommerceUserSegmentCriterion commerceUserSegmentCriterion) {
		return getService()
				   .addCommerceUserSegmentCriterion(commerceUserSegmentCriterion);
	}
1316385
public void addOrCriteria(Criteria pc)
    {
        if (!m_criteria.isEmpty())
        {
            pc.setEmbraced(true);
            pc.setType(OR);
            addCriteria(pc);
        }
        else
        {
            setEmbraced(false);
            pc.setType(OR);
            addCriteria(pc);
        }
    }
1030517
public synchronized SelectionCriteria getSelectionCriteria()
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getSelectionCriteria"); //469395

      checkReleased();

      SelectorDomain selectorDomain = SelectorDomain.getSelectorDomain(getShort());
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Selector domain", selectorDomain);

      /**************************************************************/
      /* Destination                                                */
      /**************************************************************/
      String discriminator = getString();
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Discriminator:", discriminator);

      /**************************************************************/
      /* Destination                                                */
      /**************************************************************/
      String selector = getString();
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Selector:", selector);

      SelectionCriteria selectionCriteria =
    		  CommsClientServiceFacade.getSelectionCriteriaFactory().createSelectionCriteria(discriminator,
                                                                        selector,
                                                                        selectorDomain);



      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getSelectionCriteria"); //469395
      return selectionCriteria;
   }
1207451
public SelectionType getSelection(final Class<?> clazz) {
        final Annotation[] annotations = clazz.getAnnotations();
        return getSelection(annotations);
    }
757020
public static Predicate<Credential> newCredentialSelectionPredicate(final String selectionCriteria) {
        try {
            if (StringUtils.isBlank(selectionCriteria)) {
                return credential -> true;
            }

            if (selectionCriteria.endsWith(".groovy")) {
                val loader = new DefaultResourceLoader();
                val resource = loader.getResource(selectionCriteria);
                val script = IOUtils.toString(resource.getInputStream(), StandardCharsets.UTF_8);

                val clz = AccessController.doPrivileged((PrivilegedAction<Class<Predicate>>) () -> {
                    val classLoader = new GroovyClassLoader(Beans.class.getClassLoader(),
                        new CompilerConfiguration(), true);
                    return classLoader.parseClass(script);
                });
                return clz.getDeclaredConstructor().newInstance();

            }

            val predicateClazz = ClassUtils.getClass(selectionCriteria);
            return (Predicate<org.apereo.cas.authentication.Credential>) predicateClazz.getDeclaredConstructor().newInstance();
        } catch (final Exception e) {
            val predicate = Pattern.compile(selectionCriteria).asPredicate();
            return credential -> predicate.test(credential.getId());
        }
    }
780447
public static SelectionCriteriaFactory getInstance() {

		if (_instance == null) {
			synchronized (SIDestinationAddressFactory.class) {
				try {
					Class cls = Class
							.forName(MESSAGE_SELECTOR_FACTORY_CLASS);
					_instance = (SelectionCriteriaFactory) cls.newInstance();
				} catch (Exception e) {
					 FFDCFilter.processException(e, "com.ibm.wsspi.sib.core.SelectionCriteriaFactory.createFactoryInstance", "100");
					 SibTr.error(tc,"UNABLE_TO_CREATE_FACTORY_CWSIB0001",e);

				}
			}
		}
		/* Otherwise, return the singleton */
		return _instance;
	}
336498
public void setMatchCriteria(java.util.Collection<String> matchCriteria) {
        if (matchCriteria == null) {
            this.matchCriteria = null;
            return;
        }

        this.matchCriteria = new java.util.ArrayList<String>(matchCriteria);
    }