Пример #1
0
        public override IQLin Equal(object obj)
        {
            IConstraint constraint = _node.Constrain(obj);

            constraint.Equal();
            return(new QLinConstraint(((QLinRoot)_root), constraint));
        }
Пример #2
0
        public IConstraint ApplyOperator(IConstraint cons, string db4oOperator)
        {
            try
            {
                switch (db4oOperator)
                {
                case BusinessConstants.CONDITION_STARTSWITH:
                    cons.StartsWith(false);
                    break;

                case BusinessConstants.CONDITION_ENDSWITH:
                    cons.EndsWith(false);
                    break;

                case BusinessConstants.CONDITION_EQUALS:
                    cons.Equal();
                    break;

                case BusinessConstants.CONDITION_NOTEQUALS:
                    cons.Not();
                    break;

                case BusinessConstants.CONDITION_GREATERTHAN:
                    cons.Greater();
                    break;

                case BusinessConstants.CONDITION_GREATERTHANEQUAL:
                    cons.Greater().Equal();
                    break;

                case BusinessConstants.CONDITION_LESSTHAN:
                    cons.Smaller();
                    break;

                case BusinessConstants.CONDITION_LESSTHANEQUAL:
                    cons.Smaller().Equal();
                    break;

                case BusinessConstants.CONDITION_CONTAINS:
                    cons.Like();
                    break;
                }
                return(cons);
            }
            catch (Exception oEx)
            {
                LoggingHelper.HandleException(oEx);
                return(null);
            }
        }
Пример #3
0
 public IConstraint ApplyOperator(IConstraint cons, string db4oOperator)
 {
     try
     {
         switch (db4oOperator)
         {
             case BusinessConstants.CONDITION_STARTSWITH: 
                 cons.StartsWith(false);
                 break;
             case BusinessConstants.CONDITION_ENDSWITH:
                 cons.EndsWith(false);
                 break;
             case BusinessConstants.CONDITION_EQUALS:
                 cons.Equal();
                 break;
             case BusinessConstants.CONDITION_NOTEQUALS:
                 cons.Not();
                 break;
             case BusinessConstants.CONDITION_GREATERTHAN :
                 cons.Greater();
                 break;
             case BusinessConstants.CONDITION_GREATERTHANEQUAL:
                 cons.Greater().Equal();
                 break;
             case BusinessConstants.CONDITION_LESSTHAN :
                 cons.Smaller();
                 break;
             case BusinessConstants.CONDITION_LESSTHANEQUAL:
                 cons.Smaller().Equal();
                 break;
             case BusinessConstants.CONDITION_CONTAINS:
                 cons.Like();
                 break;
         }
         return cons;
     }
     catch (Exception oEx)
     {
         LoggingHelper.HandleException(oEx);
         return null;
     }
 }