Saturday, January 14, 2017

Use View Criteria Query Execution Modes

Use View Criteria Query Execution Mode


we have 3 choice here 
1.database (default)
2.In memory
3.Both

Here we'll see how view criteria query execution mode works, created a viewCriteria on Departments view object


Dropped Departments viewObject as table and as form, and created createInsert operation as button and a button to filter Departments viewObject using this view criteria (viewCriteria is applied on viewObject at AM level)

To Apply ViewCriteria at AM level: Open Application Module -- Select ViewObject -- Click on Edit button -- Shuttle view criteria to selected side


Execute View Criteria button filters Departments view object

    /**
     * Method to filter Departments ViewObject for Location Id 1800
     */
    public void filterDepartments() {
        ViewObject deptVo = this.getDepartments1();
        deptVo.setNamedWhereClauseParam("BindLocId", 1800);
        deptVo.executeQuery();
    }

Now I added a new row in table for Locaion Id 111 , it is not committed and after click on Execute View Critera button we can see that it is appearing with filtered DB rows .
As Query Execution mode is Database so it doesn't filter uncommitted rows that's why location id 111 is appearing in record set

Now to filter In-Memory rows too , I have changed query execution mode to both and see output


So this is how we can use View Criteria for In-Memory filtering of rows.

Note : Based on my knowledge and also based on the information from other blogs and books, I have prepared this post.for sharing knowledge.Hope this will not effect my employer.
Thanks.

No comments:

Post a Comment