Retrieve data from normal java classes business components

I created a utility project that uses BC ADF for my model. One of the things I have to do is to create a function that queries the database.

For example, I want to get the translation of a legend based on certain parameters. So I continued to function:
translate (form of a string, string lang, String caption)

I created a VO that contains all links and tables necessary for this. There are also 3 bind variables for the shape, lang and legend.
When I test this in my appModule and enter the bindvariable in the pop-up window, I get the data requested for the VO works very well.

The only thing I do now is to create the code for my job to translate. What I do is run the VO and return the value of a specific column of the VO.
Does anyone has code examples to achieve this?

Yannick,

Take a look at [url http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcquerying.htm#CHDECJHD] example 5-24

The documentation is great. The documentation is good. Thank us for examples. ;)

John

Tags: Java

Similar Questions

  • create the http client to retrieve data from web service

    Hello

    I am newbie on our webworks. I need to retrieve data from web service. How to connect to this service and analyzed. There is a tutorial that can help me get started with it.

    Can any one advice me how can I start working with webworks on blackberry 10

    Thanks for any help

    In general, you will need to use an AJAX call to the server

    It really depends on what the server returns as to how the information is easy to digest

    JQuery provides a simple interface, and returns information easy to use

    If you deal with things gets complicated XML according to namespace

    If you look at the raw XML data and it goes something like fred: name you will have questions requiring an implementation of SAX - JSON is simple if you don't get that even if (nothing too confusing here)

    If using an external data source JSON go if you have the choice

    As examples go - just look to the top of JQuery Ajax [JSON / XML] and you will get where you're going quickly

    SAX is MUCH harder because of the namespace - Dublin is the most common and same XML without namespace is not simple to handle, so avoid it if you can

  • to retrieve data from xml data type

    Hello...
    I have a doubt in the oracle database... Here's how to retrieve data from xml data type?

    Like this...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select xmltype('
      2  
    3 4 toMonth5 5 ctTestPan1 6 costType2 7 toYear2012 8 fromMonth12 9 fromYear2011 10 11
    ') as xml from dual) 12 -- 13 -- end of sample XMLDATA, use below query on your own table etc. as required 14 -- 15 select x.* 16 from t 17 ,xmltable('/DETAILS/FIELDS_VALUES/FIELD' 18 passing t.xml 19 columns name varchar2(30) path './NAME' 20 ,val varchar2(10) path './VALUE' 21* ) x SQL> / NAME VAL ------------------------------ ---------- toMonth 5 ctTestPan 1 costType 2 toYear 2012 fromMonth 12 fromYear 2011 6 rows selected.
  • With the help of the socket object to retrieve data from web application without the html files

    I tried to use the socket object to retrieve data from a web application (I just control script version vs version online). So all I want to do is access http://hyle.io/version that returns me the current version of the application (such as a simple string) in order to compare it in my script and then notifies the user accordingly. I have just a few problems using the socket object. I used this code from the Adobe Javascript Tools Guide:


    reply = "";
    conn = new Socket;
    // access Adobe’s home page
    if (conn.open ("www.adobe.com:80")) {
    // send a HTTP GET request
    conn.write ("GET /index.html HTTP/1.0\n\n");
    // and read the server’s reply
    reply = conn.read(999999);
    conn.close();
    }
    

    ... that I then adapted as:

    reply = "";
    conn = new Socket;
    if (conn.open ("hyle.io:80")) {
      conn.write ("GET /version HTTP/1.0\n\n");
      reply = conn.read(999999); 
      conn.close();
    }
    

    And here is what I get:

    HTTP/1.1 400 Bad Request
    Content-Length: 225
    Content-Type: text/html
    Server: Pagodabox-Routing-Mesh
    
    

    Bad Request

    Your browser sent a request that this server could not understand.

    Résultat : true

    I don't know a lot about HTTP requests, but I wondered if it was related to the fact that I am not pointing to a specific HTML file and the type of request was wrong or if I should rather check if there is something wrong with my host?

    The site/app is PHP and is hosted on PagodaBox if it helps.

    Thanks in advance!

    Hi Sebastien Lavoie,

    It should work

    var HTTPFile = function (url, port) {}

    If (arguments.length == 1) {}

    URL = arguments [0];

    port = 80;

    };

    This.url = url;

    This.port = port;

    this.httpPrefix = this.url.match(/http:\/\//);

    This.Domain = this.httpPrefix is nothing? This.URL.Split("/") [0] + ":" + this.port: this .url .split ("/") [2] +":" + this.port;

    This.Call = ' GET ' + (this.httpPrefix == null? ' "). " http://" (+ this.url: this.url) + "HTTP/1.0\r\nHost: ' + (this.httpPrefix is nothing? "This.URL.Split("/ ") [0]: this .url .split (" / ") [2]) +" \r\nConnection: close\r\n\r\n ";

    This.Reply = new String();

    This.Conn = new Socket();

    This.Conn.Encoding = "binary";

    HTTPFile.prototype.getFile = {function (f)}

    var typeMatch = this.url.match(/(\.) (\w{3,4}\b)/g);

    If (this.conn.open (this.domain, "binary")) {}

    This.Conn.Write (this.) Call);

    This.Reply = this.conn.read (9999999999);

    This.Conn.Close ();

    } else {}

    This.Reply = "";

    }

    (Return this.reply.substr(this.reply.indexOf("\r\n\r\n")+4);

    };

    }

    Hyle var = new HTTPFile ("http://hyle.io/version");

    Alert (hyle. GetFile());

    And by the way, I like the idea of 'http://hyle.io'. Can you give me your email address, I want to learn more about this Web site.

    Please send me an email to [email protected]

  • retrieve data from staging account

    Hello

    does anyone know how we can retrieve data from staging of account using 'Segmentation Wizard', "report analysis tool", model of fusion and mailing, etc.?

    Seems that these tools connect only to the production instance...

    Thanks, Sab

    SAB,

    for segmentation Wizard (and perhaps other office files), you will have to go file - properties - Custom and update the values for the name of pod, if you have a job you know what value it is as I am not "have a practice to watch.

    see you soon
    Alex

  • Retrieve data from AddressBook for Webworks Smartphone

    Hi all
    I want to implement the address book API. Where can I get/retrieve data (phone number, address of E-mail etc) for my Application project.
    Is it possible to invoke the address book to recover data?

    I go through this link, but it did not help me https://developer.blackberry.com/html5/apis/blackberry.invoke.addressbookarguments.html#view

    I have searched several times but could not get a code to make it possible.
    Please help me if someone know the solution or have any sample code.

    Thank you best regards &,.
    Castillo

    Its seems quite surprising that no member of this forum suggests even a single code related to this problem...

    However, I still have more research and find the alternative.

    var contactResult = new Array();
    
    var Fname = new blackberry.find.FilterExpression("firstName", "!=", "");
    
        contactResult = blackberry.pim.Contact.find(Fname);
        for ( var i = 0; i < contactResult.length; i++) {
            var totalName = contactResult[i].title+ " "+ contactResult[i].firstName+ " "+ contactResult[i].lastName;
            }
    

    This will retrieve all data or contacts from the address book. For which I have to do a custom address book.

  • Pushing data from a Java application * confused *.

    Hello community,

    I'm new to the BlackBerry Push. I tried to understand what options are available to provide data to a Java application and how it can be tested.

    There are so many documents on this subject, for example:

    1. Push for the BlackBerry Enterprise Server software
    2. BlackBerry Push service
    3. Push blackBerry SDK service

    What I discovered thanks to these documents.

    1. There are two formats that can be used to send data through the BES (PAP push / push RIM)
    2. BlackBerry Push service has two levels (BB push Essentials / BB push more - limited to 8 KB content)
    3. In the Push Service SDK, there are two modes available (public and business mode)

    For me, these information are really confusing.

    What I don't understand:

    I. can the software of the BlackBerry Push Service SDK be used for both options 1. & 2. mentioned above? (referring to public and business mode)

    II. is there documentation how to push Service SDK can be configured for the mode of the company?

    III. when you use BES Push is also limited to 8 KB content size?

    IV. is it possible to only a single client application that can be used to BES and BIS push?

    Thanks in advance.

    I. the SDK can be used to push either a BIS or BES. The SDK has a setting to determine if its pressure through the (public) BIS or BES (company). The SDK can be used to push push Essentials or Plush Push. The SDK software uses the API of PAP.

    II. I'm not sure of the documentation, but I don't know that the SDK can ask a BES for sure. But in the end, you need to set the PushSDK.properties flag to push public were false.

    III. no the BES is not a limitation of 8 k.

    IV. I'm not an expert on client applications, but I think you need to develop a version for BIS and a version for BES.

  • Retrieve data from GenericType

    Hello

    I jdev 12.1.3, I use the following code in the java class to run the web service data and get the data, copy the following code return result to the parameter result GenericType object, I show the result in the form of attributes data and web service successful, now I need to get this information and but he parameter string, how do I do this?

            GenericType result = null;
            try
            {
                result = (GenericType) AdfmfJavaUtilities.invokeDataControlMethod("SOA_ProcessAfterLogin", null, "process", pnames, params, ptypes);
    
            }catch(AdfInvocationException ex) {
                   // If the web service is not available throw a nice exception
                    if(AdfInvocationException.CATEGORY_WEBSERVICE.compareTo(ex.getErrorCategory()) == 0) {
                       throw new RuntimeException("Error with the server.  Please try later.");
                    }
            } 
    

    The link you have given, pay attention to the

  • [Urgent] Retrieve data from oracle datafile partially crushed

    We have a big problem, we stopped in a backup/restore process from production to the test database because we found that some development SP/package code was not saved previous test DB. Now we have partially crushed oracle datafile and I guess that / hope the compiled code was stored in the last section of the data file, there is a way to retrieve the data from this data file? I intend to use an editor of exadcimal as a last resource, hoping that the data was not encrypted, but if there is another useful tool could be better. There are other storage media like newspapers/redo logs reach where we can try to find the lost code? The machine was not under a protocol of backup, so we can't count on that.

    Help, please

    Fabrizio

    MS code is stored in the dictionary (System tablespace), if you were restoring with RMAN, is the last file to restore.

    Good luck!
    : p

  • Which service API should I use to retrieve data from Eloqua 'Integration of the internal queue'?

    In my Eloqua Sandbox environment, I managed to create several "external Test calls complete" that appear on the tab 'Reports of the integration of queue internally'. Can someone tell me what Eloqua API or services are required to recover the data of this "Internal queue" Eloqua? I guess that's the way to connect the dots of data updates occurring in Eloqua to an external system. My ultimate goal is personalized with a non-native CRM integration.

    Thank you

    Heath

    Hi Heath,

    The post following (How to recover data from activity through the API) describes how to extract data from the queue inside.

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

    Thank you

    Fred

  • SQL to retrieve data from the day before

    Hello

    I am asked to collect intelligence data and generate a daily report to determine the success rate (to do daily data that determines success rate). I have a session_time of column (with the DATE data type) that I try to do the job. I've been using:

    Select * from ABC

    where session_time > = TRUNC (SYSDATE - 2)

    Gives me data, but I get the data from 26/10/14 and 10/28/14 so when I only need data on 27-10-14 (as of the day 28/10/14). I tried a few variations and did not get the expected result. Could someone please help me understand this? Time is also displayed in my outings, maybe I shouldn't include the time?

    I use: TOAD for Oracle 11.5.1.2.

    Oracle Database 11g Enterprose 11.2.0.1.0 Edition

    Thank you in advance.

    Hello

    2632048 wrote:

    Hello

    I am asked to collect intelligence data and generate a daily report to determine the success rate (to do daily data that determines success rate). I have a session_time of column (with the DATE data type) that I try to do the job. I've been using:

    Select * from ABC

    where session_time > = TRUNC (SYSDATE - 2)

    Gives me data, but I get the data from 26/10/14 and 10/28/14 so when I only need data on 27-10-14 (as of the day 28/10/14). I tried a few variations and did not get the expected result. Could someone please help me understand this? Time is also displayed in my outings, maybe I shouldn't include the time?

    I use: TOAD for Oracle 11.5.1.2.

    Oracle Database 11g Enterprose 11.2.0.1.0 Edition

    Thank you in advance.

    Use:

    SELECT *.

    ABC

    WHERE session_time > = TRUNC (SYSDATE) - 1

    AND session_time<  trunc="">

    ;

    It's 09:15 on October 28, 2014, then TRUNC (SYSDATE - 2) is 00:00:00 October 26; The query you posted became data of October 26 and later.  (You may not all future dates in your table.)

    If it's 09:15 October 28, then TRUNC (SYSDATE) is 00:00:00 October 28 (i.e., midnight, at the beginning of October 28) and TRUNC (SYSDATE) - 1 is 00:00:00 October 27.

    Do not be tempted to use

    WHEN TRUNC (session_time) = TRUNC (SYSDATE) - 1 * INEFFECTIVE!  ***

    It will get the same results, but it is slower, you cannot use an index on session_time and requires a call to separate function for each row in the table, it is selected or not.

  • retrieve data from webcenter content to ADF

    Hi all

    I want to recover data from webcenter content to pages in the adf. How can I do?

    Well, you can use RIDC API for this.that is best suited

    see this

    http://www.techartifact.com/blogs/2013/05/How-to-connect-with-UCM-in-ADF-using-RIDC-API.html

    Oracle Fusion Middleware Flavius Búrca Blog: integration Oracle UCM 11 g RIDC WebCenter/ADF 11 g

  • How to pass values from a Java class to a class of JavaFX?

    Hi Forum,
    I get nuts on this problem:
    I designed a program with Java and JavaFX classes. JavaFX classes handle the GUI and Java classes mix program logic. I think that's the way it is supposed to be. My program calculates something, so in my JavaFX GUI, I have a button to run this calculation. It's not a problem to call the start function calculation (which is in my Java class) on click of a button. But now I want to display the result of this calculation in my GUI. I can't just simply pass the result to my class of JavaFX GUI. I tried to import the JavaFX class in my Java class to call a set function, but I can't import them with the import statement. So my question is, how do I make the results to my GUI? What is the right way to do it?
    I hope someone can help, thanks in advance :)

    Two ways, either:

    -your JavaFX class asks the Java class for the result once the task completed in exactly the same way he instantiated to start the task. Of course, you should regularly check the completion of the task (a mere PauseTransition).

    - or your JavaFX class implements a Java INTERFACE and your Java class accepts (whether through the method or constructor) a variable of type of this interface. For example, you can set a reference to the subject of JavaFX itself in the Java object using the interface.
    When the task is completed, your Java class calls a method defined in the INTERFACE to set the result in the object of JavaFX.

    In addition, JavaFX 1.3.x provides an API to start asynchronous and be notified when a task is completed in the javafx.async package that allows you to run the task of basic Java (you mind that the class is named...) JavaTaskBase, see also the RunnableFutre interface) in a separate thread.

  • Help me with SQL Query to retrieve data from a view

    Hello Guru,

    I need help in my sql query.
    I use SQL TeraData.
    I want an Oracle result in the following form-

    Open tickets
    Open months failure / Repair Service s/o improvement request Total general
    2009-01-2 4 4 5 15
    2009-02 1 0 2 3 6
    2009-03 4 1 2 2 9
    Grand Total 7 5 8 10 30


    I wrote the query as where - TIME_PERIOD, RQST_TYPE_DM and DEMAND_SUMMARY_FCT are the points of view and I extract the data from the views only.

    Select NVL (CA. TIME_PERIOD. PERIOD_CD, 'Total') THAT year.
    COUNT (CASE WHEN CA. RQST_TYPE_DM. RQSTTYP_DESC Like '% of Break' THEN 1 END) as BreakFix
    COUNT (CASE WHEN CA. RQST_TYPE_DM. RQSTTYP_DESC as 'N/a', 1 END) by n/a
    COUNT (CASE WHEN CA. RQST_TYPE_DM. RQSTTYP_DESC as 'Improvement' THEN 1 END) accessories
    COUNT (CASE WHEN CA. RQST_TYPE_DM. RQSTTYP_DESC Like '% Service' THEN 1 END) as ServiceRequests
    COUNT (CA. RQST_TYPE_DM. RQSTTYP_DESC) AS grand_total
    FROM CA. TIME_PERIOD, CA. RQST_TYPE_DM, CA. DEMAND_SUMMARY_FCT
    WHERE (CA. DEMAND_SUMMARY_FCT. RQSTTYP_ID = CA. RQST_TYPE_DM. RQSTTYP_ID)
    AND (CASE
    WHEN CA. DEMAND_SUMMARY_FCT. MONTH_ID = CA. TIME_PERIOD. PERIOD_ID, 1
    WHEN {fn concat ({fn concat (SUBSTR (CA. TIME_PERIOD. {(PERIOD_CD, 3, 4),'-')}, SUBSTR (CA. TIME_PERIOD. PERIOD_CD, 7, 2))} BETWEEN ' 2009-01' AND ' 2009-03' THEN 1
    WHEN CA. DEMAND_SUMMARY_FCT. RQSTTYP_ID = '1' then 1
    END) = 1
    GROUP BY ROLLUP (CA. TIME_PERIOD. PERIOD_CD)

    After executing the query, I get the following error:
    3076: syntax Error: Data Type 'Time' does not match a defined Type name.
    :( Kindly help me with this and let me know where I'm wrong... Please.

    Messages indicates something wrong with your data... It would seem that the data does not match your format mask.

    Thus, the data or the format mask.

  • Retrieve data from similar columns

    With the help of Oracle 10 g, SQL Developer v1.5
    I have a table with 200 columns.
    I'm trying to get the data from all columns ending with "_DT".

    I got the list of columns but impossible to incorporate into the SELECT stmt.
    SELECT column_name FROM user_tab_columns
    WHERE table_name = 'XXX_STG_INST_DEBT'
    AND column_name LIKE '%_DT';
    How can this be achieved?

    Thank you.

    Try the following pl/sql

    serverout Set size 1000000
    declare
    ALL OTHERS INTEGER;
    ignore the number;
    cursor c is
    Select column_name
    of user_tab_columns
    where column_name like '% _DT '.
    and table_name = "XXX_STG_INST_DEBT";
    SQLSTR varchar2 (20000): = "CREATE VIEW APPOVIEW_FORUM AS SELECT ';
    Start
    for r in c loop
    sqlstr: = sqlstr. r.column_name | «, » ;
    end loop;
    sqlstr: = rtrim (sqlstr, ','). ' FROM XXX_STG_INST_DEBT';

    dbms_output.put_line ('Executing' | sqlstr);

    CURSOR_NAME: = DBMS_SQL. OPEN_CURSOR;
    DBMS_SQL. PARSE (all other cases, SQLSTR, DBMS_SQL.native);
    ignore: = DBMS_SQL. EXECUTE (CURSOR_NAME);
    DBMS_SQL. CLOSE_CURSOR (CURSOR_NAME);
    end;
    /

    Select * from appoview_forum;

    Drop view appoview_forum;

    Max

Maybe you are looking for