Split a collection object

Hi
I have a collection object which is contains strings like (Name Address City State Country). The collection object is created from a result set. I am not sure how to parse into respective variable for the UI to display. As of now, I am just dumping the whole collection into a SINGLE textarea. The strings are NOT delimited.
TIA

Thanks for your response.
To begin with I am a newbie. I have 5 columns from a table being returned by the java class as a collection. Once i get the collection which is made of variable
(name, address city, country). I need to seggregate into respective text field in my UI.
The following is what being returned from the result set.
rs = ps.executeQuery();
          while (rs.next()){
               String S_S1 = rs.getString("NAME");
               String S_S2 = rs.getString("ADDRESS");
               String S_S3 = rs.getString("CITY");
               String S_S4 = rs.getString("COUNTRY");
               Double S_D1 = new Double(rs.getDouble("FAXNO"));
               String S_S5 = rs.getString("CMNTS");
// HERE rv0 is declared as an object with these variables (if I could say so)
               rv0 = new DBData(S_S1, S_S2, S_S3, S_S4, S_D1, S_S5);
// rv is a collection, this class returns a collection
               rv.add(rv0);
The following is the what have after the data is retrieved
DBGetConv dbg = new DBGetConv();
Collection data = dbg.getData(UOMSLCT); // here getData is a method insde the class DBGetConv which returns the collection.
     Iterator iter = data.iterator();
Now all have is an iterator which contains a few strings and a double, all i need is to parse those and load into their respective textareaS.
HTH

Similar Messages

  • Query on using Collection object in Multithreading

    All,
    I have a query on multithreading, I have a collection object-eg. HashMap which needs to be shared
    among threads, I my have 3 options
    1st option is to synchronize the method which does some manipulation on the collection object,
    2nd option is to hold a lock on that object like
    synchronized(object){
    //do some work
    3rd option - to make use of class ConcurrentHashMap available in java.util.concurrent package; which claims to be
    Thread safe but also says the following in the API - They do not throw ConcurrentModificationException. However,
    iterators are designed to be used by only one thread at a time
    My queston is - how do I choose between these 3?
    I know the decison needs to be taken by keeping performance issue in mind and also the number of times the values in HashMap will be updated by the threads. Can some one explain to me when/under what circumstances do I use options 1 || 2 || 3

    My application has actually gone live now - after doing some load/performance testing
    and comming to the conclusion that performance is satisfactory [I am designing a SMS gateway
    that receives/buffers/stores/sends SMS]
    Initially I used Hashmap and a LinkedList to store objects in memory and I had a mixture
    of places where some times I made the entire method that modifies the LinkedList & hashmap
    synchronized and some places where I held a lock on the object alone (I wasnt too sure which to use where)
    Then upon movin to 1.5 I rechanged the the data structure to use ConcurrentLinkedQueue & ConcurrenthashMap.
    But i have places where I still hold synchronized locks over those objects (which i think is unnecessary and removing the locks may improve the performance)
    So can i come to the conclusion that classes in java.util.concurrent are all threadsafe and we can stop holding locks on the objects and let java take care of itself [or should I still hold a lock when doing structural modification] [though the APi states that a oncurrentmodificationexception will not be thrown & iterators are designed to be used by only one thread at a time]

  • Declare and initialize a varray of collection Object and pass it as OUT Par

    Hi ,
    How to declare and initialize a varray of collection Object and pass it as OUT Parameter to a procedure.
    Following is the Object and VARRAY Type 's I have created and trying to pass the EmployeeList varray type variable as an OUT parameter to my stored procedure, but it is not working. I tried different possibilities of declaring and initializing the varray type variable but it did not work. Any help would be appreciated.
    CREATE TYPE Employee IS Object
              employeeId     Number,
              employeeName VARCHAR2(31),
              employeeType     VARCHAR2(20),
    CREATE TYPE EmployeeList IS VARRAY(100) OF Employee;
    /* Procedure execution block */
    declare
    employees EmployeeList;
    begin
    EXECUTE displayEmployeeDetails(100, employees);
    end;
    Thanks in advance,
    Raghu.

    but it is not workingWhat's the definition of not working?
    Error messages are always helpful.
    SQL> CREATE OR REPLACE TYPE Employee IS Object
      2  (
      3  employeeId Number,
      4  employeeName VARCHAR2(31),
      5  employeeType VARCHAR2(30)
      6  );
      7  /
    Type created.
    SQL>
    SQL> CREATE OR REPLACE TYPE EmployeeList IS VARRAY(100) OF Employee;
      2  /
    Type created.
    SQL> CREATE OR REPLACE PROCEDURE getEmployeeDetails (
      2    o_employees OUT employeelist
      3  )
      4  AS
      5  BEGIN
      6   o_employees := employeelist();
      7   o_employees.EXTEND;
      8   o_employees(1) := employee(1,'Penry','Mild Mannered Janitor');
      9  END;
    10  /
    Procedure created.
    SQL> set serveroutput on
    SQL> declare
      2   employees employeelist;
      3  begin
      4   getemployeedetails(employees);
      5   for i in 1 .. employees.count
      6   loop
      7    dbms_output.put_line(employees(i).employeeid||' '||
      8                         employees(i).employeename||' '||
      9                         employees(i).employeetype);
    10   end loop;
    11  end;
    12  /
    1 Penry Mild Mannered Janitor
    PL/SQL procedure successfully completed.
    SQL>

  • Problems persisting the collection object in Web dynpro context

    Hello,
    I am trying to bind a Instance of hashtable (java.util.Hashtable) in the context.
    I instantiate a hashtable and bind it to the context for the first time, when i fetch it, it returns null. Is it possible to store a collection object in the context ??
    I am a newbie with Web dynpro - java. Sorry if it is a repeated question.
    Awaiting the suggestions.
    Thanks in advance,
    Harish
    Edited by: Harish Medehal on Dec 19, 2007 1:58 PM

    Hi Harish,
                  Welcome to SDN.  Yes, it is  possible to bind a collection object in the context.
    wdContext.node<DataNode>().bind(COLLECTION);
    regards,
    Siva

  • Instantation Policy for Collection Object.

    Dear all,
    We hit the problem related to the collection object. We have extended the java's collection object, i.e. List, Set and Map, to hold some extra tranisent attributes and tried to recover them with event handler (i.e. postMerge, postClone, postBuild, postRefresh) during the object loading process. We also do not allow those extra attributes to be changed once they are set to not null by throwing exception.
    The interesting thing is that, we found the exception was thrown from postMerge/postClone event handler. It seems that TopLink were trying to reuse those cached collections in the memory once TopLink believed they would not be used anymore. Is my guess correct or not? And is there any "preBulid" event for "Collection" class, so that we can initialize the collection by ourself ?
    Thanks and regards,
    William

    William,
    I do all my extra wiring for custom collections in the get method for the elements. I use indirection, and just use the isinstantiated method to determine when it is getting created, and add some listeners for example.
    Hope that helps.
    Craig

  • Need help on Collecting Objects in Transports

    Hi All,
    I am collecting the Application Component for Transporting.While Collecting , i have given the grouping as "Neccessary Objects". But while executing,it is acting as a "Data Flow Before". It is installing all the below Objec ts.Please help on this Issue.
    Thanks,
    Jelina.

    Hi Jelina,
    After collecting objects, choose option as "Only Necessary objects" and then below the object collected you will find some dependant objects related to it.
    For eg: If you are collecting cube beside that is a check box which will be checked for transport.
    Below that you can find many things where that cube is used example--infoarea or info object.
    Beside that info area or info object you wil find a check box, right click and click on "Donot Transport Any below". So the object on which you clicked and the below objects will not be transported. Do the same thing for all the underlying objects.
    Hope it helps!!!
    Thanks
    Lavanya

  • Problem in collecting objects for BI Contents installation

    Hi All ,
    While collecting objects in BI content i am getting some error. Every time in stus bar the status shows "Destination Check with client ". After this status comes the session logs out automatically and a Error massage come i.e. "PBI error : SAP System error ". and even no log is maintained in slg1.
    please help me.
    Regards,
    Rohit Garg

    Rohit,
    Before collecting the objects, select the proper source sytem (keyboard shortcut is Shift + F7), then collect the objects .. also as suggested you need to check if the RFC connection to your source system is woeking fine ..
    Thanks.

  • Sequence of collecting objects for transport in BI

    I am making a display attribute to navigational attribute, kindly let me know the sequence of collecting objects for transport request.
    i need to check in infocube as well in multi provider.
    please let me know
    thanks,
    Venkat

    Hi,
    Make sure the Infoobjects(in which you are changing it from Display attirube to Nav attribute) and collect the other things in a seperate request (Infoproviders, the deativated transformations and the DTP followed by Queries). Release the request to QA/Prd in a sequence(Infoobject request first and the iinfoprovider request as followed by the successful movement of the first one.
    The STMS automatically take cares the sequence of trasnporting the objects one by one to the destination system.
    Regards,
    Venkat S

  • How to store Java ArrayList or any Collection object

    Hi,
    How Can I store Java ArrayList or any Collection object into Oracle tables.
    In that case what should be the Oracle datatype of that column.
    Can anybody tell me in details...
    Thanks in advance.
    Ashok R

    Ashok,
    Search this forum's archives for ARRAY and STRUCT.
    Good Luck,
    Avi.

  • Runtime error while collecting objects for activaton from  BC

    Hi gurus,
    While collecting objects from busines content for installation, it is giving runtime error whith below description.
    "UNCAUGHT_EXCEPTION" "CX_RSD_NAME_ERROR"               
    "SAPLRSDN_IOBJ" or "LRSDN_IOBJU35"               
    "RSD_IOBJNM_PARSE"               
    R3TR     FUGR     RSDN_IOBJ     
    An exception occurred which is explained in detail below.               
    The exception, which is assigned to class 'CX_RSD_NAME_ERROR', was not caught               
      and               
    therefore caused a runtime error.               
    The reason for the exception is:               
    Name 0SRVE_IS3___F00133 is invalid               
    Pl spot light on this .
    Thanks in advance.
    Message was edited by:
            sri sri

    Hi Sri / Vach,
    this note can help you and implement the same
    1102743 - Dump during activation of business content
    Thanks
    kishore

  • If collection object has more rows the error comes up ...

    I am having a BPEL process which is being accessed by a client [in ADF] by using webproxy. Now my BPEL process returns a collection object.
    Everything works fine if my collection object has only 2 rows but if no. of rows increase it errors out with folowing error:
    "unexpected element name: expected={namespace}someOperationResponseElement ................
    Now i have tested my BPEL process in console and it works fine there irrespective of no. of rows.
    i found another thread with similar issue "BUG: Request XML returned as response when result too large" and therefore it seems to be a bug to me.
    Can somebody give me some more info on this.
    Regards
    Lokesh

    Well finally i got hold of this problem and found a work around :).
    I am having a web service which based on a Synchronous BPEL process. this BPEL process has a DB adapter. User gives an input which is ultimately passed to DB adapter. Now as the output of DB adapter partner link was a collection data type, i imported the partner link schema to the schema of calling client and this was where the whole problem started. Now when we use the WSDL of this web service to generate web proxy in ADF, it is unable to convert the data types properly [ due to that import statement] and this i believe is a bug in jdev 10.1.3.3.
    Work around : Instead of importing the partner link schema, just redefine the schema in the client xsd [ all i mean is just avoid import] and everything started working fine again.
    Regards
    Lokesh

  • Declaring and using a "collections" object?

    Hi,
    -I want to declare a Collections object like so...
    ArrayList arr = new ArrayList;
    Collections colls = new Collections;
    -so i can use the shuffle() command on an ArrayList
    e.g. colls.shuffle(arr);
    -The problem is i get a compiler error like this:
    "Collections() has private access in Java.utils.Collections"
    -How do i get around this???

    So all i have to do is:
    Collections colls;
    ArrayList arr = new ArrayList;
    colls.shuffle(arr);
    Is this correct?
    Thanks,
    PJ

  • Unable to map Collection Objects in BPM11g

    Hi,
    I am polling DB for triggering an instance in the process it is creating a Feildcollection object under
    Business Catalog -> types -> FeildCollection.
    when i am trying to map the object i need to map to another collection object itself.
    In the process I am not able to map the elements of it.
    Any help is greatly appreciated!!

    I think you have understood my question partially,
    When i go for transformation option, I am not given the option of other objects other than a collection again.
    Like for example In my project if I have three objects one made of DB adapter another of File adapter and the last one pointing to the .xsd(BasicObject) to which these two collections are pointing to.
    Script activity -> Implementation -> Use Transformation... Edit -> In the transformation output tab If i go for create option. In the Sources drop down I am given with only two options one with File Adapter collection object and another with DB adapter collection object. If i map it to a collection object again i will not be take out individual elements. According to me i need to map it to the root "Basic Object" only then i get the access to individual elements.
    My problem is even if i go for transformation option I am not able to map to individual elements from collection object.
    Regards

  • Collecting objects

    Hi.
    What may be reason that emulated datasources ( hierarchy datasources ) and relevant objects  are not collected in RSOR transaction?
    For example, there is infoobject A which has master data, texts  and hierarhies.
    When I collect objects for it using grouping mode in data flow before,
    datasources, transformations, DTPs and other objects relevant for master data and texts are collected
    but nothing for hierarhies.

    Hierarchies are not suppported in a 7.0 dataflow - if you migrated the datasources to their 7.0 version - you would have to migrate them back to 3.x if the master data datasources have hierarchies since hierarchies can be loaded only using the 3.x flow and a 7.0 version for the same does not exist as of now...

  • No object can select when collecting objects for transport

    Hi.Experts:
        When I use RSA1 and want to collect objects for transport,I found that no objects can be found for some object type,such as ISTD/TRFN etc, any body who know this situation?
    Best Regards
    Martin Xie

    Hi Martin,
    best way to collect objects into transport request is throught RSA1 -> Transport connection.
    in Transport connection, you have different options to collect objects into transport request.
    In data flow before...
    here you can see objects that are already have transport request, package...
    Regards
    Daya Sagar

Maybe you are looking for

  • IPad AiO app: Sharing multiple files/docs at one time?

    iPad AiO remote app:  I cannot share more than one file or doc at a time to Cloud storage, even though you can 'select all' the app does not seem to allow you to share a group at one time.  Is there a work around for this? 

  • Mail in 10.6.2 Crashing When saving or searching for attachments

    Installed 10.6 the other day, then 10.6.2 yesterday. Since then Mail is crashing out almost everytime I search through files to attach an attachment, or when I'm trying to save an attachment. I'm sending and receiving mail just fine. After relaunchin

  • TS4006 ipod is disabled says to connect to itunes

    ipod is disabled it says to connect to itunes. how do i do this. i have not used tis for 5 months and lost my password

  • Exporting other than english language pdf's into word

    Hello, I have pdf's that are in languages other than english e.g. german or sanskrit. I have Acrobat X1 Pro which I used to export the pdf's into word. The word documents really look nice but most of the words come up as garbage and random symbols. I

  • IPad 2 Screen has gone black

    I recently updated my Ipad 2 to IOS 8. Yesterday I was playing Candy Crush Saga (No sniggering) and put it down to do something else. I returned to find the screen had gone black, but was still illuminating. Tried to wake it up, but with no success.