How to implement Master-Detail Search in TopLink without using DataControl

Hi,
I am using TopLink and EJB in our requirement. But we are not creating any data controls. Without data controls how to implement master detail search using TopLink and EJB. I did search for a single table. It is working fine. The way i implented is as follows.
1) Taking search parameter from UI and passing it to A delegator class's method.
2) Delegator class's method calls the EJB's NamedQuery which i already created using expression builder.
3) EJB executes the NamedQuery with the parameter we are passing. And it returns the results back to UI.
But as i am new to TopLink, can anyone tell me the procedure to implement Master - Detail search. Here we need to search based on Master table's column.
Waiting for the replies regarding this.
Thanks & Regards,
Suresh Kethireddy

Hi,
I did it successfully. Following is the code.
Session session = getSessionFactory().acquireSession();
UnitOfWork uow = session.acquireUnitOfWork();
ReadAllQuery raq = new ReadAllQuery();
Dept d = new Dept();
d.setLoc(loc);
raq.setExampleObject(d);
List<Dept> res=(List<Dept>)uow.executeQuery(raq);
for(int i=0; i<res.size();i++){
System.out.println("Dept DeptNo ---"+res.get(i).getDeptno());
System.out.println("Dept DeptName ---"+res.get(i).getDname());
System.out.println("Dept Location ---"+res.get(i).getLoc());
List<Emp> eRes=res.get(i).getEmpCollection();
for(int j=0; j<eRes.size();j++){
System.out.println(" Emp No ---"+eRes.get(j).getEmpno());
System.out.println(" Emp Name ---"+eRes.get(j).getEname());
System.out.println("Emp HireDate ---"+eRes.get(j).getHiredate());
System.out.println(" Emp Job ---"+eRes.get(j).getJob());
System.out.println(" Emp Mgr ---"+eRes.get(j).getMgr());
System.out.println(" Emp Sal ---"+eRes.get(j).getSal());
But now my question is, i want to search by providing Dept param as well Emp(Which is child table) param also. Is it possible?
I tried in 2 ways like this.
1) Emp emp = new Emp();
emp.setEname(eName);
dept.addEmp(emp);
raq.setExampleObject(dept);
2) Emp e = new Emp();
e.setEname("ADAMS");
List<Emp> list = new ArrayList();
list.add(e);
d.setEmpCollection(list);
raq.setExampleObject(d);
But in both cases i failed to search based on the values i am passing to Emp.
Is there any other way to achieve my requirement?
Any help on this is great.
Thanks & Regards,
Suresh K

Similar Messages

  • How to implement Master - Detail relation between two table views in OBI11g

    Hi Gurus,
    I was able to create master- detail between table and graph.
    But between two tables not.
    I put the listening column on the table prompt and specified channel for the Listen to Master-Detail Events in the table properties.
    But did not work.
    Where is the mistake?
    I"d appreciate any ideas, help!
    Thanks
    Laszlo

    Thanks for the link!
    My question is :
    Are the same thinga the page edge and table prompt for the tables?
    If not how to add a column to the page edge (not to the table prompt)?
    Thanks
    Laszlo

  • How to Implement SSL with Oracle Applications R12 without using Load Balanc

    How to Implement SSL with Oracle Applications R12.1.3 without using Load Balancer

    Please refer to (Enabling SSL in Release 12 [ID 376700.1]).
    Thanks,
    Hussein

  • How to transfer files from mac to ipad without using itunes

    how to transfer files from mac to ipad without using itunes ???
    as i want to use my ipad for official use as well...please suggest..

    well to be 100% technical, no you didn't but that aside, it good to know there are ways for people to transfer music into the default apps without iTunes, if they have a need.
    I tend to use 3rd party apps for documents, like your mentioned iExplorer etc, which are handy.
    I see from a search the two "apps" you mentioned are not iOS apps, which I had assumed, SyncPod and FreeSync are apps for your computer, that would explain their access to the default Music/Video apps.
    I had wondered how Apple had allowed iOS apps in the store that could get around the sandboxing in iOS of apps.
    Message was edited by: CGW3

  • HT1689 How can I play podcasts on my iphone without using data?

    How can I play podcasts on my iphone without using data?

    I used to sync my podcasts to my phone individually, but found out that the Podcast app works better for me.  It continously downloads the podcasts (not really sure when, that's the only thing, when its downloading it may use data depending on where you are) and also deletes the ones i have listened to.  Hopefully that will help you out!

  • How to display the fields in ALV Output without using Field catalog?

    How to display the fields in ALV Output without using Field catalog?
    Could you pls tell me the coding?
    Akshitha.

    Hi,
    u mean without building field catalog. is it? I that case, we can use the FM REUSE_ALV_FIELDCATALOG_MERGE.
    data: itab type table of mara.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = sy-repid
    i_structure_name = itab
    CHANGING
    ct_fieldcat = lt_fieldcat[]
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    *Pass that field catalog into the fillowing FM
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_grid_title            = 'REPORTING'
                is_layout              = gt_layout
                it_fieldcat             = lt_fieldcat[]
           tables
                t_outtab                = itab.

  • I have all my pictures in an external drive, how do i create a library in iphoto without using my internal drive space?

    i have all my pictures in an external drive (around 1tb), how do i create a library in iphoto without using my internal drive space? thanks!

    In iPhoto use the command "File > Switch to Library" and then click "Create New" in the Library Chooser panel.
    Select a folder on your external drive as the destination.
    You can also get to this panel by holding down the alt/options key when you launch iPhoto.

  • HT201371 how do i un-disable my iphone 5s without using itunes

    how do i un-disable my iphone 5s without using itunes

    Make a Genius Bar appointment at your nearest Apple Store and have them Restore it as a new iPhone in iTunes.

  • How can i ge into the app store without using a credit card?

    How do i get into the app store without using a credit card?

    Unless you can find an item in the store that costs the same as your balance then you will need to contact iTunes Support and ask them if they can remove the balance : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • How can I back into the main screen without using the activator bottom?

    How can I back into the main screen without using the activator bottom?

    I assume you mean the HOME button. You cannot. The HOME button is the only way to exit an app.

  • Does anyone know how to get an application you had once without using App Store?

    Does anyone know how to get an application you had once without using App Store?
    Because I'm underage and I couldn't get it back.
    I just want it back, I'm not going to use any money in App Store...

    When you say you "had it once", how did you get it then?  The App Store has only been around for a few years, so there are lots of apps out there that you would once get from the developer, but now they're only available on the App store.  Which app(s) are you referring to? 

  • HT2204 I have recently immigrated to the US but my apple ID is still stuck with my previous country. How do I change the country? Preferably without using a credit card

    I have recently immigrated to the US but my apple ID is still stuck with my previous country. How do I change the country? Preferably without using a credit cardI've only been here in the US 2 months and still have no US credit card.

    Your credit or debit card credentials must be associated with the same country where you reside.
    "Although you can browse the iTunes Store in any country without being signed in, you can only purchase content from the iTunes Store for your own country. This is enforced via the billing address associated with your credit card or other payment method that you use with the iTunes Store, rather than your actual geographic location."
    From here >  The Complete Guide to Using the iTunes Store | iLounge Article

  • How can I clear my apple account balance without using a credit card?

    How can I clear my apple account balance without using a credit card?

    Unless you can find an item in the store that costs the same as your balance then you will need to contact iTunes Support and ask them if they can remove the balance : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Urgent !!! Master- Detail Search with Hide/Show option

    Hi,
    I have developed a master-detail OAF page with hide/show option.
    in my searching option i have both master and detail columns.
    How can i control detail level vo query.
    Eg. If i pass Item no in the searching option along with customer, i sould get only that item line for that CUST.
    I have created parameters in the main query and I am passing param values in a methos at AM.
    When i click on Show details its throwing exception.
    Can any one please help me how to acheive this. Its urgent...
    Thanks,

    Hi Gyan,
    Thanks for your reply.
    Master VO query:
    SELECT qfbp.pricing_attribute_context,
    qfbp.pricing_attribute,
    qfbp.comparison_operator_code,
    qfbp.pricing_attr_value_from,
    qfbp.pricing_attr_value_to,
    qfbp.adjustment_factor,
    qfbp.start_date_active,
    qfbp.end_date_active,
    qfbp.list_line_id,
    qfbp.factor_list_id
    FROM qpfv_factor_base_pricing_attrs qfbp
    WHERE qfbp.factor_list_id = NVL(:1,qfbp.factor_list_id)
    AND qfbp.pricing_attribute = NVL(:2,qfbp.pricing_attribute)
    AND qfbp.comparison_operator_code = NVL(:3,qfbp.comparison_operator_code)
    AND NVL(qfbp.pricing_attr_value_from,'xxxxx') = NVL(:4,NVL(qfbp.pricing_attr_value_from,'xxxxx'))
    AND NVL(qfbp.pricing_attr_value_to,'xxxxx') = NVL(:5,NVL(qfbp.pricing_attr_value_to,'xxxxx'))
    AND qfbp.adjustment_factor = NVL(:6,qfbp.adjustment_factor)
    Detail VO Query:
    SELECT qfapa.list_line_id, qfapa.pricing_attribute_context,
    qfapa.pricing_attribute, qfapa.pricing_attr_value_from,
    qfapa.pricing_attr_value_to, qfapa.factor_list_id,
    qfapa.comparison_operator_code, qfapa.pricing_attribute_id,
    qfapa.creation_date, qfapa.created_by, qfapa.last_update_date,
    qfapa.last_updated_by, qfapa.orig_sys_header_ref,
    qfapa.orig_sys_line_ref, qfapa.orig_sys_pricing_attr_ref
    FROM qpfv_factor_asso_pricing_attrs qfapa
    WHERE qfapa.pricing_attribute = NVL (:2, qfapa.pricing_attribute)
    AND qfapa.comparison_operator_code = NVL (:3, qfapa.comparison_operator_code)
    AND NVL (qfapa.pricing_attr_value_from, 'xxxxx') = NVL (:4, NVL (qfapa.pricing_attr_value_from, 'xxxxx'))
    AND NVL (qfapa.pricing_attr_value_to, 'xxxxx') = NVL (:5, NVL (qfapa.pricing_attr_value_to, 'xxxxx'))
    Iam using view link to display master detail results in one page.
    AM Code : Searcharttr method is for details VO.
    public void searchparams(OAPageContext pageContext, OAWebBean webBean)
    FactorListSearchVOImpl vo = getFactorListSearchVO1();
    String FactorlistName ="";
    String FactorListId ="";
    String PricingAttribute ="";
    String CompOperator ="";
    String PricingAttrValFrom ="";
    String PricingAttrValTo ="";
    String AdjustFactor ="";
    if (pageContext.getParameter("FactorListNameId")!=null&&!pageContext.getParameter("FactorListNameId").equals(""))
    FactorListId =pageContext.getParameter("FactorListId").toString();
    vo.setWhereClauseParam(0,FactorListId);
    else
    vo.setWhereClauseParam(0,null);
    if (pageContext.getParameter("BaseAttrTypeId")!=null&&!pageContext.getParameter("BaseAttrTypeId").equals(""))
    PricingAttribute =pageContext.getParameter("BaseAttrTypeId").toString();
    vo.setWhereClauseParam(1,PricingAttribute);
    else
    vo.setWhereClauseParam(1,null);
    if (pageContext.getParameter("BaseOperator")!=null&&!pageContext.getParameter("BaseOperator").equals(""))
    CompOperator =pageContext.getParameter("BaseOperator").toString();
    vo.setWhereClauseParam(2,CompOperator);
    else
    vo.setWhereClauseParam(2,null);
    if (pageContext.getParameter("BaseAttrValueFrom")!=null&&!pageContext.getParameter("BaseAttrValueFrom").equals(""))
    PricingAttrValFrom =pageContext.getParameter("BaseAttrValueFrom").toString();
    vo.setWhereClauseParam(3,PricingAttrValFrom);
    else
    vo.setWhereClauseParam(3,null);
    if (pageContext.getParameter("BaseAttrValueTo")!=null&&!pageContext.getParameter("BaseAttrValueTo").equals(""))
    PricingAttrValTo =pageContext.getParameter("BaseAttrValueTo").toString();
    vo.setWhereClauseParam(4,PricingAttrValTo);
    else
    vo.setWhereClauseParam(4,null);
    if (pageContext.getParameter("BaseAdustFactor")!=null&&!pageContext.getParameter("BaseAdustFactor").equals(""))
    AdjustFactor =pageContext.getParameter("BaseAdustFactor").toString();
    vo.setWhereClauseParam(5,AdjustFactor);
    else
    vo.setWhereClauseParam(5,null);
    public void searchattrparams(OAPageContext pageContext, OAWebBean webBean)
    FactorListSearchVOImpl vo = getFactorListSearchVO1();
    String AssoAttribute ="";
    String AssoOperator ="";
    String AssoAttrValFrom ="";
    String AssoAttrValTo ="";
    if (pageContext.getParameter("AsscAttrType1")!=null&&!pageContext.getParameter("AsscAttrType1").equals(""))
    AssoAttribute =pageContext.getParameter("AsscAttrType1").toString();
    vo.setWhereClauseParam(1,AssoAttribute);
    else
    vo.setWhereClauseParam(1,null);
    if (pageContext.getParameter("AsscOperator1")!=null&&!pageContext.getParameter("AsscOperator1").equals(""))
    AssoOperator =pageContext.getParameter("AsscOperator1").toString();
    vo.setWhereClauseParam(2,AssoOperator);
    else
    vo.setWhereClauseParam(2,null);
    if (pageContext.getParameter("AsscAttrValueFrom1")!=null&&!pageContext.getParameter("AsscAttrValueFrom1").equals(""))
    AssoAttrValFrom =pageContext.getParameter("AsscAttrValueFrom1").toString();
    vo.setWhereClauseParam(3,AssoAttrValFrom);
    else
    vo.setWhereClauseParam(3,null);
    if (pageContext.getParameter("AsscAttrValueTo1")!=null&&!pageContext.getParameter("AsscAttrValueTo1").equals(""))
    AssoAttrValTo =pageContext.getParameter("AsscAttrValueTo1").toString();
    vo.setWhereClauseParam(4,AssoAttrValTo);
    else
    vo.setWhereClauseParam(4,null);
    Iam getting below error:
    Error Page
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT qfapa.list_line_id, qfapa.pricing_attribute_context,
    qfapa.pricing_attribute, qfapa.pricing_attr_value_from,
    qfapa.pricing_attr_value_to, qfapa.factor_list_id,
    qfapa.comparison_operator_code, qfapa.pricing_attribute_id,
    qfapa.creation_date, qfapa.created_by, qfapa.last_update_date,
    qfapa.last_updated_by, qfapa.orig_sys_header_ref,
    qfapa.orig_sys_line_ref, qfapa.orig_sys_pricing_attr_ref
    FROM qpfv_factor_asso_pricing_attrs qfapa
    WHERE qfapa.pricing_attribute = NVL (:2, qfapa.pricing_attribute)
    AND qfapa.comparison_operator_code = NVL (:3, qfapa.comparison_operator_code)
    AND NVL (qfapa.pricing_attr_value_from, 'xxxxx') = NVL (:4, NVL (qfapa.pricing_attr_value_from, 'xxxxx'))
    AND NVL (qfapa.pricing_attr_value_to, 'xxxxx') = NVL (:5, NVL (qfapa.pricing_attr_value_to, 'xxxxx'))) QRSLT WHERE (LIST_LINE_ID = :1)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
         at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2970)
         at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2767)
         at OA.jspService(OA.jsp:41)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: ORA-01008: not all variables bound

  • How to Create Master Detail Page with Query Region

    Hi,
    1. I have a requirement that i need to create a Master(Supplier) Detail(Supplier Site) Page with Query Region.
    Eg. Supplier A in Australia has Supplier Sites X in Melbourne and Y in Sydney.
          Supplier B in US has Supplier Sites C in New York and D in California.
    I need to have Search, based on two fields Supplier Name and Country
    Let us assume i am searching with Supplier Name A then the page should be in the below layout
    Query Region
    Supplier Name : A
    Country:
    Master
    Supplier Name  Country
        A                     Australia
    Detail
    Supplier Site  City
    X                   Melbourne
    Y                   Sydney
    In detail VO it should allow me to add new sites which means i need to connect this VO to database to insert new records
    I have gone few threads and understood that this can be achieved by creating SupplierVO, SupplierSiteVO and a ViewLink.
    But when tried i don't know how can i relate my query region with the Suppleir Table(Header Reagin and Table Using Wizard) and Supplier Site Table(Header Region and Table Using Wizard) i am not sure if i am correct or not, please advise
    2. Also i need to have a Open button in this page and if click the button it should navigate to some other page.
    Please help me how can i achieve this.
    - How to design my page with query region and master detail tables
    - what is the AM and CO code need to be handled
    - What is the code should i write in Open button to open new OAF page.
    Thanks,
    CSK

    Hi,
    This link will be useful for your requirement.
    Master Detail Page using Hide Show and Advanced Table inside Advanced Table - OracleArea51.com
    Let me know if you need more help in this.
    Thanks and Regards,
    Myvizhi

Maybe you are looking for

  • Convert Smartform in WORD Document

    Hi Gurus How can i convert a smartform Output in a word document ??? and  download into PC.. Regards Gregory

  • Saving state (saveState() restoreState())

    Before navigating to another page (by navigation rule) I would like to save the state of current page and after returning back restoring the state. I tried everything possible with saveState() and restoreState() on components and it doesn't work. Ple

  • Proximity Sensor issue worse after the update

    I have the iphone 4 exchanged once and after seting the new one ( not from old back up) everithing seemed to be fine not perfect but fine ( 1 out of 10 calls would be an issue) but now after the update every call is an issue again ( pressing buttons

  • Quicktime - "Error: The operation could not be completed"

    I just took 1 and a half hours' worth of footage in quicktime screen recording, which I would rather not lose if possible. However, when I try to save the footage, it gives me the error listed in the title. I don't seem to have a problem with not bei

  • Protecting a Course

    Hello, I am examining captivate for using on my e-learning website. Currently I sell the content in protected PDF and .exe formats. Now I want to provide online content. However I want to see what options I have to: 1- Protect the content from downlo