Object Oriented Filtering (OOF) - Dragan S. Pusonjic
Previous Table of Contents Next

How to use our objects?
So far we have been developing our filtering objects,  and, now, we plan to present a global strategy of how to use the filtering object in one program.
We want to solve the following problem:

                    SELECT ;
                                    order. number_invoice ;
                                    order. order_date ;
                                    order.value_invoice ;
                                    order. payment ;
                                    customer. company_ name ;
                        FROM order, customer ;
                         WHERE &cxWhereCond

We know what fields and what tables we want to present. We have already made a remark that that ‘where’ clause must be under macro substitution since we do not know what values cxWhereCond will contain. However, we do know that cxWhereCond consists of three parts: 

cxWhereCond =  ;
                                cxStaticWhereCond ;
                                                + ;
                                cxDynamicWhereCond
                                                + :
                                 cxVarWhereCond

In this case,
        cxStaticWhereCond = “order.customer_id = customer.customer_id” 

 and original values
                    cxDynamicWhereCond = “”
                    cxVarWhereCond = “”

Let’s show one form with vdf objects:

                   

The only thing we know are the names of the filtering objects. We do not know, what will be the condition of the filtering object, that is, we do not know the values which will be entered by the user in the course of the formation of filter string value. What are we supposed to do?
Every time when we calculate cxDynamicWhereCond/cxVarWhereCond on the form with vdf objects, we must go through every single filtering object in order to take its temporary condion , that it, the filter string value of the filtering object.

                   

This is to represent a general algorithm for the calculation of cxWhereCond.

See also :  Image example


Previous Table of Contents Next