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

Similar Messages

  • Best way to declare and use internal table

    Hi all,
    As per my knoledge there are various techeniques (Methods) to declare and use the internal tables.
    Please Suggest me the Best way to declaring and using internal table ( WITH EXAMPLE ).
    Please Give the reason as well how the particular method is good ?
    What are benefits of particular method ?
    Thanks in advance.
    Regards
    Raj

    Hello Raj Ahir,
    There are so many methods to declare an internal table.
    Mainly I would like to explain 2 of them mostly used.
    1. Using Work Area and
    2. With header line.
    This with header line concept is not suggestable, because, when we shift the code to oops concept.. it doesn't work... Because OOPS doesn't support the Headerline concept...
    But it all depends on the situation.
    If you are sure that your program doen't make use of the OOPs concept, you can use HEADER LINE concept. If it invols OOPs use WORK AREA concept.
    Now I'l explain these two methods with an example each...
    1. Using Work area.
    TABLES: sflight.
    DATA: it_sflight TYPE TABLE OF sflight.
    DATA: wa_sflight LIKE LINE OF it_sflight.
    SELECT *
      FROM sflight
      INTO it_sflight
      WHERE <condition>.
      LOOP AT it_sflight INTO wa_sflight.
        WRITE / wa_sflight.
      ENDLOOP.
      In this case we have to transfer data into work area wa_sflight.
    We can't access the data from the internal table direclty without work
    area.
    *<===============================================
    2. Using Header line.
      DATA: BEGIN OF it_sflight OCCURS 0,
              carrid LIKE sflight-carrid,
              connid LIKE sflight-connid,
              fldate LIKE sflight-fldate,
            END OF it_sflight.
      SELECT *
        FROM sflight
        INTO it_sflight
        WHERE <condition>.
        LOOP AT it_sflight INTO wa_sflight.
          WRITE / wa_sflight.
        ENDLOOP.
    In this case we can directly access the data from the internal table.
    Here the internal table name represents the header. for each and every
    interation the header line will get filled with new data. If you want to
    represnent the internal table body you can use it_sflight[].
    *<======================================================
    TYPES: BEGIN OF st_sflight,
             carrid LIKE sflight-carrid,
             connid LIKE sflight-connid,
             fldate LIKE sflight-fldate,
           END OF st_sflight.
    DATA: it_sflight TYPE TABLE OF st_sflight,
          wa_sflight LIKE LINE OF it_sflight.
    This is using with work area.
    DATA: it_sflight LIKE sflight OCCURS 0 WITH HEADER LINE.
    This is using header line.
    <b>REWARD THE POINTS IF IT IS HELPFUL.</b>
    Regards
    Sasidhar Reddy Matli.
    Message was edited by: Sasidhar Reddy Matli
            Sasidhar Reddy Matli

  • How to declare and use multi dimensional VARRAYs in PLSQL

    Hi All,
    I am trying to create and use multidimensional varray in plsql code...
    can anyone let me know, how can I do this...
    Thanks
    Krishna

    Please do not confuse plsql collections with type objects.Well it's possible with persistent types but nested tables and varrays typically need to be explicitly initialized and extended.
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> CREATE OR REPLACE TYPE name_type_size IS VARRAY (3) OF VARCHAR2 (50);
      2  /
    Type created.
    SQL> CREATE OR REPLACE TYPE name_type_size_array IS VARRAY (200) OF name_type_size;
      2  /
    Type created.
    SQL> DECLARE
      2     i_name_type_size_array name_type_size_array :=  name_type_size_array ();
      3  BEGIN
      4     FOR count1 IN 1 .. 200 LOOP
      5
      6        i_name_type_size_array.EXTEND;
      7        i_name_type_size_array (count1) := name_type_size ();
      8
      9        FOR count2 IN 1 .. 3 LOOP
    10
    11           i_name_type_size_array (count1).EXTEND;
    12           i_name_type_size_array (count1) (count2) := count2;
    13
    14        END LOOP;
    15
    16     END LOOP;
    17  END;
    18  /
    PL/SQL procedure successfully completed.
    SQL>

  • Problem declaring and using a REF CURSOR

    I'm having a real problem using a REF CURSOR type
    Here's the DECLARE and the start of the BEGIN I've so far developed.
    DECLARE
    TYPE r1 IS RECORD (
    szvcapc_pidm szvcapc.szvcapc_pidm%TYPE,
    szvcapc_term_code szvcapc.szvcapc_term_code%TYPE,
    szvcapc_request_no szvcapc.szvcapc_request_no%TYPE);
    szvcapc_rec r1;
    TYPE cursor_1 IS REF CURSOR RETURN r1;
    szvcapc_cv cursor_1;
    TYPE r2 IS RECORD (
    stvests_code stvests.stvests_code%TYPE
    stvests_rec r2;
    TYPE cursor_2 IS REF CURSOR RETURN stvests_rec;
    stvests_cv cursor_2;
    BEGIN
    OPEN szvcapc_cv FOR
    SELECT szvcapc_pidm, szvcapc_term_code, szvcapc_request_no
    FROM szvcapc
    WHERE szvcapc_passed_ind = 'Y'
    AND szvcapc_award_credits = 'N';
    LOOP
    FETCH szvcapc_cv INTO szvcapc_rec;
    EXIT WHEN szvcapc_cv%NOTFOUND;
    END LOOP;
    OPEN stvests_cv FOR
    SELECT stvests_code
    FROM stvests
    WHERE stvests_eff_headcount = 'Y';
    LOOP
    FETCH stvests_cv INTO stvests_rec;
    EXIT WHEN stvests_cv%NOTFOUND;
    END LOOP;
    SELECT *
    FROM (
    <snip>
    INNER JOIN stvests_rec
    ON SFBETRM.SFBETRM_ESTS_CODE = stvests_rec.STVESTS_CODE
    <snip>
    I later try to use the stvests_rec and szvcapc_rec in the main SELECT statement it doesn't recognise stvests_rec and szvcapc_rec as a "Table or View".
    I have to use a REF CURSOR as this code is ultimately for use in Oracle Reports.
    What am I doing wrong?

    > The reason I'm trying to use a REF CURSOR is that I was told that you
    couldn't use CURSORs in Oracle Reports.
    That does not change anything ito what happens on the Oracle server side. A cursor is a cursor is a cursor.
    Every single SQL winds up as a cursor. Each cursor has a reference handle to access and use. HOW this handle is used in the language differs. But that is a language issue and not an Oracle RDBMS issue.
    For example. An EXECUTE IMMEDIATE in PL/SQL creates a cursor handle and destroys it after use - automatically. An implicit cursor works the same. An explicit cursor you have the handle fetch from it and close from it when done.
    A ref cursor is simply a handle that can be returned to an external client - allowing that application to use the handle to fetch the rows.
    Do not think that a ref cursor is any different from the RDBMS side than any other cursor. The RDBMS does not know the difference. Does not care and nor should it.
    > I'm trying to reduce the hits on the database from nested selects by
    removing the dataset from the main SELECT statement and performing it only
    once outside and then referencing this previously collected dataset inside the
    main SELECT statement.
    Good stuff that you are considering SQL performance. But you need to make sure that you
    a) identify the performance inhibitor issue correctly
    b) address this issue correctly
    And you need to do that within SQL. Not PL/SQL. PL/SQL will always be slower at crunching data than SQL. For example, wanting to cache the data somehow to reduce the read overhead - that is exactly what the DB buffer cache does. It caches data. That is also exactly what the CBO will attempt - reduce the amount of data that needs to be read and processed.
    Not saying that the RDBMS can do it all. It needs help from you - in the form of a SQL that instructs it to process only the minimum amount of data required to get the required results. In the form of a sound physical design that provides optimal usage of data storage and access (like indexing, partitioning, clustering, etc).
    Bottom line - you cannot use a REF CURSOR to make a SQL go faster. A REF CURSOR is simply a cursor in the SQL Engine. A cursor is nothing but the "compiled-and-executable" code of a SQL "source program".

  • Need Ideas for creating and using Custom Business Object

    Hello Guys,
    I am developing an application which uses a Request->Approve->Create approach for creating Purchase documents.
    Now I am a little puzzled about how to make use of the Business Object BUS2014.
    The application I am developing has its own unique 'Request Number'  (say REQID)  which will point to the Request for Creation of a purchase order.
    Whenever a Request is created (from a Z-Tcode) a workflow needs to be initiated and it has to be sent to the approver.
    The Purchase Document will be created once the approver approves.
    Now my confusion here is, if I use BUS2014, the object will be instantiated only during the final step of the workflow. But I need an instance during the beginning of the Requestor ->Approver negotiations as I am playing with events. These events needs an Object_key.
    How should I proceed here?
    Should I create a new logical Business Object like ZPOREQ where I have the above mentioned REQID as the key?
    And should I have an attribute of type BUS2014 inside the custom BO?
    How will I make use of the methods like BUS2014.Create etc which I may need to create the purchase document?
    Any small direction will be a huge help for me to get used to this wilderness.

    Hi,
    You should continue with the ABAP class idea. The business objects are kind of "obsolete" already, and if there is a need to create a new "object", ABAP classes are the way to go. Business objects are still useful, but I normally use them only when an existing standard business object fulfills the requirements (possibly with slight additions) which is almost never. 
    From my point of view you can use the existing class. Depending on the circumstances I normally have just one class that I use for both workflow and the possible other functionality that is required, but you have to understand that I have this goal in my mind already when starting the development process. As your class most probably has many useful features already (such as you have the header and item data as attributes etc. (if I understood correctly?), these are also useful in in workflow (class attributes will be available in WF container etc.). 
    If you are hesitant to use the same class directly in your workflow, you could also create a new class ZCL_REQUEST_FOR_WF (with the workflow interface), and then simply add your existing class ZCL_WF_REQUEST as an attribute to this new class. Then this new workflow class could include the pure workflow stuff, and your existing class the non-workflow stuff. But this most probably will not make much sense - just implement the if_workflow interface in your existing class (this is just one possibility that you might consider.)
    Regards,
    Karri

  • How to declare and use olevar

    Hi
    I need to declare olevar variable and use it. Can anybody kindly help?
    Thanks

    DECLARE
    scan_ole oleobj;
    edit_ole oleobj;
    file_ole oleobj;
    ole_filetype olevar := to_variant(1);
    ole_pagetype olevar := to_variant(1);
    ole_compressiontype olevar :=to_variant(2);
    ole_compressioninfo olevar := to_variant(8);
    dummy NUMBER;
    lst ole2.list_type;
    scancomplete BOOLEAN;
    a NUMBER;
    b VARCHAR2 (2000);
    v_error VARCHAR2 (50);
    scanerror EXCEPTION;
    PRAGMA EXCEPTION_INIT (scanerror, -20010);
    BEGIN
    forms_ole.ACTIVATE_SERVER ('ocx');
    scan_ole := forms_ole.GET_INTERFACE_POINTER ('OCX');
    IF imaging_dimgscan.scanneravailable (scan_ole) <> 0
    THEN
    dummy := imaging_dimgscan.startscan (scan_ole);
    scancomplete := TRUE;
    ELSE
    scancomplete := FALSE;
    v_error := 'Scanner not available';
    RAISE scanerror;
    END IF;
    IF scancomplete
    THEN
    forms_ole.ACTIVATE_SERVER ('EDIT');
    edit_ole := forms_ole.GET_INTERFACE_POINTER ('EDIT');
    b := imaging_dimgscan.destimagecontrol (edit_ole);
    imaging_dimgscan.destimagecontrol (edit_ole, b);
    a := imaging_dimgscan.closescanner (scan_ole);
    GO_BLOCK ('SCANNED_IMAGES');
    :SYSTEM.message_level := 25;
    forms_ole.ACTIVATE_SERVER ('FILE');
    FILE_ole := forms_ole.GET_INTERFACE_POINTER ('FILE');
    IMAGING_DIMGEDIT.SAVEAS(edit_ole,'C:\scan0001.tif');
    --IMAGING_DIMGEDIT.SaveAs( edit_ole,'C:\scan0001.tif',ole_filetype,ole_pagetype,ole_compressiontype);
    READ_IMAGE_FILE ('C:\scan0001.tif', 'ANY', 'SCANNED_IMAGES.IMAGE_DATA');
    IF NOT FORM_SUCCESS
    THEN
    v_error := ' Could not read image file';
    :SYSTEM.message_level := 0;
    RETURN;
    END IF;
    :SYSTEM.message_level := 0;
    IF :scanned_documents.zoom_amount IS NOT NULL
    THEN
    IMAGE_ZOOM ('SCANNED_IMAGES.image_data',
    zoom_percent,
    :scanned_documents.zoom_amount
    END IF;
    :scanned_images.page_count := TO_NUMBER (:GLOBAL.pagecount);
    :scanned_images.description := 1;
    :scanned_images.page_number := 1;
    END IF;
    EXCEPTION
    WHEN scanerror
    THEN
    a := imaging_dimgscan.closescanner (scan_ole);
    MESSAGE (v_error || ' ' || SQLCODE || ' ' || SQLERRM);
    WHEN OTHERS
    THEN
    a := imaging_dimgscan.closescanner (scan_ole);
    MESSAGE (v_error || ' ' || SQLCODE || ' ' || SQLERRM);
    END;
    The called method
    /*PROCEDURE SaveAs(interface OleObj, Image VARCHAR2, FileType OleVar := OleVar_Null,
         PageType OleVar := OleVar_Null, CompressionType OleVar := OleVar_Null, CompressionInfo OleVar := OleVar_Null,
         SaveAtZoom OleVar := OleVar_Null) IS
    BEGIN
    Init_OleArgs(6);
    Add_OleArg(Image);
    Add_OleArg(FileType);
    Add_OleArg(PageType);
    Add_OleArg(CompressionType);
    Add_OleArg(CompressionInfo);
    Add_OleArg(SaveAtZoom);
    Call_Ole(interface, 343);
    End;
    Where do I go wrong?? The first saveAs works but not the second one!!!

  • How to declare and use a variable in BI Publisher report

    Hi Experts ,
    I have to groups of serial numbers and both group are put in same table and same row one after another , and i have a condition that if no serial number is present in both group than the line of that table should not be appeared ,i used the condition region ,biut this condition region is working in single group case if i put both groups together ,the blaing line appears with its label ,I think if i will have have variable which can count the total present of serial number than I cant put a single condition ,would you please help me ,how can I declare a variable and how can i count the number of serials in both groups ,please find below the example
    <grp1><?SR_NUM1?><end of grp1> <grp2><?SR_NUM2?><end of grp2>
    above example is how i am printing now ,now i need a combined condition where if bot group do not contain any value then this blank line should not appear . thanks in advance.
    Thanks
    Pratap

    Hi ,
    Decalring the Varible :
    <?xdoxslt:set_variable($_XDOCTX, 'var', 0)?>
    Do the calculation :
    <?xdoxslt:set_variable($_XDOCTX,'var', xdoxslt:get_variable($_XDOCTX,'var‘)+ XML columnname)?>
    Display the Variable :
    <?xdoxslt:get_variable($_XDOCTX, 'var')?>
    Declare the varaible before your loop starts.Do the calculation part inside the loop so for each row it will be updated.
    Display the results where you want using the form field and place the display varaible syntax.
    Hope this will helpful for you.
    Thanks,
    Ananth

  • How to use VBA to View PDF file and use an OCR object?

    As subject, I need to use VBA to open PDFs via Acrobat. Convert images to texts. And get some key words from the documents.
    But I cannot find the API for VBA from SDK.

    The API for VB is part of the "Interapplication Communication" section, specifically the part for "OLE". You can also use much of the JavaScript API through a VB:JavaScript linkage.
    I don't know if there is an API to running OCR.

  • Where do I use These lock object FM's (Enqueue & D? and How do I use them?

    I created lock object for user defined table (zconsist). The system automatically created 2 FM's (Enquiue & Dequeue).
    I created a new TCode and accessing this with mulitple users to do some updates and inserts in that above table.
    I used INSERT ZCONSIST statement in 5 places in my program (4 include programs).
    Where do I use These FM's? and How do I use them?
    I mean before inserting which FM I need to use? after immediately what fm used?.
    every insert statemnt before i need to use the respective fm? so 5 places i need to call the respective FM is it right?
    thank in advance.

    Hi Sekhar,
    Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
    SAP Provide three type of Lock objects.
    Read Lock(Shared Locked)
    protects read access to an object. The read lock allows other transactions read access but not write access to
    the locked area of the table
    Write Lock(exclusive lock)
    protects write access to an object. The write lock allows other transactions neither read nor write access to
    the locked area of the table.
    Enhanced write lock (exclusive lock without cumulating)
    works like a write lock except that the enhanced write lock also protects from further accesses from the
    same transaction.
    You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
    Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
    Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
    Technicaly:
    When you create a lock object System automatically creat two function module.
    1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
    2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
    You have to use these function module in your program.
    check this link for example.
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    tables:vbak.
    call function 'ENQUEUE_EZLOCK3'
    exporting
    mode_vbak = 'E'
    mandt = sy-mandt
    vbeln = vbak-vbeln
    X_VBELN = ' '
    _SCOPE = '2'
    _WAIT = ' '
    _COLLECT = ' '
    EXCEPTIONS
    FOREIGN_LOCK = 1
    SYSTEM_FAILURE = 2
    OTHERS = 3
    if sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Normally ABAPers will create the Lock objects, because we know when to lock and how to lock and where to lock the Object then after completing our updations we unlock the Objects in the Tables
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    purpose: If multiple user try to access a database object, inconsistency may occer. To avoid that inconsistency and to let multiple user give the accessibility of the database objects the locking mechanism is used.
    Steps: first we create a loc object in se11 . Suppose for a table mara. It will create two functional module.:
    1. enque_lockobject
    1. deque_lockobject
    before updating any table first we lock the table by calling enque_lockobject fm and then after updating we release the lock by deque_lockobject.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    GO TO SE11
    Select the radio button "Lock object"..
    Give the name starts with EZ or EY..
    Example: EYTEST
    Press Create button..
    Give the short description..
    Example: Lock object for table ZTABLE..
    In the tables tab..Give the table name..
    Example: ZTABLE
    Save and generate..
    Your lock object is now created..You can see the LOCK MODULES..
    In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function
    Lock objects:
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    Match Code Objects:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci553386,00.html
    See this link:
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    Check these links -
    lock objects
    Lock Objects
    Lock Objects
    kindly reward if found helpful.
    cheers,
    Hema.

  • 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

  • Using a script object

    Hi,
    I have beginner skills using LC Designer ES and am trying to insert and use a script object. I found a JavaScript function online: http://home.online.no/~pjacklam/notes/invnorm/impl/misra/normsinv.html and am trying to get it to do some math calculations in a Designer form.
    I've uploaded a sample test form at: http://elearningprojects.com/TestFormula1.pdf
    Can't get it to work.Trying to run the JS formula in the script object (by clicking on a button), using a few hard-coded variables, and display the results (Dprime1 and Dprime2) in 2 text fields.
    I would much appreciate if someone can take a look and suggest how to get it working correctly.
    Thanks for your help.
    Kind Regards,
    saratogacoach

    Hi Paul,
    Thank you for your reply and suggestions. With beginner skills in LC Designer (I'm a retired social worker), I am not sure how to do this.
    Is my identifying the script object path correct?
    form1.#subform[0].#variables[0].SO1.function_name(NORMSINV(p));
    When you say "You are calling this function a few times in your code so you will have to modify each call." I am not sure how to change this.
    I currently have (note that I added the SO1. to the function calls):
    var p = totalscore5
    var probit1 = SO1.NORMSINV(p)
    var p = totalscore6
    var probit2 = SO1.NORMSINV(p)
    var Dprime1 = probit1-probit2
    var p = totalscore8
    var probit3 = SO1.NORMSINV(p)
    var p = totalscore7
    var probit4 = SO1.NORMSINV(p)
    var Dprime2 = probit3-probit4
    Can you specify what a modified script would look like? I'm stuck.
    Also, have I set up displaying the Dprime1 variable's value in the TextField1 correctly?
    Thanks very much for your help.
    Regards,
    saratogacoach

  • CAML Query to get specific item in folder based on dropdown value using Javascript client object model

    Hi,
    I am using the Javascript Client object model.
    I have a custom list and a custom document library.
    Custom list contains 2 columns - dlName , dlValue
    The document library contains 2 folders - "folder1" ,  "folder2" and contains some images.
    The image name starts with the "dlValue" available in the custom list
    I am using a visual webpart and using javascript client object model.
    I am trying to achieve the below functionality:
    1) Load a dropdown with the custom list.
    2) set the image based on the value in dropdown.
    I have achieved the first option, I have set the dropdown, but not sure how to query the folder and set the image.
    Below is the code i have used so far:
    //In Visual webpart
    <select id="ddlTest" >
    </select>
    <br/>
    <div id="PreviewLayer">
    <img id="imgPlaceHolder" runat="server" alt="Image" title="imgPlaceHolder" src=" " />
    </div>
    // In Javascript file
    function RenderHtmlOnSuccess() {
    var ddlTest = this.document.getElementById("ddlTest");
    ddlTest.options.length = 0;
    var enumerator = this.customListItems.getEnumerator();
    while (enumerator.moveNext()) {
    var currentItem = enumerator.get_current();
    var dropdownValue = currentItem.get_item("dlValue");
    ddlTest.options[ddlTest.options.length] = new Option(currentItem.get_item("dlName"), dropdownValue);
    setImage(dropdownValue); // Not sure how to query the folder and set the image based on value.
    // Also if dropdown value is changed, corresponding image should be shown
    How to query the folder and based on dropdown value, show the image? Also, how to handle the dropdown value change?
    Thanks

    Hi,
    Here are two links for your reference:
    Example of how to Get Files from a Folder using Ecmascript \ Javascript client object model in SharePoint 2010
    http://sharepointmantra.wordpress.com/2013/10/19/example-of-how-to-get-files-from-a-folder-using-ecmascript-javascript-client-object-model-in-sharepoint-2010/
    SP2010 JSOM Client Object Model: How to get all documents in libraries including all folders recursively
    http://sharepoint.stackexchange.com/questions/70185/sp2010-jsom-client-object-model-how-to-get-all-documents-in-libraries-including
    In SharePoint 2013, we can also use REST API to achieve it.
    http://msdn.microsoft.com/en-us/magazine/dn198245.aspx
    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

  • Import TermSet CSV using client side object model

    Hello,
    I want to import CSV in TermStore using client side object model. Unfortunately there is no ImportManager here.
    Is there any other way (Other than reading from CSV and adding term one by one to term store)?
    Regards, Nanddeep Nachan

    Hi,
    Here is a tool(server-side) from codeplex for your reference:
    SharePoint 2010 CSV Bulk Taxonomy TermSet Importer/Exporter
    If you want to import termsets  from CSV in Client-Side, we can refer the tool above.
    You can develop a windows form application and use .Net Client Object Model to achieve it. The following articles is about how to operate the termset using Client Object Model for you reference:
    http://sundarnarasiman.net/?p=87 (Download)
    http://code.msdn.microsoft.com/office/SharePoint-2013-Synchronize-d40638d1/sourcecode?fileId=72317&pathId=166025385
    http://www.c-sharpcorner.com/Blogs/10853/how-to-create-a-term-set-for-the-specified-group-using-clien.aspx
    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

  • 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>

  • 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]

Maybe you are looking for

  • Pension Contribution to be stoped after 58years

    Hi Experts, As per the requirement, the client wants that the pension contribution should stop automatically when the employee crosses the 58years of age. Plz suggest how to do this. regards Kunal

  • How can I locate my serial number for the Student and Teacher Edition

    All I am trying to do right now is to obtain the serial number for my Student and Teacher (Academic) Edition <removed by moderator>, but I wanted to use my personal (home) e-mail address since this purchase is to be installed on my home computer.  Th

  • Web site will not open on a Mac

    A friend has helped me to develop a simple web site in Flash which I use to manage my photo galleries, which are created with Lightroom or Photoshop. I am familiar with most of Adobe CS3 except Flash or Dreamweaver, but I can get by with just editing

  • 13" Macbook Pro or 21.5' iMac?

    Okay, I really need help deciding between a 13" MBP or an 21" iMac. I'm upgrading to a Mac from my M11x because I like the software and design of the macs. Also I mainly connect my M1x to a 22" TV cause I like the extra screen size so that's why I li

  • BAPI or FM for NCOP Transaction (To assign Cost Center to Org Unit)

    Hi, We are searching for a BAPI or any other means to assign Cost Center to Org Unit. recording  this transaction is not so useful because the screen fields are not recorded properly. Please advise if you had come across this transaction. Thanks in a