Object of Objects in Oracle - How to implement in Java

create type course_obj as object (
   course_id number,
   course_name varchar2(30)
create type course_tab as table of course_obj;
create type dept_obj as object (
    dept_id number,
    dept_name varchar2(30),
    courses  course_tab
create type dept_tab as table of dept_obj;
create table test_course (
       course_id number,
       course_name varchar2(30)
create table test_dept (
     dept_id number,
     dept_name varchar2(30),
     course_ids varchar2(50)
create or replace procedure  display_dept (pi_dept_id number ,  pi_dept_details dept_tab  )
    is
    l_course_ids varchar2(150);
    begin
        for i in pi_dept_details.first .. pi_dept_details.last
        loop
            if pi_dept_details.exists(i)  then
               insert into test_dept values ( pi_dept_details(i).dept_id, pi_dept_details(i).dept_name, null);
               l_course_ids:=null;
               for j in pi_dept_details(i).courses.first .. pi_dept_details(i).courses.last
               loop
                    l_course_ids:=l_course_ids||pi_dept_details(i).courses(j).course_id;
                    insert into test_course values ( pi_dept_details(i).courses(j).course_id, pi_dept_details(i).courses(j).course_name);
               End loop;
               update test_dept set course_ids =l_course_ids where dept_id=pi_dept_details(i).dept_id;
            end if;
        end loop;
        commit;
    End display_dept;Can any body please guide me calling this procedure in JAVA.

>
Can any body please guide me calling this procedure in JAVA.
>
No - not in this forum. This forum, as the title says is for SQL Developer and your question has nothing to do with sql developer.
You need to use JDBC to do what you are asking.
Please mark this question ANSWERED and repost it in the JDBC forum.
https://forums.oracle.com/forums/category.jspa?categoryID=288
Before you repost you should review this article that demonstrates how to call an Oracle stored procedure and pass Oracle object types.
http://technology.amis.nl/2008/07/16/oracle-jdbc-passing-a-table-of-custom-object-type-to-a-stored-procedure-implementing-efficient-single-round-trip-data-exchange-part-two-of-an-adf-application-on-a-plsql-api/
And for any of the code and example you don't understand you should review the relevant sections of the JDBC Developer's Guide.
http://docs.oracle.com/cd/B28359_01/java.111/b31224/oraarr.htm#g1072333
If you do repost in the JDBC forum provide your 4 digit Oracle version, your os and JDK versions and the version and name of the JDBC jar file that you are using.

Similar Messages

  • How to implement a java class in my form .

    Hi All ,
    I'm trying to create a Button or a Bean Area Item and Implement a class to it on the ( IMPLEMENTATION CLASS ) property such as ( oracle.forms.demos.RoundedButton ) class . but it doesn't work ... please tell me how to implement such a class to my button .
    Thanx a lot for your help.
    AIN
    null

    hi [email protected]
    tell me my friend .. how can i extend
    the standard Forms button in Java ? ... what is the tool for that ... can you explain more please .. or can you give me a full example ... i don't have any expereience on that .. i'm waiting for your reply .
    Thanx a lot for your cooperation .
    Ali
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by [email protected]:
    Henrik, the Java importer lets you call Java classes on the app server side - I think what Ali is trying to do is integrate on the client side.
    If you want to add your own button then if you extend the standard Forms button in Java and then use this class name in the implementation class property then the Java for your button will be used instead of the standard Forms button. And since it has extended the basic Forms button it has all the standard button functionality.
    There is a white paper on OTN about this and we have created a new white paper which will be out in a couple of months (I think).
    Regards
    Grant Ronald<HR></BLOCKQUOTE>
    null

  • How to implement a java class

    dear friends
    i use forms6i server and oracle 9i server edition,under windows 2000 server
    i try to implement a java class for a bean area. i do the following :
    from the property palette i write the class name in implementaion class property . the class name is 'arc.class' and it is located in <oracle_home>/forms60/java
    but the fellowing error appears
    frm-13008 cannot find javabean with name 'arc.class'
    would any one help please

    Dear Grant Ronald
    thank you very much for helping me . now i undersatand how to implement a class. but i have another question ,and i wish you ccould help me .
    i try to import a java class, i do the following:
    From the program menue i choose Import Java Class
    but the following error appears
    (pde-uji001 faild to create JVM)
    by the way i use forms6i server and oracle 9i server under windows 2000 server
    thanks in advance
    tarek

  • How to implement this Java Script?

    Hello,
    I have this script to remove the link from titles of web parts.  I am new to SharePoint 2013 development. I am not sure where to put it. Not sure what file to put it and how to implement it.  How can ensure this code gets run on pages through out
    my SharePoint 2013 site.
    jQuery(document).ready(function () {
           $('a').filter("[href='###']").each(function () {
            $(this).replaceWith($(this).html());
    Reference
    https://expectedexception.wordpress.com/2012/01/30/how-to-remove-the-list-view-web-part-title-bar-link/
    Paul

    Get the page Url from the website and go to Sharepoint Designer and browse the page and add the script within a scritp tag <script>jQuery(document).ready(function
           $('a').filter("[href='###']").each(function () {
            $(this).replaceWith($(this).html());
     });</script>
    how to open a site in SP Designer:
    https://support.office.com/en-ie/article/Open-a-SharePoint-site-94d33d70-3f07-4a8e-b5b5-1137a9c36e74
    another option is to find the global file that contain the scripts and add it as a method there. You can check these files by viewing source of the page.
    note also that the Jquery reference is needed for this code to execute.
    Fouad Roumieh

  • How to implement a java application in Portal

    Hello,
    I was asked if it is possible to implement a java (not a web application / not java web dynpro) to implement into the portal. Is this possible with something like the java web start? Is someone using something like that in the real world?
    Thanks a lot,
      Vanessa

    Hi Vanessa.
    Yes, it is possible to integrate Java applets into portal. Have a look at XML Form Buider or SAP Management console (http://portalhost.domain:5xx13).
    Best regards,
    Aliaksandr Zhukau

  • Need Assistance for VBA function in oracle how to implement

    My very respected and Senior, regards,
    Sir, hope you will in best of health and wealth by the grace of God,
    Sir, i have a request problem as i m very junior against you and you have passed this time before many years ago as i m standing where. Sir i m a very junior developer of oracle and have a problem putting on your desk with the hope that you can help my as a boss.
    Sir me have to calculate yield of Bond using oracle form
    i have tried my best and tired
    there is a formulae in excel which give the Yield() when we provide the parameters
    and i need the excel formulae or the oracle calculation code of PLSQL for this.
    How can i get yield when i have price, coupon rate, frequency, issue and maturity of the coupon , coupon period , next coming coupon , and others detail.
    or tell me how to use EXCEL VBA for this problem ,
    thnx n regards,
    yours student, junior developer youngest brother
    Faraz
    How can I get the solution using Excel VBA function with oracle
    so that move values to excel calculate them and copy the result from excel to oracle forms

    Hi,
    for the Hex-Number-conversion see:
    [url http://psoug.org/snippet/Convert-Hex-to-Decimal-Decimal-to-Hex_78.htm] self-defined Conversion-Functions
    What number format do you have? YYYMMDD
    Or is there a Date corresponding to 1 and a number n represent the date n-1 days after day 1?
    Please describe further.
    Bye
    stratmo

  • How to implement simple java stored procedure

    I'm using Maxdb  7. 6.03.15 (standalone - no SAP) as a Migration Environment to a new centralized SAP solution.
    Most of the work is done in internal DBproc but I need to trig external procedure (those one's written in Java).
    I have already spent too much time to find related information and because I need only very simple triggreing, I don't want to learn and deploy product like NetWeaver ... anyone could give me minimal information on how to do that ...
    If I'm right, I need to configure the MessageServer and develop a minimist java proc that should be able to register the DBproc (java language) inside DB and handle the MessageServer msg generated by my internal DBproc call to the newly registered java proc ?
    I just want to do that as simple as possible, I don't need locking scheme neither multiple request queue ... because I control all access to the DB and all process are completely serialized  (It was a design rule).
    Could anyone help me ?

    Thank's Lars for that quick answer !
    You wrote,
    > AFAIK one development target is to implement UDEs (User Defined Extensions) that will allow the creation of "inside-the-db-code" in >other languages than the one used for the stored procedures.
    did you mean "JavaUdeServer" ? I see some interesting code in source tree about that . I investigate a little about but I miss the binary javaUdeServer code (and I don't want to rebuild the distribution also because of different version). The message returned when I tried to call a registered java stored proc was smoething like 'Impossible to contact UDE server' 
    But the code is still embedded in the kernel (as It can be found in the map files).
    I don't find any documentation on that feature ,is it for security reason ? If so  I'm ready for a 'No disclosure agreement' (It's not a personal request).
    Of course, if the only way is NetWeaver that could be OK but the task seem's to me so heavy regarding my so simple need's  ... if there is a short way (samples ?) to kick me on NetWeaver to reach my goal you're welcome !!
    (Some piece of code on NetWeaver that allow a procedure to call to external java proc that return hostname will be enough ...).
    For you information, (because I have the feeling I got your answer) I already install a trial NetWeaver some week's ago but I don't spent (and I don't have) many times to use It and I have the bad sensation to try driving a big truck only to move a cup of coffee ...(of Java of course !) but perhaps I'm too impatient ?
    Regards,
    Michel

  • How to implement a java class in javafx?

    public interface WarningEvent {
        public void warningHandler ();
    function test ():Void {
            var warningEvent:WarningEvent = new WarningEvent() {
                public void warnHandler(){
        }I am trying to implement java method inside javafx, but without luck. I also tried override with javafx syntax, but still cannot get it. Any one could help on this?
    Thanks.

    1) Get rid of the keyword new
    2) Get rid of braces ()
    3) For the function declaration, use the JavaFX syntax, not the Java syntax!
    function test ():Void {
            var warningEvent:WarningEvent = WarningEvent {
                override public warnHandler():Void {
    }Your class need to have a default constructor (the one without any argument) to be able to do this (and in this case it works because you have an interface instead).

  • How to implement Strategy pattern in ABAP Objects?

    Hello,
    I have a problem where I need to implement different algorithms, depending on the type of input. Example: I have to calculate a Present Value, sometimes with payments in advance, sometimes payment in arrear.
    From documentation and to enhance my ABAP Objects skills, I would like to implement the strategy pattern. It sounds the right solution for the problem.
    Hence I need some help in implementing this pattern in OO. I have some basic OO skills, but still learning.
    Has somebody already implemented this pattern in ABAP OO and can give me some input. Or is there any documentation how to implement it?
    Thanks and regards,
    Tapio

    Keshav has already outlined required logic, so let me fulfill his answer with a snippet
    An Interface
    INTERFACE lif_payment.
      METHODS pay CHANGING c_val TYPE p.
    ENDINTERFACE.
    Payment implementations
    CLASS lcl_payment_1 DEFINITION.
      PUBLIC SECTION.
      INTERFACES lif_payment.
      ALIASES pay for lif_payment~pay.
    ENDCLASS.                 
    CLASS lcl_payment_2 DEFINITION.
      PUBLIC SECTION.
      INTERFACES lif_payment.
      ALIASES pay for lif_payment~pay.
    ENDCLASS.                   
    CLASS lcl_payment_1 IMPLEMENTATION.
      METHOD pay.
        "do something with c_val i.e.
        c_val = c_val - 10.
      ENDMETHOD.                   
    ENDCLASS.                  
    CLASS lcl_payment_2 IMPLEMENTATION.
      METHOD pay.
        "do something else with c_val i.e.
        c_val = c_val + 10.
      ENDMETHOD.  
    Main class which uses strategy pattern
    CLASS lcl_main DEFINITION.
      PUBLIC SECTION.
        "during main object creation you pass which payment you want to use for this object
        METHODS constructor IMPORTING ir_payment TYPE REF TO lif_payment.
        "later on you can change this dynamicaly
        METHODS set_payment IMPORTING ir_payment TYPE REF TO lif_payment.
        METHODS show_payment_val.
        METHODS pay.
      PRIVATE SECTION.
        DATA payment_value TYPE p.
        "reference to your interface whcih you will be working with
        "polimorphically
        DATA mr_payment TYPE REF TO lif_payment.
    ENDCLASS.                  
    CLASS lcl_main IMPLEMENTATION.
      METHOD constructor.
        IF ir_payment IS BOUND.
          me->mr_payment = ir_payment.
        ENDIF.
      ENDMETHOD.                  
      METHOD set_payment.
        IF ir_payment IS BOUND.
          me->mr_payment = ir_payment.
        ENDIF.
      ENDMETHOD.                  
      METHOD show_payment_val.
        WRITE /: 'Payment value is now ', me->payment_value.
      ENDMETHOD.                  
      "hide fact that you are using composition to access pay method
      METHOD pay.
        mr_payment->pay( CHANGING c_val = payment_value ).
      ENDMETHOD.                   ENDCLASS.                  
    Client application
    PARAMETERS pa_pay TYPE c. "1 - first payment, 2 - second
    DATA gr_main TYPE REF TO lcl_main.
    DATA gr_payment TYPE REF TO lif_payment.
    START-OF-SELECTION.
      "client application (which uses stategy pattern)
      CASE pa_pay.
        WHEN 1.
          "create first type of payment
          CREATE OBJECT gr_payment TYPE lcl_payment_1.
        WHEN 2.
          "create second type of payment
          CREATE OBJECT gr_payment TYPE lcl_payment_2.
      ENDCASE.
      "pass payment type to main object
      CREATE OBJECT gr_main
        EXPORTING
          ir_payment = gr_payment.
      gr_main->show_payment_val( ).
      "now client doesn't know which object it is working with
      gr_main->pay( ).
      gr_main->show_payment_val( ).
      "you can also use set_payment method to set payment type dynamically
      "client would see no change
      if pa_pay = 1.
        "now create different payment to set it dynamically
        CREATE OBJECT gr_payment TYPE lcl_payment_2.
        gr_main->set_payment( gr_payment ).
        gr_main->pay( ).
        gr_main->show_payment_val( ).
      endif.
    Regads
    Marcin

  • How to implement a Session Object.

    Hi,
    If anybody show me any example of how to implement
    session object so that I can store any parameters such as user id and use it later on. And also if there is any good web site for reference about using session object.
    thanks

    You can use the the session.setAttribute and session.getAttribute methods.
    For example let's say you would want to store a username in the session after a user has logged on:
    String usrname = request.getParameter("username");
    session.setAttribute("myStoredUsername", usrname);
    you can then retrieve it using the get method. Remember that the entities stored inside a session object are generic objects and need to be cast to be used:
    String usrname2 = (String)session.getAttribute("username");
    Hope this helps
    Chelman

  • How to create view object for a predefined Oracle view

    Trying to create an entity object with no success,,,
    I have an Oracle view(complex query in PL/SQL) that I need to encapsulate as a View Object then represent a column from this view as a '' | | linkcolumn | | ''
    then get a reference of the requestParameter "p" in this case that I need to use as whereclause parameter on another view object that is part of the ListPage.jsp.
    The application is basically a page of organization links that when click filters their reports as a list,
    In Jdeveloper's context webBean(RowSetBrowser list [org links] to RowSetBrowser [org report list])
    Can I implement this functionallity using the wizards or possibly writing custom code using the standard webBeans.

    Jerry,
    First, you can create an entity object based on an Oracle view. If you check the "Views" checkbox in the EO wizard, you'll see a list of database views. Then you can create a view object based on your entity object, and use it like any other view object.
    As for getting the page into the format you want, I suggest you start by generating your page using the BC4J JSP wizard, then customize the generated JSP.
    Thanks
    Blaise

  • How to implement Object based navigation

    Hi all,
    Can any one guide me the steps for Implementing Object based Navigation.
    Thanks in advance,
    Satish J

    Hi Sathish,
    sorry for the delay. hope it is not too late
    I have updated wiki with the content. i am just building it up..not yet completed.
    i think you can go thru the example which i have completed to have a detailed view of how to implement obn.
    please refer the link.
    https://wiki.sdn.sap.com/wiki/x/SZ
    You can send your comments regarding the page so tat i can incorporate the same in the content which i am preparing now.
    Regards,
    Sharadha

  • Anyone knows how to implement Decomposition Tree in Oracle BI products? to

    Hello Everybody
    Recently I'm trying to use Oracle BIEE plus to upgrade our old report service in our product. I'm a newbee to OracleBI products but I have a question that oracle support guys in our region also could figure out a clear answer. If anybody here can give me some clues it would be appreciated.
    I once used ProClarity BI product before, and ProClarity report service can provide a very powerful visualization tool like Decomposition Tree. I'm quite interested this function. But I searched many Oracle BIEE plus and ESSBASE documents, it seems Oracle BI can' implements the functional for which Proclrity Decomposition Tree can provided?
    Is there any body knows any other solution to implement Decomposition Tree in Oracle BI product?
    Thanks

    Appreciated the quick response:)
    Yes. I don't find the directory object .. I'm not very familiar with biee so far so might be me slight this object in my investigation.
    I need to check this object and see how it works.
    And thanks for your advise.

  • How to retrieve the java object in a proxy service in osb -- Plz help

    Hi all,
    I have a singleton java class which runs whenever the weblogic server gets started and store the output in its object. I need to access this java object from a proxy service in osb.
    We tried using java call out and retrieved that object but we couldn't know how to parse that object into XML.
    We are not sure of using the java call out in osb to solve this purpose because whenever we use a java callout, that particular java code will run which is not the case of singleton class.
    So kindly help us how to retrieve the java object which holds the output without running the java code every time because its already run and holding the output in its object.
    Regards
    Prabhu

    here the doc http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#wp1106656
    but I guess you are already at the stage of getting a POJO in a first Java Callout and passing the POJO to a second Java Callout, which should then return it to OSB as a XMLObject.
    My recommendation is to write a Java function which returns a XMLObject and uses a XMLCursor to populate it with the values of the POJO.
    An XMLObject returned to the OSB is automatically transformed in a "XML" variable (which in reality is represented as a XMLObject in the Pipeline context)
    Here some code sample:
    http://www.javamonamour.org/2010/09/how-to-create-xmlobject-using-xmlcursor.html

  • How to Capture the Objects in Object Library in Openscript tool?

    Hi All,
    I am new to OATS and i was trying to explore the Object Library in Opencript tool.
    Can anyone please advise me how to capture the Oracle forms Object in Object Library or Object Repository using OpenScript Tool?
    It would be grateful,If you can provide me the step to follow for the above.
    Thanks
    Ajith

    Hi Ajith,
    Create one Object Library. In OpenScript click File -> New -> Select Object Library under Script Assets.
    Then mention name of your library and save it.
    Add this library to script assets of your script. Select Script -> Script Properties... -> Script Assets -> Object Library -> Add(button) -> select your Object Library.
    Then save  your script and start recording. After recording you can see xpath of all objects you interacted with during your script recording.
    If you want to apply this to your script, select Script -> Apply Object Library.. -> then select your Object Library. If you want to revert it, then select Script --> Revert All Navigation To Recorded
    Hope this will help you...
    Regards,
    Deepu M

Maybe you are looking for

  • Proxy was not working  in sap r/3

    Hi All, I have a scenario from jdbc to SAP.I have made serverproxy.The proxy was not working.I have test the proxy backend it is working fine,but i am staring jdbc channel the data was not insert in to the database table in sap.I have checked in sxmb

  • CS3 Data Merge - Missing Fileds in Data Merge Dialog Box

    Indesign CS3 5.0.1, XP SP2 Hi all, I have a document that I have applied a Data Merge to. I use a table in Excel 2003 with contact details, name, address etc... When I open the Automation> Data Merge Dialog box I no longer see the list off all the fi

  • Issues with a disappearing stroke.

    Anyone else ever have this problem? The stroke does "highlight" if i draw a marquee around it so in theory, it still "exists" Transparency... set to 100 percent black. stroke fill color.. on stroke width... 1-2 pts layer...topmost layer What could be

  • SRM CONFIG Guide 5.0

    Hi, Can any one please send me SRM config guide 5.0 to following id : [email protected]. Points will be rewarded . Regards Arvind

  • Some Applications won't launch in RDP

    I am using RDP to get into some Hyper-V VMs.  Most applications launch no problem but I have a few similar ones that will launch local on the server through the VM Connector but when I use RDP they won't launch.