function PropertyExpression (expression) {
            var self = this;

            /**
             * Allows a function to be passed in to perform a manual comparison.
             *
             * @public
             * @memberof Services.PropertyExpression
             * @param {object} data
             *  Object being searched. An object can be a single object or array
             * @param {function} func
             *  Function that will be executed after each result is iterated. If this function returns
             *  a value, it will be added to the results array.
             * @returns
             * Array of matched results
             */
            self.criteriaFunc = function (data, func) {
                var results = [];
                eachResult(data, function (currentObject, value) {
                    var add = func.call(self, currentObject, value);
                    if (add) {
                        results.push(add);
                    }
                });
                return results;
            };

            /**
             * Iterates through an objects properties using the specified property expression
             * and performs a contains comparison.
             *
             * @public
             * @memberof Services.PropertyExpression
             * @param {object} data
             * Object being searched. An object can be a single object or array
             * @param {string} searchTerm
             * The text value to find
             * @returns
             * Array of matched results
             */
            self.contains = function (data, searchTerm) {
                var results = [];

                eachResult(data, function (currentObject, value) {
                    if (value.toString().toLowerCase().indexOf(searchTerm.toString().toLowerCase()) !== -1) {
                        results.push(currentObject);
                        return true;
                    }
                    return false;
                });

                return results;
            };

            /**
             * Iterates through an objects properties using the specifed property expression 
             * and performs an equals comparison.
             *
             * @public
             * @memberof Services.PropertyExpression
             * @param {object} data
             * Object being searched. An object can be a single object or array
             * @param {string} searchTerm
             * The text value to find
             * @returns
             * Array of matched results
             */
            self.equals = function (data, searchTerm) {
                var results = [];
                eachResult(data, function (currentObject, value) {
                    if (value.toString() === searchTerm.toString()) {
                        results.push(currentObject);
                        return true;
                    }
                    return false;
                });
                return results;
            };

            /**
             * Performs a date range comparison
             *
             * @public
             * @memberof Services.PropertyExpression
             * @param {object} data
             * Object being searched. An object can be a single object or array
             * @param {date} start
             * Start date
             * @param {date} end
             * End date
             * @returns
             * Array of matched results
             */
            self.withinDateRange = function (data, start, end) {
                var results = [];
                var startDate = new Date(start);
                var endDate = new Date(end);

                eachResult(data, function (currentObject, value) {
                    var valueDate = new Date(value);
                    if (valueDate >= startDate && valueDate <= endDate) {
                        results.push(currentObject);
                        return true;
                    }
                    return false;

                });
                return results;
            };

            /**
             * Helper function iterates through all objects making the property expression.
             *
             * @private
             * @memberof Services.PropertyExpression
             */
            function eachResult(data, func) {
                if (!angular.isArray(data)) {
                    data = [data];
                }
                data.forEach(function (currentObject) {
                    new Walker(currentObject, expression).walk(function (obj) {
                        return func.call(self, currentObject, obj);
                    });
                });
            }
        }
/**
         * Handles searching for information within an object using a property expression.
         *
         * @constructor
         * @memberof Services
         * @param {string} expression
         * Property path to search in
         */
Handles searching for information within an object using a property expression.
@constructor
@memberof Services
@param {string} expression
Property path to search in
Handles searching for information within an object using a property expression . @constructor @memberof Services @param { string } expression Property path to search in
function PropertyExpression (expression) {
            var self = this;
            self.criteriaFunc = function (data, func) {
                var results = [];
                eachResult(data, function (currentObject, value) {
                    var add = func.call(self, currentObject, value);
                    if (add) {
                        results.push(add);
                    }
                });
                return results;
            };
            self.contains = function (data, searchTerm) {
                var results = [];
                eachResult(data, function (currentObject, value) {
                    if (value.toString().toLowerCase().indexOf(searchTerm.toString().toLowerCase()) !== -1) {
                        results.push(currentObject);
                        return true;
                    }
                    return false;
                });
                return results;
            };
            self.equals = function (data, searchTerm) {
                var results = [];
                eachResult(data, function (currentObject, value) {
                    if (value.toString() === searchTerm.toString()) {
                        results.push(currentObject);
                        return true;
                    }
                    return false;
                });
                return results;
            };
            self.withinDateRange = function (data, start, end) {
                var results = [];
                var startDate = new Date(start);
                var endDate = new Date(end);
                eachResult(data, function (currentObject, value) {
                    var valueDate = new Date(value);
                    if (valueDate >= startDate && valueDate <= endDate) {
                        results.push(currentObject);
                        return true;
                    }
                    return false;
                });
                return results;
            };
            function eachResult(data, func) {
                if (!angular.isArray(data)) {
                    data = [data];
                }
                data.forEach(function (currentObject) {
                    new Walker(currentObject, expression).walk(function (obj) {
                        return func.call(self, currentObject, obj);
                    });
                });
            }
        }
function PropertyExpression ( expression ) { var self = this ; self . criteriaFunc = function ( data , func ) { var results = [ ] ; eachResult ( data , function ( currentObject , value ) { var add = func . call ( self , currentObject , value ) ; if ( add ) { results . push ( add ) ; } } ) ; return results ; } ; self . contains = function ( data , searchTerm ) { var results = [ ] ; eachResult ( data , function ( currentObject , value ) { if ( value . toString ( ) . toLowerCase ( ) . indexOf ( searchTerm . toString ( ) . toLowerCase ( ) ) !== - 1 ) { results . push ( currentObject ) ; return true ; } return false ; } ) ; return results ; } ; self . equals = function ( data , searchTerm ) { var results = [ ] ; eachResult ( data , function ( currentObject , value ) { if ( value . toString ( ) === searchTerm . toString ( ) ) { results . push ( currentObject ) ; return true ; } return false ; } ) ; return results ; } ; self . withinDateRange = function ( data , start , end ) { var results = [ ] ; var startDate = new Date ( start ) ; var endDate = new Date ( end ) ; eachResult ( data , function ( currentObject , value ) { var valueDate = new Date ( value ) ; if ( valueDate >= startDate && valueDate <= endDate ) { results . push ( currentObject ) ; return true ; } return false ; } ) ; return results ; } ; function eachResult ( data , func ) { if ( ! angular . isArray ( data ) ) { data = [ data ] ; } data . forEach ( function ( currentObject ) { new Walker ( currentObject , expression ) . walk ( function ( obj ) { return func . call ( self , currentObject , obj ) ; } ) ; } ) ; } }
Handles searching for information within an object using a property expression.
Handles searching for information within an object using a property expression .
/**
             * Allows a function to be passed in to perform a manual comparison.
             *
             * @public
             * @memberof Services.PropertyExpression
             * @param {object} data
             *  Object being searched. An object can be a single object or array
             * @param {function} func
             *  Function that will be executed after each result is iterated. If this function returns
             *  a value, it will be added to the results array.
             * @returns
             * Array of matched results
             */ /**
             * Iterates through an objects properties using the specified property expression
             * and performs a contains comparison.
             *
             * @public
             * @memberof Services.PropertyExpression
             * @param {object} data
             * Object being searched. An object can be a single object or array
             * @param {string} searchTerm
             * The text value to find
             * @returns
             * Array of matched results
             */ /**
             * Iterates through an objects properties using the specifed property expression 
             * and performs an equals comparison.
             *
             * @public
             * @memberof Services.PropertyExpression
             * @param {object} data
             * Object being searched. An object can be a single object or array
             * @param {string} searchTerm
             * The text value to find
             * @returns
             * Array of matched results
             */ /**
             * Performs a date range comparison
             *
             * @public
             * @memberof Services.PropertyExpression
             * @param {object} data
             * Object being searched. An object can be a single object or array
             * @param {date} start
             * Start date
             * @param {date} end
             * End date
             * @returns
             * Array of matched results
             */ /**
             * Helper function iterates through all objects making the property expression.
             *
             * @private
             * @memberof Services.PropertyExpression
             */