EJB 3.0 / how to define more than one @QueryNamed for an entity

I check the ejb 3.0 spec, the help and others but i didn't find the syntax that permit to determine more than one QueryNamed in an entity.
Does somebode how to do and where it is described in the documentation ?

This is exactly i have done also but i got an error during compilation
C:\oracle\product\jdeveloper10g_3565\jdev\mywork\HRApp\EJB_Project\EJB_Project\src\buslogic\Departments.java
Error(20,124): ) expected
@Entity
@NamedQueries(
@NamedQuery(name="findDepartments", queryString="select object(o) from Departments o where o.department_id = :dept_id"),
@NamedQuery(name="findAllDepartments", queryString="select object(o) from Departments o")
@Table(name="DEPARTMENTS")
public class Departments implements Serializable {
private Long departmentId;
private String departmentName;
private Long locationId;
private Collection<Employees> employeesCollection;
private Employees employees;

Similar Messages

  • How to pass more than one value for one column in procedure

    hi
    select id, name from col_tab where dept_name in ('ECE','CIVIL');
    when i was running this it is working well.
    CREATE OR REPLACE PACKAGE pack_str
    AS
    TYPE type_refcur IS REF CURSOR;
    PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur);
    END pack_str;
    CREATE OR REPLACE PACKAGE BODY pack_str
    AS
    PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur)
    IS
    BEGIN
    OPEN ans FOR
    select id,name from col_tab where dept_name in char_in ;
    END str;
    END pack_str;
    the package was created.
    my doubt is
    1.how to pass more than one value for char_in (e.g ('ECE','CIVIL'))
    2. when i was storing the value in string like val = 'ECE,CIVIL' ,
    how to get the id,name for ECE and CIVIL.
    plz help me

    Hi Rebekh ,
    I am recreating your packages for the desired output.
    CREATE OR REPLACE PACKAGE pack_str
    AS
         TYPE type_refcur IS REF CURSOR;
         PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur);
    END pack_str;
    CREATE OR REPLACE PACKAGE BODY pack_str
    AS
         PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur)
         IS
              lv_t varchar2(200);
         BEGIN
              lv_t := REPLACE(char_in,',',''',''');
              lv_t := 'select id,name from col_tab where dept_name in (''' || lv_t || ''')' ;
              OPEN ans FOR lv_t;
         END str;
    END pack_str;
    Note:-
    Input Parameter char_in is a comma seperated value for dept_name
    -Debamalya

  • How to prevent more than one login for the same username

    I am trying to create a centralized login/logout for my J2EE application, i.e application level security in order to keep track of the users that login and logout to/from application. I need that in order to know which users have logged out before their sessions expire. Is there an easier way (possibly on the server level) to accomplish this.

    How is your centralized authentication service hooked up, through a custom realm?
    Unfortunately there is no notification mechanism of logout events currently. Partly due to the fact that while the a logout is sometimes explicit (session invalidated or expired) it is also at times implicit (if there is no session, the logged in user silently disappears at the end of a request).
    P.S. If you're only looking to keep track of login and access events (and not modify the behavior), the audit logging provides this information directly.

  • How to create more than one window for a vi that can be acces anytime...just like using the creating new window in internet explorer

    hello guys,
    I want to create a vi such dat when I press a button on the frontpanel of the vi it opens the same vi in another window..and I should be able to work on this new window also able to work on the previous window without closing it...Just like opening a new window when using the internet explorer....
    I try to make my vi a reetrant vi but when I click the new window button on my vi..a new clone windows open up that I can control but the previous windows is not accessible not I close the current window...I want a way that I can acces both vi window and d operation of one will not affect the other like when the indicators are updating in one window the other window will not update...
    Thank you...
    Solved!
    Go to Solution.

    The picture attached shows what i want to achieve as a vi or executable...The new window button opens a clone of the vi, but the previous window can not be operated on until i close the clone window...i want to be able to work on both window at any time without closing one of them....The vi was design in labview 2010
    Attachments:
    ni.jpg ‏66 KB
    window vi.vi ‏8 KB

  • More than one style for a single link state?

    RH 8 outputting CHM
    Hello,
    Is it possible to define more than one style for a single link state?
    For example, I would like a link in the footer of my master page to be smaller than the links that appear in the body of my topics. I want to retain behavior, and simply change the point size.
    I can't simply hand format in Design mode, because my link is within a script. Or, am I missing something easy here?
    Thanks much.

    I'm pleased to say I figured out how to change the formatting of a hyperlink embedded within a script.
    Within the script, I used a var string to reproduce the text in my link. Then I used another var to change the string size.
    So, here's the part of my script that produces what I'm after:
    var mailDisplay = 'Was this information helpful? ';
    var str = 'Was this information helpful?';
    var mailDisplay = str.fontsize("1");
    Upon generation of the CHM, the script trumps the CSS. It's a beautiful thing.

  • More than one DataSource for CMP

    Hi everyone,
    is it possible to define more than one DataSource for CMP?
    Best regards,
    Ira

    Hi all,
    is it possible to specify more than one DataSource
    for CMP? No, but you can try to deploy you'r CMP beans twice. One EJB module per each database.

  • Can i create more than one instance for single database?

    HI
    anybody can tell me how to create more than one instance for single database(without using RAC)?
    thanks
    Kalanidhi

    Anandji,
    I sometimes think differently. I also think like what this person is asking..(although I have installed and administering 5 different RAC databases)
    The main doubt of mine is that we create multiple instances accessing the same storage area.
    Anyway the controlfiles of all instances will have the same information except the instance_names and instance id's.
    Hence I always think , why can't it be possible to to create another instance in the same system and point it to a controlfile which is copied from the other instance.
    Why can't the same files be shared between the two instances in a same system ?
    I know I am thinking a little bit confusing...
    Anyway I need to test that also...
    Mahesh.

  • How to start more than one program automatica​lly? [RT]

    Normally you can build an application and let it start automatically on the PXI system. You have to put the file into c:\ni-rt\startup\
    But how to start more than one application in a pre-defined sequence? Depending on the situation there are several programs to be started that run simultaneously.
    I searched for help in the Development Library and the Forums but I didn't find an answer.
    Thank you very much for your helpin advance! Have a nice day!
    Christoph

    Hi Christoph,
    You can use VI Server on the real-time target to launch other VIs dynamically. Your startup executable could be a simple application that uses VI Server to start other VIs that run in parallel in a pre-defined sequence.
    Here's an example that does something similiar.
    Note that when you build the VI into an application, you must include all the VIs that are called by VI Server as dynamic VIs in the application builder.
    -Gerardo

  • How to show more than one record at a form-like style report?

    Hi All,
    I developed a form-like style report
    I want it to show more than one record at once (At the same page)
    I tried that by setting the value to "Maximum records per page" property for the repeating frame to 10
    but when I close the property palete and open it agian the value is returned to 1 !!!
    how to show more than one record at the same page?????
    Thank u

    Hi,
    there's perhaps another property like "page protect". If than 2 records didn't fit at one page there's a page break. Or is there any object inside the repeating frame with page-break properties? Sorry .. it's like looking into a chrystal ball ...
    Regards
    Rainer

  • Can anyone give me simple instructions on how to use more than one ipod on the same computer with itunes? Both my daughters have ipods, my wife has one

    Dear All
    Can anyone give me simple instructions on how to use more than one ipod on the same computer with itunes. My daughters have a different generation 'nano' each & my wife a 'shuffle'?
    Many thanks

    Click here for options.
    (69081)

  • How to select more than one slide on Keynote?

    Please, someone knows how to select more than one slide on keynote for IPad?

    // Allow selection to span one contiguous set of rows, visible columns, or block of cells
    table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
    // Allow multiple selections of rows, visible columns, or cell blocks
    table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

  • How to display more than one documents on windows 8 desktop?

    how to display more than one documents on windows 8 desktop?

    Adobe Reader Touch doesn't show more than one file on screen and doesn't show them on the desktop. Apparently these are very old fashioned things that Microsoft doesn't think we'll want to do any more and calls them "legacy" to make them sound antiquated.
    If you want to do these things use the legacy Adobe Reader, a much more powerful and flexible app (and not obsolete in the slightest). http://get.adobe.com/reader . There are no legacy apps in the Windows App Store.

  • How to make more than one partition on Airport Time Capsule?

    how to make more than one partition on Airport Time Capsule?

    Only for the very brave......
    Open up the Time Capsule (voids the warranty)
    Pull the hard drive
    Place the hard drive in a separate enclosure
    Connect the enclosure directly to your Mac
    Use Disk Utility to partition the hard drive
    Reinstall the hard drive back in the Time Capsule
    For the rest of us.....
    The next best thing might be to set up one or more disk images on the Time Capsule, which will allow you reserve a given amount of space for each disk image.
    Open up Macintosh HD > Applications > Utilities > Disk Utility
    Click on the New Image tab
    Navigate to the Time Capsule
    Set up the disk image by naming it and specifying how much space you want to reserve

  • How to attach more than one picture on an email

    How to attach more than one picture on an email?

    Tap the square with arrow on top right and select pictures you want to send (max 5 pictures)
    http://i1224.photobucket.com/albums/ee374/Diavonex/f0bd7d73.jpg

  • How to sync more than one iphone to a macbook?..

    How to sync more than one iphone to a macbook?..

    Open itunes, connect iphone, select what you want to sync, sync
    Do the same for each iphone.

Maybe you are looking for

  • Problem with video out sporatically failing

    I have a 2G Touch and an iPod -> Composite Video cable hooked to my HD TV. I have sometimes been able to easily view video from my iPod but at other times I get "Device is not supported" error after which, no matter what I do, it refuses to work. How

  • Error in scenario "FILE to HTTP(with SSL)" - HTTP client code 110 reason.

    Hi friends, Our scenario is as follows: We are trying to send XML file from our SAP-XI to external tool "COMMunix XC" (a multi-protocol EDI platform tool). We have configured " FILE TO HTTP(with SSL)" scenario (trying to connect HTTPS/port) 1. We hav

  • How do i delete even or odd fields ?

    hi i am interested to see how my dv pal footage would look like when only even fields or odd fields are playing. couldn't find a filter and making a mask (in photoshop) of hundreds of one pixel width lines seems too much of a hassle. any ideas? thank

  • Function module to find the previous tax year.

    Hi, Is there any fumction module to find the previous tax year if i give sy-datum. Thanks & Regards, Soumya.

  • Sending a photo attachment

    I am trying to send an email with a photo attached and it will not send. The file goes to the out box but no further. It prevents me from sending other emails until it is deleted. After a while it gives the error message to consult your provider.The