How I can create dynamically-formed requests or use native SQL in EJB?

Hi all.
I'm working around modify an example from NetWeaver Developer Studio (CarRental). I want to get ordered data from table and allow users to specify the ordering field, not in the code. EJB QL doesn't support dynamically-formed queries like "select object(b) from QuickBooking b where b.status like ?1 order by b.<b>?2</b>" so i can't passing field name as parameter into query. Creating a sorting method for every field is not good solution because I need a dynamically-formed requests.
I think using native SQL will help but I don't know how I can use SQL in EJB.
Thanks,
Lev

import javax.persistence.EntityManager;within class, place
protected EntityManager  entityManager;of course make it public, private, whatever you need.
Then, in your method
entityManager.createNativeQuery(....);R. Grimes

Similar Messages

  • Can't dynamically bind Request var to ViewObjectLink SQL (for BIBean Graph)

    Can anybody pleaaaase help? I'm trying to get a graph done with JSP and a BI Bean. I have got the graph working just fine, based on an unfiltered query of the ViewObjectLink. However, have not been able to figure out how to dynamically add and alter the criteria of the underlying ViewObjectLink query.
    My research has found numerous references to the setWhereClause() and setWhereClauseParam() functions. I've placed setWhereClause() and setWhereClauseParam() calls in the constructor of the ViewObjectLink. But I always get exceptions :
    JBO-30003: The application pool (test_16.AppModuleLocal) failed to checkout an application module due to the following exception:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=
    JBO-29000: Unexpected exception caught:
    oracle.jbo.InvalidObjAccessException, msg=
    JBO-25036: An invalid object operation was invoked on type View Object with name FaVGetDueDatePcCtab2ViewImpl_120
    Any and all help appreciated.
    Thanks in advance,
    John.

    Thanks Keith.
    It's a question of how one sets and accesses the query datasource of the ViewObject which underlies and populates a BIBeans graph.
    I don't see how one binds criteria value(s) to the parameter placeholder(s) in the ViewObject object.
    For example, the Query property of my ViewObject is:
    SELECT FaVGetDueDatePcCtab2.PC0,
    FaVGetDueDatePcCtab2.PC1,
    FaVGetDueDatePcCtab2.PC2
    FROM FA$V$GET$DUE$DATE$PC$CTAB2 FaVGetDueDatePcCtab2
    The Where Clause propery is:
    WHERE FaVGetDueDatePcCtab2.PC2 IN (?, ?, ?)
    What wizard or method or means is used to bind the '?' placeholders with actual values?
    Or do you think this is more a question for the Forms/Reports forum?

  • How to creater dynamic form in Acrobat 9

    Can I make a form that will dynamically add pages (with header and footer) when needed in Adobe Acrobat 9 and if so where is the best documentation on how to do this?

    You can dynamically add pages using templates. This requires some relatively simple JavaScript programming. It will work in Acrobat (Pro or Standard) and Reader 11 (Win/mac), but not previous versions of Reader. Here are some links to the Acrobat javaScript reference:
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_Dev_Templates.80.1.html
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_Dev_Templates.80.2.html
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.1216.html
    If you don't get a two-paned window with the navigation pane on the left, click "Show Navigation" icon in the upper-left.
    If it has to work with previous versions for Reader, Acrobat 9 Pro for Windows comes with the LiveCycle Designer application. With it you can create dynamic XFA forms that can work with Reader.

  • How do I create simple form with issue result request

    How do I create the form, on which took seats GRID with result of the request from table Oracle. I do not use iAS.

    Thank you for this George, however a couple of sticking points.  When I copied and pasted the code over to my file it didn't work, even when I pointed the code to my combo and checked all settings and properties of the other objects.  The unusual thing was that I had to copy all the boxes over from your file with the script and it worked, it even hid and revealled my original objects which I wanted.  I then called the code from my original combo and deleted the one I had copied from your file and all was OK
    The second thing is that when I try and edit the combo box, I can only move between one or two of the options set in the box, although I can see all the other options, I cannot select them the cusor simply jumps to the top options.  I had to delete all the options and retype them all in assigning the 0,a,b,c, etc. Although this works, when I go to edit, it still only allows me to select up to the first four in the edit, but the form appears to be working fine.   Is there a special order which i need to folow, can I have labels in the combo with spaces e.g. "family appointment"?
    And finally, I added some background colours to the section_a_backgrounds (b,c,d) also, but these do not work, even though the text copies across into the section_background.  I'm confused with all these issues, should it not have worked as it was???
    I am using acrobat X pro, does this make a difference?

  • How do i create a form in live cycle E4 that i can save as a PDF that the user cannot save over?

    How do i create a form in live cycle E4 that i can save as a PDF that the user cannot save over?

    You can't. If the file is made read-only via the file system, the user will prompted to save as a new file if they attempt to save.

  • Creating dynamic form data with SetValue QPAC

    I'm creating form data in a workflow process, and using it to populate a dynamic XDP with a subform.  In my test form, the subform is named "Item", with a text field named "ItemData".  Initially, I can create the form field via the SetValue QPAC and using these parameters;
    location: /process_data/form/form-data/data/xdp/datasets/data/fields/Item/ItemData
    value: "first"
    However, I need to add multiple instances of the Item subform.  For example, if I fill out the test form with 3 items and export the data to XML, the data structure comes out like this:
    first
    second
    third
    So, the question is, how do I use the SetValue QPAC to create multiple instances of the items? I've tried various locations;
    /process_data/form/form-data/data/xdp/datasets/data/fields/Item.x/ItemData
    /process_data/form/form-data/data/xdp/datasets/data/fields/Item[x]/ItemData
    /process_data/form/form-data/data/xdp/datasets/data/fields/Item/ItemData.x
    but none of them seem to work.  I know I'm probably just missing something simple.  Anybody care to fill me in on the obvious?

    Hi Clifton
    Looking back on this thread, I think you're saying that the data is eventually going to come from a MySQL database.
    In that case, our SQLPlus QPAC will do the job perfectly.
    You just specify the query, specify the repeating element:
    /process_data/form/form-data/data/xdp/datasets/data/fields/Item
    and then map columns in the result set to sub-element of the Item.
    eg mycolumn -> ItemData
    The SQLPlus qpac will create all the repeating items for you.
    Does this work for you?
    If not, please specify what you'd like to see.
    A couple of options are:
    - A setValue qpac that correctly inserts for expressions like: process_data/form/form-data/data/xdp/datasets/data/fields/Item[2] (probably difficult to do)
    - An InsertSequence qpac that takes a repeating element and a count as an input, and creates that many repeating elements. You could then refer to them using the regular SetValue qpac. (Probably easier to do.)
    - Something else. Go wild :-)
    Howard

  • How I can create a XML file from java Aplication

    How I can create a XML file from java Aplication
    whith have a the following structure
    <users>
    <user>
    <login>anyName</login>     
    <password>xxxx</password>
    </user>
    </users>
    the password label must be encripted
    accept any suggestion

    Let us assume you have all the data from the jsp form in an java bean object..
    Now you want a xml file. This can be acheived in 2 ways
    1. Write it into a file using java.io classes. Say you have a class with name
    write("<name>"+obj.getName+</name>);
    bingo you have a flat file with the xml
    2. Use data binding to do the trick
    will recommend JiBx and Castor for the 2nd option
    Regards,
    Rajagopal

  • Does anyone know how I can create a text field in a pdf document that will multiply a total in another box?

    does anyone know how I can create a text field in a pdf document that will multiply a total in another box? I’m making an interactive pdf for an order form (attached), and I need to find a way for the “total quantity” number to multiply by 9 and total in the “Amount Due” box.

    Hey Gary,
    Have a look at this post: Re: horizontal scrolling similar to excel
    Andy's reply will show you how to make a table scroll horizontally, but it will be tough to accomplish it in some sort of easily replicable way. I am working on a JQuery extension that will help accomplish this, but I have had my time invested in another project at the moment.
    Good Luck,
    Tyson

  • How Do I create Windows Form file in VS and add the form to my VS project?

    C#, How Do I create Windows Form file in VS and add the form file to my VS project by using C# code?
    I like to create a Windows Form file into my VS Win Form project by using C#. I have the path and the file name.
    I need a Win Form with FileName.cs, FileName.Designer.cs, FileName.resx, and FileName (as you see it VS by adding a Win Form manually by using VS)
    Rune Brattas

    You cannot create a Form from code at run time. 
    For one thing, the user running your application will, almost certainly, not have  a copy of Visual Studio to hand with which to build anything.  (Not that you actually need 'Studio at all; Notepad and csc.exe are all you actually
    need), but that's another story).
    You can do this with an awful lot of pain, using the innards of the compiler from iside your own program, compiling the new Form's source code on the fly and then executing the resulting assembly within your application.  IMHO, that's a simply terrifying
    prospect especially as the code you will be compiling will be on someone else's machine and over which you will have absolutely no control.  If you're lucky, they'll spell something wrong and it won't compile.
    The "usual" way to do this sort of thing is to create additional, "plug-in" forms as library assemblies and have your program load and execute these at run-time. 
    Regards, Phill W.

  • How do i create a form setup in landscape?

    How do I create a form set in landscape?

    OK - let me ask you first, how are you delivering your form to others to fill out, are you using the URL so that they fill out the Web/HTML form?  Or are you downloading a PDF of the form that you email to people to fill out?
    I think you are likely using the URL (Web Form on the Distribute tab), in which case you want to set the "Form Width" to something wider than 700, that setting controls the width of the form in a web browser.  That controls the width so you can get more of a landscape appearance, you would also add "Page Breaks" where you would want the pages to end so they look the way you want them to.
    If you are using PDF let me know and I will share additional info.  The "PDF paper size/orientation" settings in form setup are for the PDF only and you won't see those changes in a web form.
    I hope that was clearer but am happy to try again;-)
    Thanks,
    Josh

  • Nested Skip Logic: How do I create a form where when a top-level option has changed, that its related sub-fields will retract (disappear)?

    How do I create a form where when a top-level option has changed, that its related sub-fields will retract (disappear)?
    (This question was asked also in 2012 and 2013, but no answer has been provided.)
    THANKS
    Deborah

    Hi qwerty,
    Dun tink that creative customer support sucks cos I had been dealing with them in the past and I can say that their service are quite gd and fast. If you wanted a refund, I tink you need to contact the store that sells you the product. Dun tink creative will refund you though.

  • ATG 10.1 How we can create user segment programitically

    Hi,
    I want to create user segment programitically, not through BCC.
    Rule for the segment I will be getting from some third party. I have to create rule for my segment programitically and assign the user segment to a profile group.
    I checked the user properties and got to know as for every profile user segments will be assigned as a dynamic property.
    How I can create the same programitically after getting the rule from third party.
    Thanks in advance
    Agil

    >Why (no body) help me?.
    >Is my question not clear?
    Yes, your question is not clear.
    >
    http://www.libyabuild.com/news1.htm
    Is that one of the pages on your site? Do you just want to
    add a feature that searches your site for relevant content? If so,
    check out
    http://www.wrensoft.com/zoom/support/dreamweaver.html
    So I don't understand why you are asking about a database -
    are you trying generate results that link to other sites?

  • How can I create an csv/excel file using pl/sql and then sending that file

    How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
    I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.

    968776 wrote:
    How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
    I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.You are trying to do it at a wrong place..
    Whay do you want database (pl/sql) code to do these things?
    Anyhow, you may be interested in :
    {message:id=9360007}
    {message:id=9984244}

  • I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    Here's a quick example I threw together that generates a sort-of-bell-curve shaped data distribution, then performs the binning and plotting.
    -Kevin P.
    Message Edited by Kevin Price on 12-01-2006 02:42 PM
    Attachments:
    Binning example.vi ‏51 KB
    Binning example.png ‏12 KB

  • How i can open the form in Internet Explorer

    Dears.
    I am using Developer 6i and Oracle8. I want to learn how i can execute my form in IE. Please teach me about that how i can be able to execute my form in IE.
    waiting for reply
    Zaheer

    Forms 6i can be web deployed, if you noticed there's a red button under the run button in forms builder, which says "Run form in web" this will open your form in a browser.
    But if you want to run production application in a browser then you need to have OAS (Oracle Application Server)
    As for 9i and above they can only be run in web, you either need Application Server with the compatible version or OC4J for testing.
    Tony
    PS: Do not duplicate your post
    Want to open the forms in internet explorer

Maybe you are looking for

  • Receiving errors trying to run adpatch after a clone from production.

    applprod@oracle-dev4#>adpatch exec(): 0509-036 Cannot load program /prod/prodappl/ad/11.5.0/bin/adpatchnew because of the following errors: rtld: 0712-001 Symbol __pth_init was referenced from module adpatchnew(), but a runtime definition of the symb

  • How do I get all 'exclamation point' songs to show at the same time?

    Please help! I need to delete TONS of broken tracks... they have all been reimported, but the same old tracks with the exclamation points remain in my library! What's even worse is you have to click on each individual track, just to get them to show

  • Error when using LOV on date-field (qms0012F)

    We are using QMS0012F.fmb (Headstart Template Package 6.5) to launch all our reports. However, when a date-parameter is defined as the last field in this form and when you select a date using the LOV (windows-calendar), an error appears: 'FRM- 41051,

  • New Object Types for Object Links

    Need to create new Object type to object link Product hierarchy from ECC to RPM Item. Field is PRDHA. Do we need to create new structure to have the Key linking PRDHA. Any suggestions?

  • Fast time of day clock

    My time of day clock gains several minutes per day. It is set for automatic update but does so only when I bring up the preference. The computer is on nearly all the time so a dead battery doesn't seem likely. This topic was mentioned some time ago i