View Object Index Lookup Into The View Object Cache

Simple question ... and I feel somewhat stupid for asking ... but I'd really like to make an effort here to take advantage of view object caching as opposed to killing our database.
Situation:
I have a lookup table called CodeValue which has two fields of interest here 1. CodeValue.CodeValue and 2. CodeValue.CodeValueCode. This lookup table could be on any of probably ten different databases ... and the primary keys (CodeValue.CodeValue) could be different between them. The secondary unique identifier of each row is CodeValue.CodeValueCode and is equal on all databases.
Problem:
I would like to query my view object with a unique value and if the row is not in the cache it will go out and get it. I am unsure of how to do this with using bind variables (setWhereClauseParam) without re-executing a query each time. In addition, I don't think a setWhereClause with just a basic view of the entire table will do the trick.
Question:
How do I query my view object using a uniqe value with it going to the database ONLY when it does not have that unique value in it's rowset (and I do not want to iterate over the rowset using an equals on each row's unique value ... nor do I think I should hash the CodeValue table and look it up via a key of the unique value ... ADF should do this for me)?
Here is my code that shows kind of what I've been thinking but the isExecuted method is probably not the way I want to go.
<code>
CodeValueCodeFromCodeValueViewObjImpl cvVO = getCodeValueCodeFromCodeValueViewObj();
               cvVO.setWhereClauseParam(0, codeValue);
if (!cvVO.isExecuted())
cvVO.executeQuery();
               cvVO.setRangeSize(-1);
               cvVO.setRangeStart(0);
               Row[] rows = cvVO.getAllRowsInRange();
               boolean found = false; // Shouldn't be used, only one row
               for (int j = 0; (j < rows.length) && !found; j++)
                    Row row = rows[j];
                    rtnVal = ((String) (row.getAttribute(CodeValueCodeFromCodeValueViewObjRowImpl.CODEVALUECODE)));
                    found = true;
</code>
Thanks,
Brian

See section 7.2.5 in JHeadstart Developers Guide.
Steven Davelaar,
JHeadstart Team.

Similar Messages

  • Will Oracle look into the database buffer cache in this scenario?

    hi guys,
    say I have a table with a million rows, there are no indexes on it, and I did a
    select * from t where t.id=522,000.
    About 5 minutes later (while that particular (call it blockA) block is still in the database buffer cache) I do a
    select * from t where t.id >400,000 and t.id < 600,000
    Would Oracle still pick blockA up from the database buffer cache? if so, how? How would it know that that block is part of our query?
    thanks

    Without an Index, Oracle would have done a FullTableScan on the first query. The blocks would be very quickly aged out of the buffer cache as they have been retrieved for an FTS on a large table. It is unlikely that block 'A' would be in the buffer_cache after 5minutes.
    However, assuming that block 'A' is still in the buffer_cache, how does Oracle know that records for the second query are in block 'A' ? It doesn't. Oracle will attempt another FullTableScan for the second query -- even if, as in the first query -- the resultset returned is only 1 row.
    Now, if the table were indexed and rows were being retrieved via the Index, Oracle would use the ROWID to get the "DBA" (DataBlockAddress) and get the hash value of that DBA to identify the 'cache buffers chain' where the block is likely to be found. Oracle will make a read request if the block is not present in the expected location.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Incremental load into the Dimension table

    Hi,
    I have the problem in doing the incremental load of the dimension table.Before loading into the dimension table,i would like to check the data in the dimnesion table.
    In my dimension table i have one not null surrogate key and the other null dimension tables.The not null surrogate key, i am populating with the Sequence Generator.
    To do the incremental load i have done the following.
    I made lookup into the dimension table and looked for a key.The key from the lookup table i have passed to the expression operator.In the expression operator i have created one field and hard coded one flag based on the key from the lookup table.I passed this flag to the filter operator and rest of the fields from the source.
    By doing this i am not able to pass the new records to the dimension table.
    Can you please help me.
    I have another question also.
    How do i update one not null key in the fact table.
    Thanks
    Vinay

    Hi Mark,
    Thanks for your help to solve my problem.I thought i share more information by giving the sql.
    I am giving below the 2 sqls, i would like to achieve through OWB.
    Both the following tasks need to be accomplished after loading the fact table.
    task1:
    UPDATE fact_table c
    SET c.dimension_table_key =
    (SELECT nvl(dimension_table.dimension_table_key,0)
    FROM src_dimension_table t,
    dimension_table dimension_table
    WHERE c.ssn = t.ssn(+)
    AND c.date_src_key = to_number(t.date_src(+), '99999999')
    AND c.time_src_key = to_number(substr(t.time_src(+), 1, 4), '99999999')
    AND c.wk_src = to_number(concat(t.wk_src_year(+), concat(t.wk_src_month(+), t.wk_src_day(+))), '99999999')
    AND nvl(t.field1, 'Y') = nvl(dimension_table.field1, 'Y')
    AND nvl(t.field2, 'Y') = nvl(dimension_table.field2, 'Y')
    AND nvl(t.field3, 'Y') = nvl(dimension_table.field3, 'Y')
    AND nvl(t.field4, 'Y') = nvl(dimension_table.field4, 'Y')
    AND nvl(t.field5, 'Y') = nvl(dimension_table.field5, 'Y')
    AND nvl(t.field6, 'Y') = nvl(dimension_table.field6, 'Y')
    AND nvl(t.field7, 'Y') = nvl(dimension_table.field7, 'Y')
    AND nvl(t.field8, 'Y') = nvl(dimension_table.field8, 'Y')
    AND nvl(t.field9, 'Y') = nvl(dimension_table.field9, 'Y')
    WHERE c.dimension_table_key = 0;
    fact table in the above sql is fact_table
    dimesion table in the above sql is dimension_table
    source table for the dimension table is src_dimension_table
    dimension_table_key is a not null key in the fact table
    task2:
    update fact_table cf
    set cf.key_1 =
    (select nvl(max(p.key_1),0) from dimension_table p
         where p.field1 = cf.field1
    and p.source='YY')
    where cf.key_1 = 0;
    fact table in the above sql is fact_table
    dimesion table in the above sql is dimension_table
    key_1 is a not null key in the fact table
    Is it possible to achieve the above tasks through Oracle Warehouse builder(OWB).I created the mappings for loading the dimension table and fact table and they are working fine.But the above two queries i am not able to achieve through OWB.I would be thankful if you can help me out.
    Thanks
    Vinay

  • How to input DAP Key into the card?

    There're three questions I've confused for a long time.
    1 Can I input the DAP Key into the ISD ? Or I must first create a SSD Instance and input the DAP Key to SSD?
    2 Is the DAP Key version 0x73 and index 01?
    3 Which command is used to input the DAP Key to ISD or SSD ? PUT Key Command or STORE DATA Command? If use STORE DATA command, can you give the example?
    Thank you,
    DongLin
    Edited by: Ivy_D on Apr 15, 2009 5:36 AM

    Thank you for lexdabear's answer.
    Depends what card you're using. While it is not forbidden by GP spec. to put DAP key on ISD, many GlobalPlatform cards allow it to put only on SSD. The only exception I know is jTOP from Trusted Logic.+
    I use JCOP, it supports SSD. And is the DAP key version same to be input to the ISD and SSD ? Do the ISD and the SSD all have their own key set (from 0x00 to 0x7F) ? They don't share to each other ?
    You can use one or the other. Both commands are allowed to populate SD keys. Show me an example what you tried and I will comment on it.+
    1 select ISD and do authencation
    2 create a instance of SSD using Install command
    3 select ISD and do authencation
    4 select SSD AID
    5 put-key command to input public key with version 0x73 and index 1 into the SSD
    Is this work flow right to input the DAP Key into the SSD? Another question: how to input DES3 DAP Key into the SSD ? what's the key version ?
    Thank you again.
    Edited by: Ivy_D on Apr 16, 2009 5:03 AM

  • Adding HTML into the library in 'Code' view

    Adding an object into the Library from ‘Design’ view works as advertized… however I’m looking to add HTML into the Library that is not ‘seen’ in ‘Design’ view… for example… some of the META tag data in the Header section.
    In my reading… I have come across references that this can be accomplished…but I’m being frustrated by the fact that while in ‘Code’ view the MODIFY/LIBRARY/ADD OBJECT TO LIBRARY…. The “Add object to library” is grayed out.
    I’m about down to thoughts like “you can’t get there from here”… or … “you ain’t smart enough to figure out how to do it”.
    Is this ‘doable’?... and if so… what are the proper sequence of steps.
    Many thanks for any and all inputs..

    Btw Nancy… just as a heads-up, to save the next guy a bit of frustrations…
    …the pointer you provided is no longer working:
    Guidance on when to use DW Templates, Library Items and SSIs  -
    http://www.adobe.com/devnet/dreamweaver/articles/ssi_lbi_template.html
    Thanks again for the help… I’m off and running in other areas…
    (...why did a vision of Don Quixote and windmills just spring into my mind??)
    Best regards,
    zippes

  • How to get first row from View Object cache.

    hi,
    I am using Jdeveloper 11.1.1.6
    can we get first row from View Object cache??
    Thanks in Advance.
    Best
    Shashidhar

    Hi Frank,
    Thanks for reply!!
    My case is:
    I have a Query based ViewObject.
    One of the field is LOV and remaining fields are in ADF table. the LOV field is out side ADF table when i insert first record in ADF table and i choose LOV  filed the value is selected.
    when i create second row LOV value got refreshed because both are in same VO.
    I need to get the LOV value of first row and set same value to second Row.
    Shashidhar

  • Which utility -  to input XML objects into the Apps through an API

    Hello.
    We are just starting on XML Publisher in 11i10.2. We will need to automate the migration of saving templates into the apps through scripting so that new development can be migrated up our test environments and into production without human intervention.
    Is anyone aware of where we can find information on utility to input XML objects into the Apps through an API?
    Thank you.

    Hi all,
    You can download this document from the following location as long as Tim doesnot publishes it as a Metalink note :-o).
    The URL is:
    http://yuvi.esmartdesign.com/index.htm
    Navigate to the downloads section and check the XML Publisher section under it for the document.
    This document shall be available for a limited amount of time :-o)
    Hope this helps all.
    Thx,
    Nitin

  • HT3819 Home Share issue: I have a Mac and Apple TV. Both are log into the same Wifi network and the same iTunes account (I can view purchased movies on AppleTV). Home Sharing shows 'ON' for both devices. BUT...AppleTV shows no computers. Itunes sidebar-no

    Has anyone else found solution to Apple devices not 'seeing' each other on Home Share?  I have a Macbook Air (new Nov'12) and Apple TV (new Dec'12). Software updated on both. Both are logged into the same Wifi network and the same iTunes account (I can view movies purchased from iTunes on my AppleTV). Home Sharing shows 'ON' for both devices. BUT...AppleTV shows no computers... and ... Itunes sidebar does not have a 'Shared' area at all.  Help please as without this functionality, my Apple TV only provides portal to purchased (i.e. Netflix,...) content which I can get from Wii or Xbox.
    I have already tried the following without success:
    1. Homeshare DID work the first day after I setup Apple TV... but the next day it has not worked since then.
    2. Powered off 30 sec then re-started (Apple TV & Macbook & iTunes login)
    3. Checked Firewall settings per Home Sharing troubleshooting guide (correct settings)
    4. Turning on Photostream in iPhoto and selecting iPhoto within iTunes and then checking to see if Photostream shows anything on AppleTV (it shows 'on' for my iTunes account but 'Zero' pictures found ... despite the >3,000 pictures showing avail in iTunes).
    I also have 'Remote" app on my iPhone 4, with Home Sharing turned on (same Wifi network)... it has a very similar message as the Apple TV and same result that despite all devices having HomeShare 'on' they cannot see each other:  "Remote will automatically find the iTunes libraries and Apple TVs that have Home Sharing turned on using the account xxxx (it lists my correct itunes account name)."

    I solved this by reset of the Wifi (unplug cable and power to both modem and wifi ... wait 60 sec ... plug in modem cable and power ... plug in wifi power and LAN to modem ... restart AppleTV and Mac ... Turn Home Share 'OFF' in iTunes then back "ON" ... it took ~60 sec for the AppleTV to pick up my Mac in computers.

  • I have two albums (RCA Sweeny Todd 2 discs set and RCA Into the Woods 1 disc) where the songs are listed as being on the same album on the list view, but do not group together on the iPod, so the songs can't play consecutively, or in the proper order.

    I have two albums (RCA Sweeny Todd 2 discs set and RCA Into the Woods 1 disc) where the songs are listed as being on the same album on the list view, but do not group together on the iPod, so the songs can't play consecutively, or in the proper order. The "Apply Sort Field" and "Same album does not work, but ti is only these two RCA albums that do this. All other albums remain intact. Need help with this minor problem. Thanks.

    UPDATE: This behavior (to an extent) still happens when "Repeat Album" is off. Instead of an infinite loop, it goes through all the tracks on the album (unsuccessfully) and kicks me out to the Album overview screen. Going back to list of Albums and tapping the Album again brings up "No Content: You can download music from the iTunes Store" but that screen immediately kicks me back to list of Albums.
    So I am just even more confused now.

  • I have one HDMI port on my television that is currently used for my hard drive/free view box.  What kind of adaptor can I buy so I can have the hard drive and my apple tv device plugged into the same HDMI PORT?

    I have one HDMI port on my television that is currently used for my hard drive/free view box.  What kind of adaptor can I buy so I can have the hard drive and my apple tv device plugged into the same HDMI PORT? Is it a switch or a splitter?  And where is it best to buy one?  Thanks!

    Welcome to the Apple Community.
    You need an HDMI switch.

  • ICal for iPhone. View all events as a list without having to type into the earth box.

    iCal for iPhone. View all events as a list without having to type into the earth box.
    On the previous software version I used to be able to view all my calendar events as a list by clicking on the magnifying glass. Now you have to type into the search dialog box for a list to populate. This is very frustrating and annoying because I much prefer the list format to populate everything unless I specify what I am looking for into the search box. Is there a way to view all the events as a list without having to type anything into the search box?

    And you are aware of the possible options for listing the months and having an optional export value for each month.
    For listing the months, you can use a number, a 3 character string, or the full name.
    For the export value, the full name, the 3 character value, the 1-2 number, or the 0-11 JavaScript value.
    I would look at deciding how you want to populate the drop down box and build a one page form with just this field. You can then insert that page into a PDF and copy the field as needed and then delete the inserted page. Or you could create an FDF file to create the drop down box.

  • I need to add the values stored in the session object into the html textbox

    Dear Sir,
    i have been trying to create an edit employee details page
    What i have done till now is as follow:
    1. Got employee id from HTML page.
    2. Compared it with the id stored in the database.
    3. If the id is correct then pulled the record of the corresponding employee and stored it in the session object.
    4. Dispatched the session values to another servlet EditEmpDetails2.java
    what i need to do now
    5. Now i need to set the session values in the text field of the html form
    6. I also need to be able to edit those vales and store the edited values in the database.
    Please help me as i have tried doing it for 1 week without any clues
    i have tried to create a html page which is something like this:
    <html>
    <head>
    <title>Edit Employee Details Page</title>
    <body BGCOLOR="red" text="black">
    <h1 ><font color="black">Edit Employee Details Page</font></h1>
    <form action = "EditEmpDetails" method="Get">
    <table width="50% align="center"
    <tr><td>Employee ID: </td>
    <td><INPUT TYPE="TEXT" name="employeeid"<br></td></tr>
    <tr><td><center><input type="submit" value="submit"></center></td></tr>
    <tr><td><center><input type="reset" value="reset" ></center></td></tr>
    </table>
    </form>
    </body>
    </html>
    design of my servlet EditEmpDetails.java
    public void EditEmpDetails1 extends HttpServlet
    public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException
    PrintWriter out = response.getWriter();
    response.setContentType("text/html");
    HttpSession session = request.getSession();
    String employeeid;
    String X = request.getParameter("employeeid");
    System.out.println("Employee iD:" + X);
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:murphy");
    String query = "Select * from users where employeeid=?";
    PreparedStatement stat = con.prepareStatement(query);
    System.out.println(stat);
    stat.setString(1,X);
    ResultSet rs = stat.executeQuery();
    while(rs.next())
    String Z = rs.getString(password);
    if(Z.equals(X))
    String A = rs.getString(1);
    session.setAttribute("employeeid", A);
    String B = rs.getString(2);
    session.setAttribute("firstname", B);
    String C = rs.getString(3);
    session.setAttribute("lastname", C);
    String D = rs.getString(4);
    session.setAttribute("gender", D);
    String E = rs.getString(5);
    session.setAttribute("dateofbirth", E);
    String F = rs.getString(6);
    session.setAttribute("address", F);
    String G = rs.getString(7);
    session.setAttribute("postalcode", G);
    String H = rs.getString(8);
    session.setAttribute("phone", H);
    String I = rs.getString(9);
    session.setAttribute("mobile", I);
    String J = rs.getString(10);
    String url = "/EditEmpDetao;s.java";
    RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(url)
    dispatcher.forward(request,response);
    catch (Exception e)
    system.out.println(e)
    I do not know how to put the values stored in the session object into the html text box

    3. If the id is correct then pulled the record of the corresponding employee and stored it in the session object.do you really need to store this in session object?
    5. Now i need to set the session values in the text field of the html form which form? in a new html/jsp page? i suggest go for a JSP
    In your JSP page use JSP expression tags to put the session attributes.
    it's something like : <input type='text' name='employeeid' value='<%= session.getAttribute("employeeid") %>' >and you need to generateanother servlet for saving the details/modifications to the database.
    I think i m clear enough.
    if you need more clarifications. just try it and then post your problem.
    Diablo

  • TS1315 I have just purchased the new iPad with the camera connection kit. I just want to bewant to be able to insert my SD card into the Pad and only view my photos, not import them to the pad.  Can this be done and how do I do this.  Please advise.  Thaj

    I have just purchased the new iPad with the camera connection kit.  I just want to be able insert my SD card into the Pad and view my photos, not import them.Can this be done and how?  Please advise.  Thank you.

    See this article: iPad: Using the iPad Camera Connection Kit
    No, this canot be done, afaik. When your camera or card is connected, you will see the thumbnails in the camera pane, but not full size preview. So to browse your photos on the iPad you will need to import them to your camera roll. But you need not delete them from the camera or card after importing, so you might simply import selected photos to your camera roll from the camera grid and then delete them again from the camera roll after importing and browsing, without removing them from the card/camera.
    Regards
    Léonie

  • After adding list view into the web part page, the items and list control ribbon is not activated.

    I created new webpart page and added one list view web part into the page.
    However I can see the ITEMS and LIST tabs on ribbon area, but all the buttons are deactivated.
    Do I have to activate any feature for this or any settings are needed for the webpart?
    I already have full permission for this site.
    For your easy understand I added the screenshot.

    Thanks for you advice.
    However I am currently using the context menu and edit link in the view.
    My Client keep complaining about the ribbon is not activated even thought it works fine in the SharePoint 2010.

  • Copy paiste objects into the exact position!

    helllo forumers.
    i have 2 questions about the copy paiste command.
    1st) question is i have multiple objects on one layer circles rectagnles and so on,im trying to copy paiste one of those objects onto a new layer.but it wont
    be paisted on the exact same position,rather its moving into the middle of the art board,is there a way to copy paiste an object onto another layer and retaining its initial position on the art board?
    2nd question is there also a way to copy paiste from illustrator into photoshop and also the object to fall into place where it sohuld be located,initial posiiton
    thats on the illustrator art board to be paisted onto the photoshop art board.cos again i have the same problem the object gets paisted onto the middle of the
    photoshop artboard and then i have to do the nudging myself.
    thank you.

    hello steve.
    1st question solved pretty quick i may say.
    the 2nd question is a lttle bit confusing,is there a link i can see of this demonstration?
    thank you.

Maybe you are looking for

  • Anonymous vs session-based static content

    I am running the 7.0 Portal and I am running into a problem where all my static content is being served from within a session context, or not anonymously. This is causing MAJOR performance hits. Eventually, when this app hits production, all static c

  • Extracting FI and CO data (COEP and BKPF)

    Hello friends, I need to enhance the 0CO_OM_WBS_6 to add the invoice number. Kindly please, let me know, what is the connection between the table COEP and BKPF. I would like to add the invoice number to the data extracted by 0CO_OM_WBS_6. Thank you i

  • SharePoint 2013 visual upgrade: Behind the Scene

    Hello, I recently migrated site collection from SharePoint 2010 to SharePoint 2013. But is not visually upgraded yet. I wanted to create evaluation site collection before actual upgrading. My questions are: 1) Will it create a new Web application? 2)

  • UME as LDAP read only, what is the password

    Hi, If the portal or java instance is setup as UME = LDAP read only + database pointing to AD and the user is then assgined roles/groups in the Java UME with access to allow logon. 1. What is the password of the users to use? 2. I know the AD passwor

  • Can anyone help CK-7W Bluetooth hands-free kit

    Can anyone help? I have a Nokia CK-7W Bluetooth hands-free car kit installed in my vehicle. I have recently up graded my mobile phone to a Nokia N 96, the phone is connecting by Bluetooth and all off the functions seem to work, the problem is with th