Azavea.Open.DAO.Memory.AbstractMemoryIndex.GetExpressionsForIndex C# (CSharp) Method

GetExpressionsForIndex() protected method

This returns none if the crit is ORed, or if there are no expressions on this index's property.
protected GetExpressionsForIndex ( DaoCriteria crit ) : IList
crit Azavea.Open.DAO.Criteria.DaoCriteria The query being run.
return IList
        protected IList<AbstractSinglePropertyExpression> GetExpressionsForIndex(DaoCriteria crit)
        {
            IList<AbstractSinglePropertyExpression> retVal = new List<AbstractSinglePropertyExpression>();
            if (crit.BoolType == BooleanOperator.And)
            {
                foreach (IExpression expr in crit.Expressions)
                {
                    if (expr is AbstractSinglePropertyExpression)
                    {
                        AbstractSinglePropertyExpression spExpr = (AbstractSinglePropertyExpression) expr;
                        if (spExpr.Property.Equals(_property))
                        {
                            retVal.Add(spExpr);
                        }
                    }
                }
            }
            return retVal;
        }