Changing Runtime View Object Settings Before and After Using Them

Hi,
I'm doing some VO coding at the moment and reading around the subject to get an idea of best practices.
I stumbled across 2 blogs that are slightly contradictory:
https://blogs.oracle.com/vijaymohan/entry/applyviewcriteria_design_timerun_time_view_criteria
http://radio-weblogs.com/0118231/stories/2007/05/23/avoidActivationErrorsByChangingRuntimeViewObjectSettingsBeforeUsingThemNotAfter.html
What is the best practice when programmatically using VOs? Should I do cleanup before/after when using them.
Thanks
Kevin

John,
I read it in an unofficial blog somewhere yesterday and I cannot locate it now!
I'm reading some official documentation on this today:
http://docs.oracle.com/cd/E14571_01/web.1111/b31974/bcstatemgmt.htm#autoId37
The example steps given in 40.8.2 seems to contradict the latter paragraph:
Because many of the view object's instance settings are saved in the passivation state snapshot and restored on activation (as described in Section 40.5.1, "State Information Saved During Passivation"), it is not advisable to change any of these settings just after executing the view object+ if you won't be re-executing the view object again during the same block of code (and so, during the same HTTP request). Instead, change the view object instance settings the next time you need them to be different before executing the query.
Steps 5 and 6 seems to be changing the settings after executing the view object.+
Bottom line is I'm looking for best practice.
Should I do this in a VOImpl method:
//save original VO settings
String originalWhereClause = this.getWhereClause();
String originalOptimizerHint = this.getQueryOptimizerHint();
String originalOrderByClause = this.getOrderByClause();
String[] originalViewCriterias = this.getApplyViewCriteriaNames();
//change VO where settings and execute query
//restore original VO settings
this.setWhereClause(originalWhereClause);
this.setApplyViewCriteriaNames(originalViewCriterias);
this.setQueryOptimizerHint(originalOptimizerHint);
this.setOrderByClause(originalOrderByClause);
Or is that all unnecessary?

Similar Messages

  • How to get the query result of improvement (Before and After ) using sql de

    how to get the query result of improvement (Before and After ) using sql developer.

    Check
    http://www.oracle.com/technetwork/articles/sql/exploring-sql-developer-1637307.html

  • Split view for before and after changes?

    One feature I used to use a lot on Lightroom as where it would show a split view showing the image before and after changes (adjustments). I cannot find how to do this in Aperture - is it possible, what is this feature called?
    (and before any smart person tells me to look in help, I'm tired of responses like that. I've looked and didn't find, and that's why I'm asking here. I've tried Compare, and Before and After Changes etc.)

    Unfortunately, no, there is no ability to do the split view like Lightroom has. It's a nice feature.
    The closest you can do is to flip back and forth between two versions. Because when you view the master in aperture it shows the original file without crops and straightening, I suggest that once you crop and straighten, you then create a new version and work on that (this is as close as you can get to LR's "snapshot" functionality). You can then flip back and forth between the two versions to see the changes... but you can't see them side by side with a split.

  • Elements 9 - Before and After Picture View?

    I like working on photos when I can see the original picture on the left and the picture I'm editing on the right so I can 'see where I'm going' with my changes.
    I'm currently trying out Elements 9.
    When I work with the 'Guided' or 'Quick' Editing sections (right side) I have a drop down box that gives me the following options after the word View on the left side: 'Before Only', 'After Only', 'Before and After Horizonal', and 'Before and After Vertical'.
    But when I go to the 'Full Edit' mode that drop down box disappears.
    How do I get a Before and After Photo to show on the screen when I'm in 'Full Edit Mode'?
    Thank you for your help.
    TripleB

    Simply use a duplicate layer or adjustment layer before starting your edits and then you can click the eye icon in the layers pallet.
    You can click on and off to see before and after as you do more editing.
     

  • Before and After View

    When I'm in my Develop module and I look at some of my edited photos my before and after view is not showing.  Sometime I see the original for a second then it resorts to the edited.  Now this is happening to some of my collection cause in some collection they are working just fine.  Can some explain to me what is happing.
    thanks

    That's not it. I'm not sure what your talking about or we are talking about two different things. All the files in the collection are before and after are the same this is evident on some other folder in the collection.
    I think I figure out the problem
    Go to the History located  on the left side of your canvas, above the Copy and Paste buttons.  You should see Preset, Snapshot, History and Collection.  They should have a + beside to expand.  Go to History (this is a list of all you edits you made on the image) Go to the bottom where it says import of the file. This is the start point of your file.
    Right mouse click on the import xxxx xxxx file ( or how ever you saved your file name). Highlight "Copy History Step Settings to Before."
    There you go your good to go
    I don't know how to do this on all the images with this problem in the folder all at once.  I just do it individually.

  • Layout margin "Before" and "After settings

    I'm working on a document where I sometimes need to alter the preset upper and lower margins of a given page. I can use the "Before" layout margin setting to move the text box tops downward but trying to move the bottoms of the boxes upward using the "After" setting seems to do nothing. Isn't that what that setting is for?
    G5 1.8 Dual   Mac OS X (10.4.7)   MacBook

    The Before and After paragraph settings are for adjusting the spaces between paragraphs. Put you curser in a paragraph and adjust the Before setting and the space between that paragraph and the preceeding one increases or decreases. Adjust the After setting and the space between that paragraph and the next one changes accordingly.
    If you want to adjust the margins of the page, as well as the header and footer, use the Document Inspector.
    If your're using text boxes, just move the box as needed. To move the entire box it should be set for Fixed on Page.
    Walt

  • Merge to hdr pro before and after views

    After making adjustments with the sliders in the HDR  Pro dialog, is there a way to goggle before and after views of the merged image?

    Zeno,
    Thanks. I tried converting to 32bit/channel while in the Merge to HDR dialog, then opened the image in Photoshop, but still don't see how to get a before/after preview. How does this work exactly?

  • Changing transition changes time of clip before and after???

    When I add or change the transition time, after it renders, the time of the clip before and after the transition automatically changes. I've done it several times and it shortens the time of the clips before and after the transition. Why does it do tht? Its driving me nuts. I keep changing back the time on the clip but when it re-renders it goes back to the time after I changed the time on the transition. Help please thanks lots

    Hi Iluvvartan - that is normal. Transitions use portions of the clips adjacent to them. Cross dissolves for example take a portion from each, and the total length of the project is reduced. The Overlap transition only affects the length of one of the adjacent clips, and the total length of the project remains unchanged.

  • Mis-matched color in Before and After views

    I recently purchased and installed LR 2.1 on a new HP 2.4 gb Vista 64 bit. 4 gb mem. Nvidia GeForce 9300GE card. Single LCD monitor. All updates installed.
    While looking at an unedited Canon raw file in before and after I noticed that the gray was a little darker in the before view than in the after. I created a gray image in PS CS3 and took a look and it was the same.
    This view can be very helpful but misleading if the colors will not match.
    Any suggestions to a cure?
    Thanks, Richard

    Try generating a Matrix profile instead of a LUT-based profile (a setting in the i1 software I believe). Somebody else reported a problem in shadow colors when using LUT-based profiles.
    There can be a difference because the before view is based on the preview which is usually stored as a jpeg in adobeRGB space and the after view is rendered from the linear prophotoRGB space that Develop uses. It is possible that you're simply looking at artefacts because of that.

  • Before and After insert or update rowcount

    Hi
    I have several extract objects procs which are calling various build objects procs which in turn are inserting or updating the tables...now when i run these objects sometimes i get no errors and everything seems to be running perfectly but the tables do not get updated ? now what i am trying to achieve here is get some kind of summary where i can see the before and after rowcount..for that i have created a table of every extract object proc and another table with the coressponding tables being updated by tht proc...can anyone pls tell me how should i look into these procs and how do i get the rowcount for a particular table before and after the procedure was run ?
    Thanks a lot in advance

    Hi,
    On which version of RDBMS are you working , because if you're on 10g then just enable auditing or even FGA on the tables were you want to see the changes,
    Then query the DBA-AUDIT (not sure of the name anymore) view.
    If not then create a audit package yourself.
    something like
    create or replace package pck$audit as
    procedure prc$check_tablecount(p_tablename IN VARCHAR2, p_status IN VARCHAR2);
    end;
    create or replace package body pck$audit as
    procedure prc$check_tablecount(p_tablename IN VARCHAR2,p_status IN VARCHAR2) IS
    sqlstr VARCHAR2(100);
    v_count NUMBER;
    begin
    sqlstr := 'SELECT COUNT(*) FROM '||p_tablename;
    EXECUTE IMMEDIATE sqlstr into v_count; --could by 'using v_count' check syntax for this
    INSERT INTO audit_table(table_name,total_count,status,time_stamp)
    VALUES(p_tablename,v_count,p_status,SYSTIMESTAMP);
    COMMIT;
    end;
    end;
    you can elaborate on this creating additional procedure checking differences in total_count on same table at same time.
    Now call this procedure before starting your insert-delete- on your table make sure you put the parameters correct eg p_status => 'begin procedure'
    and call it again after your commit in your procedure.
    Hope this helps you out
    Erwin

  • An extra page prints before and after a page with the data, why?

    If I go to www.allrecipes.com, select a recipe and click on the Print button, FF prints an extra blank page before and after the recipe. The recipe is short and easily fits on a single page. I've changed all the print settings so that even the Header & Footer info is set to "Blank".

    I don't understand why blank pages are generated, but I can help you with a quick hack if you like. This will strip off everything but the actual recipe area so that you can streamline the printout.
    After you load the page and select your options:
    * Open Firefox web console using Ctrl+Shift+k
    * Next to the caret (>) paste the following script then press Enter to run it:
    var rectbl = document.querySelector(".pageback table.recipeprinttable"); document.body.insertBefore(rectbl, document.body.firstChild); while(document.body.children.length>1) document.body.removeChild(document.body.children[1]);
    * Close the web console by pressing Ctrl+Shift+k again
    When you preview the page, it should look ready for printing. Any luck?
    Obviously that's not very convenient if you print a lot of recipes from this site, so you could save the script as a bookmarklet. Here's how:
    First, copy this slightly modified script (select, Ctrl+c):
    javascript: var rectbl = document.querySelector(".pageback table.recipeprinttable"); document.body.insertBefore(rectbl, document.body.firstChild); while(document.body.children.length>1) document.body.removeChild(document.body.children[1]); void 0;
    Next, if you are not displaying the Bookmarks Toolbar, you can display it using either:
    * right-click a blank area of the tab bar > Bookmarks Toolbar
    * tap the Alt key > View menu > Toolbars > Bookmarks Toolbar
    Right-click on the Bookmarks Toolbar and choose New Bookmark.
    Paste the code into the Location box (the second box).
    Then type a useful name in the Name box (e.g., AllRecipes) and click Add.
    Now, when you want to hack the page, click the button to run the script.

  • No original with before and after

    PSE 11 on a mac. Before and after only showing the most recently edited version of my work. Not the original photo. Help

    Sorry, but I'm still not sure I see what the problem is. When you enter QF or Guided, you will see the condition of your photo at that moment. If you've done editing in expert mode, for example--say you used Correct Color Cast--you'll see your photo just as it is at this moment, with the color cast corrected. Are you saying that when you make a change in quick fix, the before photo is changing to show what you did so that it looks just like the After view? If so, quit the editor and then restart it while holding down command+shift+option. Keep the keys down till you see a window asking if you want to delete the settings file. You do.
    Or do you mean that in a previous editing session you had  edited a photo and saved the changes, but now you want to go back to the original as your starting point. If the last, if you use organizer, go there and expand the version set and choose the original to send for editing. If you're using iphoto, you may need to right-click the photo and choose Revert to get back to your original again.

  • Oracle Alert: Access before and after update values of a table column

    We have a requirement where a notification needs to be sent when 'END_DATE' attribute (column in a table X) is set, in an Oracle Applications form.
    I have defined an Event based Oracle Alert which fires 'On Update' of the table X.
    Could anyone please let me know as how to access the value of 'END_DATE' before and after update (i.e :new.END_DATE and :old.END_DATE) in the sql query of the alert.
    The need to use the before update and after update values of the attribute 'END_DATE' is that if we add the condition END_DATE is not null, the alert is sent even if any other attrbutes are updated in the Oracle form which is not the intended behavior.
    Appreciate any help.
    Thanks

    Hi
    use selectionlistener for your first table then add clientlistener and serverlistener so that you will get the rows on click in back bean.
    then get second table vo and and create and add row for that view object. add partial target to refresh your second table from back bean.
    on click of save call commit operation.

  • Proble with Before and After in camera raw

    The problem that I am having is the before and after in Camera Raw. When I press the P key for before and after; CR display the before and after to whole changes that I made and not just to one section. Let say, I am in the Detail section and Just want to see what changes I made in the Detail section only. I used to press the P key, but now I am seeing all the changes that I made to my file. I am using Adobe Photoshop CC and all my software is updated. I appreciatre a fix to this problem with many thanks

    Alternatevely you can take advantage of the new function recently introduced in CC. Press "Q" , this will split the monitor in two, (either vertically or horizontally) and each time you go to a new tab and make some change you can go back to previous state by clicking the icon in the  bottom right corner (see the picture).
    as you can see..you can "toggle between current settings and defaults for the visible panel"

  • Bug: Before and After Margins Layout with section starting in right page

    Hi,
    I am using the Spanish version of Pages 09. I have observed that when I start a new section, I have no problems setting the layout margins (right, left, before, after) of this section.
    But if a set that the new section must start in a right page, then the "before" and "after" margins of the layout doesn't work.
    Is this the same in English versions of Pages?
    Regards,

    I see what you are saying.
    The problem is Pages seems to have a memory of how you arrived at that layout.
    When I construct the pages, it is correct.
    I am trying to find out what is interacting in your layout to cause this to happen. It is like there is a hidden inaccessible layout break on the blank inserted page.
    I have been tearing my hair out trying to work out what triggers it off. As I experimented with the combinations of settings in Facing pages, Section layouts and which page it starts on, it erratically switches back and forth.
    This is why I gave up on Pages years ago as a serious layout tool. It has too many of these raw, poorly thought out interactions. I use a lot of different applications and none of them, that I can think of, have so many of these mind twisting raw oddities. Odd for a supposed user friendly application.
    All the rest are pretty literal, you apply the settings and end up with a logical result of those settings. If the result is not what you wanted it is a matter of tracking what is interacting with what and straightening it out. Pages has the annoying "design" of inexplicably greying out functions for no stated reason, that prevents correction. Or hiding the access to the tools to those settings. You can only get to some of them if you have explicitly done something to make them possible. The rules as to what that "something" is, are not apparent nor in most cases explained in the User Guide or the User Interface.
    There may be a "reason" why the function is greyed out but it is not revealed to the user without an enormous amount of detective work and as in this case my sleuthing abilities are failing me completely. I might try it again tomorrow after a rest (it is very late here). Either way it is a huge time waster.
    This is fundamentally bad User Interface design and what I have railed against since Apple changed shifts, bringing in the OSX programmers who never really got the polished UI of the original Mac OS and have been cooking with Fanta* ever since.
    Peter
    * This is an anecdote originally told by Peter Russell-Clarke, a well known and creative Australian chef back in the 70's. He was berated in the street by a woman who told him that his recipe for +Duck à l'orange+ was "disgusting". When he cross examined her, he found she didn't eat fresh fruit so had made the orange sauce with Fanta.
    I use this to try and get the message over to clients when they insist on "substituting" material because "what's the difference". The trouble with people who can't tell the difference is that they rarely ever do, no matter how carefully it is demonstrated to them.

Maybe you are looking for