How to query the object attribute changed his mind in another display object

JDeveloper 10.1.3.4

My requirement is I want to be able to query an object (entity based) view on a nonkey attribute where the value I'm looking on can either be in the database on an existing record or only been experienced by updating a different point of view object based on the same entity (and still commit).

When you query the second display of a value object just updated via a different point of view object, the second view object always returns no rows. I thought that the process is:

EntityA
ViewObjectA based on EntityA
ViewObjectB based on EntityA

ViewObjectA - line query with the key = 123. update the attribute Y with value 456 (attribute Y in the null database). Feature for EntityA cache, touch 123, attribute is updated with the value 456
ViewObjectB - line application with attribute = y. wait record in EntityA just updated cache to be returned. Instead, nothing is returned

Here is the code I was using (where RandScheduleEdit and RandScheduleSearch are the same view the entity RandSchedule object-based objects)
  public static void main(String[] args) {
    String        amDef = "test.cache.model.AppModule";
    String        config = "AppModuleLocal";
    ApplicationModule am = Configuration.createRootApplicationModule(amDef,config);
    
    ViewObject rsEdit = am.findViewObject("RandScheduleEdit");
    Key rsKey = new Key(new Object[]{40});
    Row[] rsEditRows = rsEdit.findByKey(rsKey,1);
    Row rsEditRow = rsEditRows[0];    
    rsEditRow.setAttribute("SId", new Number(7827));
    
    ViewObject rsSearch = am.findViewObject("RandScheduleSearch");
    rsSearch.setWhereClause("S_ID = :SId");
    rsSearch.defineNamedWhereClauseParam("SId", null, null);
    rsSearch.setNamedWhereClauseParam("SId",new Number(7827));
    rsSearch.executeQuery();
    Row rsSearchRow = rsSearch.first();
    
    Configuration.releaseRootApplicationModule(am, true);
  }
Why not rsSearch finds the S_ID = 7827 record? It seems to only be interviewing new records in the database and ignoring the record updated in cache just updated?

Any help much appreciated.

See you soon,.
Brent

rsSearch.setNamedWhereClauseParam ("SId", new Number (7827));

This might help:
rsSearch.setQueryMode (ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);

rsSearch.executeQuery ();

Tags: Java

Similar Questions

  • How to query the object module for the interface of the module interface specific, I need

    Hello.

    Currently using LabVIEW TestStand/2012 2012.

    I am looking to change the sequence of LabVIEW text translator, and in the CreateStep.vi I am trying to create a step of type WIS_Sequence_Call (a customized version of NI_Types.ini--> SequenceCall).

    I need set the file path, name and step sequence parameter values.  I think I need to access the SequenceCallModule class to do this.

    This will help the States of SequenceCallModule in the description of the file: "To access the properties and methods of a specific module class, ask the object Module for the specific module interface interface, you want to acquire".

    What, exactly, is "request" here?  It looks to "Clarify" might be what I'm after, but I want that result programmatically, IE no dialog box.

    See my excerpt below.

    Thank you.

    Use the connectivity-> ActiveX--> consider Variant. Define the type of SequenceCallModule, giving the interface as input Module. You must close the interfaces of the Module and the SequenceCallModule when you are finished with them.

    What he does is to call QueryInterface on the entry. The COM Module object implements the interfaces of the Module and the SequenceCallModule in this case to use.

    Hope this helps,

    -Doug

  • How to get the cursor to change when rolled on an object?

    does anyone know how to get the cursor to change when rolled onto an object. BTW, I have several objects to apply it.

    Select your object's buttonMode:

    yourobject.buttonMode = true;

  • How to create the object rectangular box with a pure action script.

    How to create the object rectangular box with a pure action script?

    I think, it can be done through the clip library, but I'm not sure. Please, I want to take the suggestion to create a rectangular box as a script through

    Take a new file and write about the first image the code below, it works fine:

    var rect = new Shape();
    rect.graphics.beginFill (0xFF0000);
    rect.graphics.drawRect (0, 0, 100,50);
    rect.graphics.endFill ();

    var MC = new MovieClip();
    mc.addChild (rect);
    addChild (mc);

    If this doesn't solve your problem then paste the error you get

  • Help, how to query the database using pagination

    Hello

    How to query the database using paging for large data.

    any API for this?

    Thank you in advance!

    Hello

    You can specify XmlQueryContext::Lazy as the type of assessment and only call XmlResults:: next() comes as many times as you need.

    John

  • Why paragraph styles did change his mind during a project?

    Using CS6 (CC), I am to convert a booklet our firm designed for Kindle. Since we would cut apart all of the text, and it has been published several times in the original, I'm cut and paste into a new document, implementation of brilliant new paragraph styles and essentially creating a clean export document.

    However, some weird things happened along the way, the following:

    1. a created paragraph style is "intro text". Based on 'no paragraph style', the black value Adobe Garamond, etc, etc. It works perfectly in all of the document except the first page. When I apply the same paragraph of its text style, the text shows quite differently (bright red, Meta). No substitution showing. Can I just retype the text and try setting up from scratch, but no idea why the same paragraph style that works on all other pages does not work here? (Screenshot showing the selected type and style that works everywhere else below.)

    2. the book is indexed by section color, so the first section has all red heads/subtitles, next heads yellow/subtitles, etc. I created the yellow subtitle based on red, the color change in the "color" box in paragraph styles. Several pages in the second section, the style of Pará yellow subtitle abruptly changed his mind and refuses to do the subtitle yellow unless I have replace manually in the text box. Even if the yellow is shown in the color of the box (see example below), and although it worked perfectly for several pages, this style now refuses to act according to its parameters. However, this works perfectly if I apply it to another type of text where I don't want it to work (see example below). If the same paragraph style works differently when applied to a different text on the same page. (aaaarrrrrgh)

    Everyone knows about this problem or questions, and what did you do to solve / them?

    Thank you!

    PS-gone-wrong.jpg

    red-not-yellow.jpg

    other-type-works.jpg

    Some of what you describe could be caused by the application of styles to characters in addition to the paragraph styles, but it also looks like there may be a few file coruption. See remove minor corruption by exporting and see if that helps.

  • How to move the virtual machine from one cluster to another cluster

    How to move the virtual machine from one cluster to another cluster

    If two Clusters are in the same data center, you could do a 'live' migration or vMotion, if that's the case.   If the virtual machine is turned off, it may be migrated regardless of the data center.

  • How to add the transient attribute for LOV (object of the view read-only)

    I have a view called CustomerView and attribute DepartmentId is present in it.

    Also exists DepartmentView and CustomerView.DepartmentId has an LOV from this point of view.

    I need to add a transient attribute to CustomerView which express the DepartmentName attribute in the LOV.

    Because of the view are read-only there is no entity object don't match them.

    How can I write the groovy for the transitional object expression.

    The name of the view accessor Lov's DepartmentView1

    Looking for your help. Thank you.

    Hi gcoban

    I do not understand your question correctly,

    you are not able to write to the expression property in viewObject?

    or you want to know how to write groovy for that?

    for writing groovy you need viewAccessor and you who have, you can try as Alejandro Tovar Lanz suggested

    or you can write code in RowImpl to fill in the name of the Ministry of the accessor

    See -https://blogs.oracle.com/adf/entry/combo_lov_how_to_display

    Thank you

  • How to query the attributes of xml documents

    I want to query only the details in the number = "705230" id (id is an attribute)

    I tried, but does not help. I should be able to query the value of the core_org_id attribute

    Select extract (CLOB_DATA, ' PcrDocument/PcrOrganization/core_org_id) CORE_ORG_ID of pcr_files where existsNode (CLOB_DATA, ' PcrDocument/PcrOrganization/questions/problem [@id = "705230"]') = 1;
    -returns nothing...

    I tried to extract the value for the id of the issue for R_DATE & R_REVIEW_DATE = 705230, but unable to iam.
    The data for all the questions is returned.

    Here is the query used...
    Select extract (CLOB_DATA, 'PcrDocument, PcrOrganization, questions, problem') ISSUE of pcr_files where existsNode (CLOB_DATA, ' PcrDocument/PcrOrganization/questions/problem [@id = "705230"]') = 1;


    Here is the part of the XML document iam mark on...

    -< ns1:PcrDocument id = "PCR-13562" title = "disclosures of EU - CE-1060/2009" version = '1' pcrPublishDate = "' 2012-01 - 11 T 12: 49:02" container = "http://www.w3.org/2001/XMLSchema" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1 = "http://integration.mysite.com/ServiceSchema/v3" > "
    -ns1:PcrOrganization core_org_id = "345840" >
    < ns1:PcrLinkedTo value = "ISSUE" / >
    -< ns1:AdditionalInfo >
    < ns1:Info type = "AdditionalInfo_QuartelyReport_URL" > < br > < other >MGH< / ns1:Info >
    < / ns1:AdditionalInfo >
    -< ns1:Issues >
    -< ns1:Issue id = "705230" >
    -< ns1:AdditionalInfo >
    < ns1:Info type = "R_DATE" > credit Release Date: April 9, 2010 < / ns1:Info >
    < ns1:Info type = "R_REVIEW_DATE" > credit last review Date: October 12, 2011 < / ns1:Info >
    < ns1:Info type = "AdditionalInfo_QuartelyReport_URL" > < br > < other >MGH< / ns1:Info >
    < / ns1:AdditionalInfo >
    -< ns1:IssueDetail id = "114766798" >
    -< ns1:AdditionalInfo >
    < ns1:Info type = "R_DATE" > credit Release Date: April 9, 2010 < / ns1:Info >
    < ns1:Info type = "R_REVIEW_DATE" > credit last review Date: October 12, 2011 < / ns1:Info >
    < ns1:Info type = "AdditionalInfo_QuartelyReport_URL" > < br > < other >MGH< / ns1:Info >
    < / ns1:AdditionalInfo >
    < / ns1:IssueDetail >
    < / ns1:Issue >
    -< ns1:Issue id = "727193" >
    -< ns1:AdditionalInfo >
    < ns1:Info type = "R_DATE" > credit Release Date: April 9, 2010 < / ns1:Info >
    < ns1:Info type = "R_REVIEW_DATE" > credit last review Date: October 12, 2011 < / ns1:Info >
    < ns1:Info type = "AdditionalInfo_QuartelyReport_URL" > < br > < other >MGH< / ns1:Info >
    < / ns1:AdditionalInfo >
    -< ns1:IssueDetail id = "117994574" >
    -< ns1:AdditionalInfo >
    < ns1:Info type = "R_DATE" > credit Release Date: April 9, 2010 < / ns1:Info >
    < ns1:Info type = "R_REVIEW_DATE" > credit last review Date: October 12, 2011 < / ns1:Info >
    < ns1:Info type = "AdditionalInfo_QuartelyReport_URL" > < br > < other >MGH< / ns1:Info >
    < / ns1:AdditionalInfo >
    < / ns1:IssueDetail >
    < / ns1:Issue >
    < / ns1:Issues >
    < / ns1:PcrOrganization >
    < / ns1:PcrDocument >

    Select extract (CLOB_DATA, ' PcrDocument/PcrOrganization/core_org_id) CORE_ORG_ID of pcr_files where existsNode (CLOB_DATA, ' PcrDocument/PcrOrganization/questions/problem [@id = "705230"]') = 1;
    -returns nothing...

    Some remarks (apart the obvious syntax error ' to leave'):

    -You are missing the namespace declaration in the functions existsNode() and extract()
    -You must use extractValue() to extract scalar values
    -Given that core_org_id is an attribute, you must use an attribute axis to access (@core_org_id or attribute::core_org_id)

    SQL> select extractValue( CLOB_DATA
      2                     , '/PcrDocument/PcrOrganization/@core_org_id'
      3                     , 'xmlns="http://integration.mysite.com/ServiceSchema/v3"' ) CORE_ORG_ID
      4  from pcr_files
      5  where existsNode( CLOB_DATA
      6                  , '/PcrDocument/PcrOrganization/Issues/Issue[@id="705230"]'
      7                  , 'xmlns="http://integration.mysite.com/ServiceSchema/v3"' ) = 1
      8  ;
    
    CORE_ORG_ID
    --------------------------------------------------------------------------------
    345840
    
    SQL>
    SQL> select extractValue( value(x)
      2                     , '/Issue/AdditionalInfo/Info[@type="R_DATE"]'
      3                     , 'xmlns="http://integration.mysite.com/ServiceSchema/v3"' ) as R_DATE
      4       , extractValue( value(x)
      5                     , '/Issue/AdditionalInfo/Info[@type="R_REVIEW_DATE"]'
      6                     , 'xmlns="http://integration.mysite.com/ServiceSchema/v3"' ) as R_REVIEW_DATE
      7  from pcr_files t
      8     , table(
      9         xmlsequence(
     10           extract( t.clob_data
     11                  , '/PcrDocument/PcrOrganization/Issues/Issue[@id="705230"]'
     12                  , 'xmlns="http://integration.mysite.com/ServiceSchema/v3"' )
     13         )
     14       ) x
     15  ;
    
    R_DATE                                                                           R_REVIEW_DATE
    -------------------------------------------------------------------------------- --------------------------------------------------------------------------------
    Credit  Release Date: 09-Apr-2010                                                Credit Last Review Date: 12-Oct-2011
     
    

    You don't mention the version of your database.
    The foregoing is deprecated in 11.2, use XMLTable/XMLQuery if you're on 11g.

  • How to query the data of Contact with multiple fields

    How can I query the data of Contact with multiple fields?

    For example, I'll get contacts which are changed after a point at the specified time and whose country is US. How could I make the chain of research of the SOAP API "Query"?

    And I also want to know how to make a search term for RESTful API for contacts above.

    Any suggestions?

    Thank you.

    Hi Biao,

    The following document describes how query for multiple fields using the SOAP API: request a Contact from several fields.

    And you can search multiple fields using the REST API with the & operator. For example, to search for a Contact by e-mail address and date of creation:

    Hope this helps and please let us know if you need more information.

    Thank you

    Fred

  • How to bind the 'Visible' attribute programmatically

    I use 11.1.1.6 JDeveloper.


    I have a MyBean method:

    Boolean isImgVisible() {}

    a logic here

    }


    If I have a page fragment with

    < af:image visible = "#{pageFlowScope.myBean.imgVisible" "

    ID = "i2" source="/Images/img.gif"/ >

    The 'Visible' link is ok


    But I want to do it programmatically


    In my bean, I created a RichImage


    RichImage img = new RichImage();

    img.setSource("/Images/progress.gif");

    IMG.setVisible("#{pageFlowScope.myBean.imgVisible");  This does not of course

    How to link the method above (isImgVisible()) 'Visible' attribute programmatically?

    Thank you

    In case someone needs it:

    RichImage img = new RichImage();

    img.setSource("/Images/progress.gif");

    img.setValueExpression ('visible' createValueExpression ("#{pageFlowScope.myBean.imgVisible"));

    Helper method

    public createValueExpression (string expression) {} ValueExpression

    FacesContext facesContext = FacesContext.getCurrentInstance ();

    Application app = facesContext.getApplication ();

    ExpressionFactory elFactory = app.getExpressionFactory ();

    ELContext elContext = facesContext.getELContext ();

    ValueExpression valueExp =

    elFactory.createValueExpression (elContext, expression,

    Object.Class);

    Return valueExp;

    }

  • How to read the objects and collections dynamically?

    Hello
    I want to read database/collection objects dynamically. Please advice!
    Here is an example

    Create the user as an object type (name varchar2 (100), number (3)) of the age
    /

    create a family of fonts as a user table
    /

    I want to do something like this

    DECLARE
    user of the var;
    BEGIN
    ...
    ...
    SELECT "family (1)" INTO var FROM DUAL;
    ...
    ...
    END;
    /

    Thank you

    As I suggested, you can define your own method of "diff" for the object. You haven't told us exactly what form you would like to work to take. I'll define a (pretty useless) function which will just create a string that tells you how to modify the data of an object to match the data in another. Obviously, you would like a more useful output. Potentially, rather than a member function, you can choose a procedure Member who emits DML is required for the underlying table is necessary.

    SQL> ed
    Wrote file afiedt.buf
    
      1  CREATE OR REPLACE TYPE location_typ AS
      2  OBJECT
      3  (
      4    building_no NUMBER,
      5    city        VARCHAR2(40),
      6    MEMBER FUNCTION diff(
      7                l location_typ)
      8    RETURN VARCHAR2
      9  )
     10* ;
    SQL> /
    
    Type created.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  CREATE OR REPLACE TYPE BODY location_typ
      2  AS
      3    MEMBER FUNCTION diff(
      4      l location_typ)
      5    RETURN VARCHAR2
      6    IS
      7      l_diff_str varchar2(4000);
      8    BEGIN
      9      IF building_no != l.building_no THEN
     10        l_diff_str := 'Building_no needs to change from ' || building_no ||
     11                         ' to ' || l.building_no;
     12      END IF;
     13      IF city != l.city THEN
     14        l_diff_str := l_diff_str ||
     15                        'City needs to change from ' || city ||
     16                          ' to ' || l.city;
     17      END IF;
     18      RETURN l_diff_str;
     19    END;
     20* END;
     21  /
    
    Type body created.
    
    SQL> DECLARE
      2    loc location_typ;
      3    secloc location_typ;
      4    a NUMBER;
      5  BEGIN
      6    loc    :=NEW location_typ(300, 'San Francisco');
      7    secloc :=NEW location_typ(200, 'Redwood Shores');
      8    dbms_output.put_line( loc.diff( secloc ) );
      9  END;
     10  /
    Building_no needs to change from 300 to 200City needs to change from San
    Francisco to Redwood Shores
    
    PL/SQL procedure successfully completed.
    

    Justin

    Published by: Justin Cave on 9 April 2012 14:12

  • How to add the XML attribute to an element using BPEL assign

    I have a xml request to a bpel process that contains no attribute.
    After some process, I need to create this missing attribute and specify a value.

    I tried to use the XML fragment in the business to be divested. But how do I create an attribute?
    This XML node which I am trying to create an attribute is a very large knot with many dynamic typing(xsi:type). I can just re - create the complete xml code with the required nodes.

    Anyone know how I can create an attribute xml using the BPEL entitlement? I don't want to use the Java code in my process.

    Thank you.

    You can use the attribute bpelx:insertMissingToData on the item to copy, for example:




    Query="/client:process/@time"/ >

    If not there is time of the attribute in the process element, it will be added.

  • How to stop the zoom to change?

    How to stop the zoom of the evolution to more or less at will.  I don't have a mouse

    Hi shellywilson,

    ·         Are you referring to the Web page zoom feature?

    ·         Did you do changes on the computer before the show?

    Follow the steps in the article.

    Get the best display on your monitor

    For reference: Zoom in on a Web page

  • How to test the object lost focus?

    How that test an object lost focus?

    Van you listen to the accent of the event

Maybe you are looking for

  • my ipod doesn't send photos

    ALL OF A SUDDEN MY IPOD TOUCH SEND NO PHOTOS OR VIDEOS BY EMAIL

  • Satellite L40 - 17U does not illuminate

    Hello world! I have a problem with my Toshiba Satellite L40 - 17U.It lights without a battery. Laptop works for several minutes with the battery, then turns off. Can it work without the battery? If it is possible, then, what can be the problem? Thank

  • Price Y560P

    Hello, I recently wanted to buy this model with a second generation of core i7, 6 GB ram, ati 6570 1 GB and it worthed $899 and was sold by lenovo, I tried yesterday and it wasn't there, now, I know her as a reminder of lenovo for fixing the processo

  • Audio stutters when listening to music on T420s - 4174FM9 - Bluetooth

    Stutters audio when you use a bluetooth connection to my speakers BOSE (from Spotify). Has started recently. Cable works perfectly. I use the version of Thinkpad BLuetooth 3.0. Conexant HD Smartaudio 20672. Any suggestion?

  • How can I print the individual lists in a group of Windows Mail?

    Original title: Group of Windows Mail in Vista How can I print the individual lists in a group of Windows Mail?