How to use results of ejbfind methods when it is a collection ?

How to use ejbFind methods result , when it is a collection ?
Hi thank you for reading my post.
EJB find methods return a collection , i want to know how i can use that collection ?
should i use Collection.toArray() and then use that array by casting it?
what is DTOs and ho i can use them in this case?
How i can use the returned collection is a swing application as it is a colection of ejbs ?
Should i Cast it back to ejb class which it comes from or some other way ?
for example converting it to an array of DTO (in session bean) and return it to swing application ?
or there are some other ways ?
Thank you

Hi
pleas , some one answer
Collection collection = <home-interface>.<finderMethod>;
Iterator iter = collection.iterator();
while (iter.hasNext()) {
<remote-interface> entityEJB = (<remote-interface>) iter.next();
} what if i do the above job in session bean and convert the result to a DTO and pass the dto back ?
thank you

Similar Messages

  • How to use java source in Oracle when select by sqlplus.

    How to use java source in Oracle when select by sqlplus.
    I can create java source in Oracle
    import java.util.*;
    import java.sql.*;
    import java.util.Date;
    public class TimeDate
         public static void main(String[] args)
    public String setDate(int i){
    GregorianCalendar calendar = new GregorianCalendar();
    calendar.setTime(new Date((long)i*1000));
    System.out.println("Dateline: "
    + calendar.get(Calendar.HOUR_OF_DAY) + ":"
    + calendar.get(Calendar.MINUTE) + ":"
    + calendar.get(Calendar.SECOND) + "-"
    + calendar.get(Calendar.YEAR) + "/"
    + (calendar.get(Calendar.MONTH) + 1) + "/"
    + calendar.get(Calendar.DATE));
    String n = calendar.get(Calendar.YEAR) + "/" + (calendar.get(Calendar.MONTH) + 1) + "/" + calendar.get(Calendar.DATE);
         System.out.print(n);
         return n;
    I have table name TEST
    ID DATE_IN
    1 942685200
    2 952448400
    When I write jsp I use method setDate in class TimeDate
    The result is
    ID DATE_IN
    1 1999/11/16
    2 2003/7/25
    Thanks you very much.

    It is unclear where you are having a problem.  Is your issue at runtime (when the form runs in the browser) or when working in the Builder on the form?
    Also be aware that you will need to sign your jar and include some new manifest entries.  Refer to the Java 7u51 documentation and blogs that discuss the changes.
    https://blogs.oracle.com/java-platform-group/entry/new_security_requirements_for_rias
    http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/manifest.html

  • HT1695 I know nothing about how to use my new ipod and when reading the little bit of information in the folder that came with it, all I can do is turn it on, but it just powers down after a few seconds.  How do I work this thing?

    I know nothing about how to use my new ipod and when reading the little information that came with it, all I can do is turn it on.  Then in a few seconds it goes black, never having brought up a screen to do anything!  Help!  What do I do to get this thing going?

    You might consider connecting it to the charger and charging up the battery overnight.
    Please Get the iPod Touch User Manual for iOS 5

  • How to use two split this method in my code

    How to use two split this method in my code
    if i got one string line which like this
    ("aa!bb!cc~ab!bc!cd") a
    nd want to use two split to spare ! and ~ this seal for my spare point how that output
    has come diff ?
    public static void main(String[] args) {
        String str = "aa!bb!cc~ab!bc!cd";
        String strs[]= str.split("~");
        String strE[]= str.split("!");
        int count =0;
        for(int j=0; j < strs.length; j++){
          for (int i = 0; i < strE.length; i++){   
              System.out.println(count + " " + strE);
    count++;
    the output how can it be like this
    0 aa
    0 bb
    0 cc
    1 ab
    1 bc
    1 cd

    Move your second slit inside the first loop, so you are splitting the substring, not the entire string.

  • How to pick consignment stock @ FIFO method when involved multiple vendors

    Dear Guru s ,
    I need some information/ logic  on how to pick consignment stock @ FIFO method when involved multiple vendors (who supplies consignement goods) .
    1)We have tried to determine the vendor @ FIFO method from the material document date & time   with 101 K  mvmt type
    2) when we check MSEG table we are unable to get the current stock updates .For example Vendor A stock is showing 60 KG in MMBE , but MSEG is showing only 45 KG for the same vendor & storage location  .
    Can anyone provide me the logic / info on the same.
    Thanks
    Anil

    Hi Anil
    MMBE will show you total stock, your logic is correct , you can go for MSEG , but you need to add opening stock for that material for the period.
    Suppose you are looking for report between 2nd august to 10 august , then you need to take opening stock on 2nd august and then add all goods receipt( 101 k) between 2nd to 10th and you will get correct stock on 10th ( same as MMBE)
    Note : I am assuming that current date is 10th august. If you want to see stocks on particular date then go for MB5B.
    Now as per your requirement , you can identify goods movement based on FIFO , follow same logic , pick time and date from MSEG for 101 k movement type.
    Regards
    Ravi.

  • How to use ADF variables in C:when test?

    I have a <af:iterator in my page fragment as follows
    <af:iterator id="i1" value="#{queryModel.currentDescriptor.conjunctionCriterion.criterionList}" var="criterion" varStatus="vs">
    Within this iterator, I want to make a decision absed on the index of the iterator. To do this test, I am using jstl as follows
    <c:when test="${vs.index == '0' or vs.index == '2' or vs.index == '4'}">
    This test is however always evaluating to false. I have tried cahnging my code using various combiantion as below ...
    <c:when test="#{vs.index == '0' or vs.index == '2' or vs.index == '4'}">
    <c:when test="${vs.index == 0 or vs.index == 2 or vs.index == 4}">
    <c:when test="${vs.index == '0' || vs.index == '2' || vs.index == '4'}">
    But nothign seems to be working fine.
    Can some one help me with what I am doing wrong?
    Thanks.

    How to use ADF variables in <C:when test?

  • Need help!! How to use super in equals() method and makeCopy() method?

    This is my Name class:
    class Name {
        private String title;
        private String name;
        public Name(){
             title=" ";
             name=" ";
        public Name(String title){
             setTitle(title);
             name=" ";
        public Name(String title,String name){
             setTitle(title);
             setName(name);
        public void setTitle(String title){
             this.title=title;
        public String getTitle(){
             return title;
        public void setName(String name){
             this.name=name;
        public String getName(){
             return name;
        }   This is my Person Class
    class Person extends Name{
        private String address;
        private String tel;
        private String email;     
        public Person(){
             super();
             address=" ";
             tel=" ";
             email=" ";
        public Person(String name){
             super(name);
             address=" ";
             tel=" ";
             email=" ";
        public Person(String title,String name,String addressStr){
             super(title,name);
             setAddress(addressStr);
             tel=" ";
             email=" ";
        public Person(String title,String name,String addressStr,String phoneNum){
             super(title,name);
             setAddress(addressStr);
             setTel(phoneNum);
             email=" ";
        public Person(String title,String name,String addressStr,String phoneNum,String emailStr){
             super(title,name);
             setAddress(addressStr);
             setTel(phoneNum);
             setEmail(emailStr);
        public void setAddress(String add){
             address=add;
        public String getAddress(){
             return address;
        public void setTel(String telephone){
             tel=telephone;
        public String getTel(){
             return tel;
        public void setEmail(String emailAdd){
             email=emailAdd;
        public String getEmail(){
             return email;
         public boolean equals(Person inputRecords){
             boolean equalOrNot=false;
             if(inputRecords.super(getTitle()).equals(title))         //this is wrong
                  if(inputRecords.super(getName()).equals(name))           //this is wrong
                       if(inputRecords.getAddress().equals(address))
                            if(inputRecords.getTel().equals(tel))
                                 if(inputRecords.getEmail().equals(email))
                                      equalOrNot=true;
             return equalOrNot;   
            public void makeCopy(Person copyInto){
                 copyInto.super(setTitle(title));             //this is wrong
                 copyInto.super(setName(name));           //this is wrong
                 copyInto.setAddress(address);
                 copyInto.setTel(tel);
                 copyInto.setEmail(email);
    }How can I correct the wrong part?
    I don't understand how to use super in equals() method and makeCopy() method.

    Try something like this ...
    public boolean equals(Object other) {
      if (other==null || !(other instanceof Person)) return false;
      Person that = (Person) other;
      return getTitle().equals(that.getTitle())
          && getName().equals(that.getName())
          && getAddress().equals(that.getAddress())
          && getTel().equals(that.getTel())
          && getEmail().equals(that.getEmail())
    Notes:
    * This overrides Object's public boolean equals(Object other), which is (probably) what you meant.
    * You don't need to call "super.getWhatever" explicitly... just call "getWhatever" and let java workout where it's defined... this is better because if you then override getTitle() for example you don't need to change your equals method (which you would otherwise probably forget to do, which would probably have some interesting side effects.
    Cheers. Keith.

  • How to use result obtained from clientContext.executeQueryAsync

    i have to use result obtained from clientContext.executeQueryAsync for condition in code.But, now i face problem that clientContext.executeQueryAsync result not obtained when needed.

    Hi,
    I suggest you provide more information about your requirement(your code) or error messages for further research.
    If you want to get list items using JavaScript Client Object Model(JSOM), the following articles for your reference:
    How to: Retrieve List Items Using JavaScript
    https://msdn.microsoft.com/en-us/library/office/hh185007(v=office.14).aspx
    Working with the ECMAScript Client Object Model (JSOM) in SharePoint 2010–Part 3
    http://blogs.msdn.com/b/sharepointdev/archive/2011/07/19/working-with-the-ecmascript-client-object-model-jsom-in-sharepoint-2010-part-3-nikhil-sachdeva.aspx
    We can also use REST API to achieve it.
    SharePoint 2013 – CRUD on List Items Using REST Services & jQuery
    http://www.plusconsulting.com/blog/2013/05/crud-on-list-items-using-rest-services-jquery/
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • How to use Results from Another Query for SAP BW universes

    Hi Everyone,
    I have two SAP BI universes.In my First universe I have Sales Doc no (dimension) and Orderqty (Measure) and in my second universe I have Sales Doc no(Dimension) and BillQty (Measure).
    Here in my first dataprovider I have 1200 rows of data and in second dataprovider I have 75,000 rows. The report should fetch only the BillQty details that matches to corresponding  Sales doc no in first data provider.
    I want to place all these fileds into a single report like as shown.
    (Datarpovider1)                (Datarpovider1)                    (Datarpovider2)
    *Sales Doc No*               Orderqty                           BillQty
    Here I am able to generate single report using merge dimension but it is leading to performance issues. I want to restrict the values at query level by passing the First dataprovider Sales doc no to second Data provider Sales doc number using Results from Anothery Query feature so that It can fetch only the matching records.
    I tried it but it was giving the follwing error:
    A filter contains a wrong value. You cannot run this query. (Error: WIS 00007)
    How Can I get rid of this error. Can we use Results from Anothery Query option for OLAP universe. Are there any limitation on it.
    All this I am doing in Webi Rich Client.
    Appreciate your help
    Thanks &in Advance
    Kiran Saka

    Hi Kiran,
    I think the filter has a wrong operand. For example, a filter with an empty constant, or a filter that deals with numeric values is defined with an alphanumeric value.Check out for this.
    Regards,
    Neeraj

  • How to use alias in "From" field when I send a mail with utl_smtp ?

    Hi all,
    I'm using a PL/SQL package with an Oracle 11G database to send mails. It works fine but instead of use of my mail in "From" field like "[email protected]" as sender E-mail address, I would like to have "Toto" in the sender address. I tryied to use utl_smtp.mail(l_connection, '<toto> [email protected]') but it doesn't work. The only way I can send mail is when I set utl_smtp.mail(l_connection, '<[email protected]>') directly. When I use the Alias, I have an error from smtp server telling that I use a bad syntax address.
    Does someone know how to use the alias ? Where do I do a mistake ?
    Thank you for your help.
    sis2b

    Thank you, I find how to solve the problem thanks to your link.
    I try to send HTML E-mail so I had the From in the from field writen in the header of the mail and not to initialize the connection.
    sis2b.

  • How to use JFrame's setLayeredPane() method?

    I want to custom JFrame's LayeredPane by setLayeredPane() method,but it does't work.
    Anyone who can help me?
    The code as follows:
    import javax.swing.*;
    import java.awt.*;
    public class LayeredTest{
        public static void main(String[] args){
            SwingUtilities.invokeLater(new Runnable(){
                public void run(){
                    new MyFrame().setVisible(true);
    class MyFrame extends JFrame{
        public MyFrame(){
            super("LayeredTest");
            setLayeredPane(new JLayeredPane());           //this line, I want to set the LayeredPane myself;
                                                          //but it doesn't work.
            JPanel panel =new JPanel();
            panel.setPreferredSize(new Dimension(320,240));
            panel.add(new JLabel("Label"));
            panel.add(new JButton("Button"));
            add(panel);
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            pack();   
    }

    Thanks!
    But the very thing I want to know is "How to set Layered Pane(by setLayeredPane() method)",
    not "How to use Layered Pane".

  • Urgent!!! How to use IN_PARAMETER in CONSTRUCT_BSP_URL method

    Hi sdn,
    Iam new to bsp.I created a application with 2 controllers and 2 views.i want to transfer the values from one controller to another controller by using the runtime->construct_bsp_url().
    in that one parameter " in_parameter" is used to pass the values from another controller.but i don't know how to use that parameter.please give me sample example or give me syntax for that parameter.
    thank you for advance.
    Award the useful answer.
    thanks,
    Ramkumar

    hI,
    method DO_HANDLE_EVENT.
    DATA: event1 TYPE REF TO CL_HTMLB_EVENT.
    DATA: data TYPE REF TO CL_HTMLB_INPUTFIELD.
    DATA: V_TARGET_URL TYPE STRING,
            W_APP_NAME TYPE STRING.
    event1 = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
    if event1->name = 'button' and event1->event_type = 'click'.
    data:button_event type ref to cl_htmlb_event_button.
    button_event ?= event1.
    if button_event->server_event = 'submit'.
    data ?= CL_HTMLB_MANAGER=>GET_DATA( request = runtime->server->request
                                        name     = 'inputField'
                                        id       = 'ip1'
    IF data IS NOT INITIAL.
    input1 = data->value.
    ENDIF.
    data ?= CL_HTMLB_MANAGER=>GET_DATA( request = runtime->server->request
                                        name     = 'inputField'
                                        id       = 'ip2'
    IF data IS NOT INITIAL.
    input2 = data->value.
    ENDIF.
                  DATA: lt_params TYPE tihttpnvp.
                  FIELD-SYMBOLS: GOTO_PAGE( V_TARGET_URL ).
    endif.
    endif.
    endmethod.
    THE ABOVE CODE I WROTE IN DO_HANDLER_EVENT() METHOD.I ACTIVATED AND TESTED.IN THE FIRST VIEW ASKING THE APPLICATION NAME AND CONTROLLER I GAVETHAT INPUTFIELDS BUT THE NEXT VIEW IN THE OTHER CONTROLLER NOT DISPLAYING.IT GEETING THE ERROR
    BSP Exception: Das Objekt default.htm in der URL /sap/bc/bsp/sap/zehro_gr_fw_1/default.htm?input1=ZWFA_ESS04&input2=ZWFA_ESS04_01%2eDO&sap-sessioncmd=open ist nicht gültig.
    Please resolve my issue.

  • Can iTunes Gift cards and iTunes Gifts be used as a payment method when setting up family sharing as an organizer ?

    i want to set up family sharing and i will be the organizer when setting up family sharing i am asked to use a valid payment method and i don't want to use any credit or debit cars so can i use iTunes Gift cards and iTunes Gifts as a payment method ?
    Thanks in advance

    Have you worked through the guidance on Family Sharing given in:Family Sharing

  • How to use $controller.DateTimeUtils.DateGet method ?

    Hi everyone,
    Can someone tell me how to use the $controller.DateTimeUtils.DateGet method ? I would like to know whether a date is a saturday or sunday but I can't figure out how to use the method.
    Thanks in advance
    Chris

    See the JMX documentation.
    http://java.sun.com/javase/6/docs/api/javax/management/modelmbean/ModelMBeanInfo.html

  • How to use deafult pdf viewer ? when i give windows in my pc pdf file open in firefox deafultly but suddenly its not working how to fix this ?

    please tell me how to use default pdf reader in firefox ? when i give windows in my pc pdf file open in firefox deafultly but suddenly its not working how to fix this ? pdf not open when i give ok with preview in firefox its not open its offer again same message

    In order to change the default pdf reader please see: [[View PDF files in Firefox without downloading them]]
    In order to change the file association: [[Applications panel - Set how Firefox handles different types of files]]

Maybe you are looking for

  • Report in Object currency

    Hi, Report is generated by using report painter, but report displays  the values in controlling area currency.How we can display values in object currency ? Regards, Rohit

  • Issue with and characters in the xsl

    We are using SOA process to invoke a third party web service, which basically takes input payload and pass that to other service as a string by keeping that in CDATA. Third-party web service is giving an error if we pass < and > instead of < and > sy

  • Oraxsl and XML Schema

    I am having difficulty getting oraxsl to work if the root element of my XML document has the schema attributes (as below). If I remove the attributes for the root element (MemberCouponInput), oraxsl works fine. What am I missing? Thanks In Advance. <

  • Problem Connecting to J2ee engine for EP6.o

    Hello Gurus, Help needed..I tried my best in searching several OSS notes but none helped me. We installed EP6.0 on HPUX 11.1/Oracle 9.2.04 I upgrades J2ee Engine to patchlevel 17. WHen trying to apply SP2 using SDM, it is erroring out : unable to con

  • Compaq mini 110 CNU927BB89 ŞİFRESİNİ BULAMIYORUM

    compaq mini 110 CNU927BB89 ŞİFRESİNİ BULAMIYORUM This question was solved. View Solution.