Store information and only retrieve unique information.

im supposed to retrieve org_id and store it into array list.. and then i want to make sure that only unique org_id are retrieved so that only unique org_id are displayed in the table.
however, when i tried to store the org_id inside arraylist.
ArrayList list = new ArrayList();
list.add(o.getORG_ID());
it says "unchecked or unsafe operations"
and i dont know how to compare whether the org_id is unique or not.
can anyone help me on this =)
thanks!
Message was edited by:
KarenCW

im sorry..im not familiar with neither HashSet nor Tree..
care to give direction?
oh,btw, im using netbeans. so im not sure whether the code can be used. =)
appreciate ur code.

Similar Messages

  • Create Custom List, store information and display the information on web part

    Hi,
    Working on a Custom visual web part in sharepoint 2010. Scenario is i would like to have two button on that web part, one is "I read it " button for users to tag the page and another one is "find the list of people who already tag/read that
    page". i have added a visual web part into my project and two buttons event within it. Now goal is once user click on "I read it button" it will create custom list to store urls and usersname. When click on "Find the list of people"
    get the username only for that specific page whoever read/tag it.
    1. How can i create the custom list to store all users information
    2. Retrieve the information from Custom List and Display the list of people based on specific page url who ever read/tag that page. 
    Any help will be greatly appreciated!

    Appreciated for your help!
    List has four columns Title, Hyperlink, Created by, and created. i just wanted to display Users and hyperlink column. i tried to retrieve the items from list but query is not returning any items and displaying. As you said in CAML query we can pass the page
    url to get the collection of user for that particular page. but is not something will be hard coded value, if we pass the page url into CAML query? is there something we can dynamically retrieve the users based on page url.  for example, if users visits
    30 different page url, i need to put all those urls into CAML Query. do i need to create custom user field or i can use Created by field to get the users? please correct me if i am wrong. Below is the code:
    using System;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.WebControls;
    using System.Data;
    namespace CustomUserControl.VisualWebPart1
        public partial class VisualWebPart1UserControl : UserControl
            protected void Page_Load(object sender, EventArgs e)
            protected void btnRead_Click(object sender, EventArgs e)
                using (SPSite site = new SPSite(SPContext.Current.Web.Site.ID))
                    using (SPWeb web = site.OpenWeb())
                        web.AllowUnsafeUpdates = true;
                        SPList list = web.Lists["UserInformation"];
                        SPListItem newItem = list.Items.Add();
                        SPFieldUrlValue hyper = new SPFieldUrlValue();
                        //hyper.Description = "Google";
                        hyper.Url = System.Web.HttpContext.Current.Request.Url.AbsoluteUri.ToString();
                        newItem["Hyperlink"] = hyper;
                        newItem.Update();
                        web.AllowUnsafeUpdates = false;
            protected void btnDisplay_Click(object sender, EventArgs e)
                SPWeb web = SPContext.Current.Web;
                SPList list = web.Lists["UserInformation"];
                SPQuery query = new SPQuery ();           
                query.Query = "<Where><Eq><FieldRef Name='Hyperlink' Type='URL' /><Value>http://nyc01d1sptmp01:8080/diligent/wiki/cft/Pages/home.aspx</Value></Eq></Where>";
                DataGrid grdList = new DataGrid();
                SPListItemCollection items = list.GetItems(query);
                DataTable table;
                table = new DataTable();
                table.Columns.Add("Title", typeof(string));
                table.Columns.Add("Hyperlink", typeof(string));
           table.Columns.Add("Created by", typeof(string));
                DataRow row;
                foreach (SPListItem result in items)
                    row = table.Rows.Add();
                    row["Title"] = result.Title;
                    row["Hyperlink"] = result.Name;
           SPFieldUser userField = (SPFieldUser)result.Fields.GetField("Users");
                    SPFieldUserValue userFieldValue = (SPFieldUserValue)userField.GetFieldValue(result["Users"].ToString());
                    SPUser user = userFieldValue.User;
                    string name = user.LoginName;
           row["Created by"] = name;
                grdList.DataSource = table.DefaultView;
                grdList.DataBind();

  • HT1918 How do I remove credit card information from my account and only use iTunes cards?

    I put my credit card information in to purchase an audiobook because I didn't have enough redeemed iTunes $...and now I'm not able to remove my credit card. I've since redeemed more iTunes cards, and iTunes won't let me use the credit on my account, it still keeps going to my credit card. HELP!

    Hi Alexis ...
    I need to change my last name and address on account.
    Help here >  How to change the name you use for your Apple ID
    I would like to remove credit card info from account and only use iTunes prepaid cards.
    Help here >  Create an iTunes App Store account without a credit card

  • I'm running OS X 10.4.11 on my PowerMac, and cannot retrieve email.  Does this have to do with iCloud?  I also cannot upgrade my operating system as my computer won't accept it.  Any information about this for me? Thank you!

    I'm running OS X 10.4.11 on my PowerMac, and cannot retrieve email.  Does this have to do with iCloud?  I also cannot upgrade my operating system as my computer won't accept it.  Any information about this for me? Thank you!

    Hi Steve,
    If this is dot mac or Mobile me you can still use IMAP eMail in the iCloud.
    Do not delete the old account yet. sign up for an iCloud account if you haven't.
    MAKE A NEW ACCOUNT - DO NOT TRY TO ALTER YOUR EXISTING ACCOUNT.
    I understand .mac mail will still come through. Do not delete the old account yet.
    You cannot use .mac or MobileMe as type of Account, you have to choose IMAP when setting up, otherwise Mail is hard coded to change imap.mail.me.com to mail.me.com & smtp.mail.me.com to smtp.me.com, no matter what you try to enter.
    iCloud Mail setup, do not choose .mac or MobileMe as type, but choose IMAP...
    On second step where it asks "Description", it has to be a unique name, but you can still use your email address.
    IMAP (Incoming Mail Server) information:
        •    Server name: imap.mail.me.com
        •    SSL Required: Yes
        •    Port: 993
        •    Username: [email protected] (use your @me.com address from your iCloud account)
        •    Password: Your iCloud password
    SMTP (outgoing mail server) information:
        •    Server name: smtp.mail.me.com
        •    SSL Required: Yes
        •    Port: 587
        •    SMTP Authentication Required: Yes
        •    Username: [email protected] (use your @me.com address from your iCloud account)
        •    Password: Your iCloud password
    Also, you must upgrade your password to meet the new criteria:  8 characters, including upper and lower case and numbers.  If you have an older password that does not meet these criteria, when you try to setup mail on your mac, using all of the IMAP criteria listed above, it will still give a server error message.  Go to   http://appleid.apple.com         then follow directions to change your password, then go back to setting up your mail using the IMAP instructions above.
    Thanks to dpepper...
    https://discussions.apple.com/thread/3867171?tstart=0

  • I have 3 PC's.  Two of them I use at 2 different locations and only use them 6 months a year.  So, if I have Icloud for my calendar, and turn on a computer that has not been used for 6 months, does all the old information on that computer to go Icloud?

    I have 3 PC's.  Two of them I use at 2 different locations and only use them 6 months each year.  When I turn on a computer that has not been used for 6 months, does all of the old information from that computer end up in Icloud?  Does Icloud push all the new calendar and contact items over the old items?

    A reset may help. Tap and hold the Home button and the On/Off buttons for approximately 10-15 seconds, until the Apple logo reappears. When the logo appears, release both buttons.
    No content is affected by this procedure.

  • A friend of my daughter's used my mac when she got her new iphone.  Now I have a new iphone and my phone has her app store information on it and I don't know how to get it off and put mine in there!

    A friend of my daughter's used my mac computer when she got her new iphone to help set it up.  Now that I have a new iphone, her apps and all the app store information is stuck on my phone.  Her app account keeps showing up when I try to install something new, and I obviously do not have her password.  How do I get this off my phone??

    Open iTunes on the computer.  Without any iPhone plugged in, go to iTunes' menu and do Store > Sign Out.
    The click the iTunes Store row on the left of the iTunes display.  You can then sign on from the signon row on the right side of the display using the correct Apple ID and password.  Then you'll be all set!

  • I brought my first generation Ipod to an apple store today and was informed that the batteries are no longer available??

    I brought my 1st Gen Ipod to an Apple Store today and was informed that batteries for this unit are no longer available. I find this totally unacceptable.
    Is there anyway that I can have the battery for this unit replaced?
    Please advise
    A.Lauro

    There are still several third party service centers out there who offer replacement services for the battery.  Google for "iPod battery replacement."
    Better yet, see if your 1G iPod Nano qualifes under Apple's 1G Nano recall regarding a batch of nanos shipped with bad batteries.  See this article for more details.
    http://www.apple.com/support/ipodnano_replacement/
    B-rock

  • Third party app. The vault anyone loose all their information and cant retrieve it? Need help lost all my info.

    Third party app The vault anyone loose all their information and cant retrieve it? Need help lost all my info.

    Contact the developer of the app.
    Restore from your backup.

  • How can I recover my account information I lost all the details and only remember my email address

    how can I recover my account information I lost all the details and only remember my email address

    https://getsupport.apple.com/Issues.action

  • APP store information

    Hello, sorry for posting in this section but i dont konw where to ask about this topic. Looking in the different app stores i saw there are some apps that aren´t avaible in some countries. For example in Costa Rica app store miss some apps that are avaible in other countries such as USA, El Salvador.
    So my question is why this situation happens and if this apps have a chance to be added to my local app store in the future. Thanks sorry for troubling

    I don't believe that the app will know anything about the App Store, when it was bought, etc. But if you're looking for a unique identifier, there is a uniqueIdentifier property in UIDevice. That is guaranteed to be unique, and works well as a key in a DB to store information about when the client last downloaded data, etc. It's also rather likely that this will be how you address phones through the coming push service.

  • I try to get log on to the itunes store, says accessing store that the screen goes white and only the apple symbols is in the top box...nothing else...WHY

    okay  i have been trying to access the itunes store from my computer and after i click the tab the words accessing itunes store scroll across screen the the screens goes white and only the apple symbols is in the box.....WHY.  Is the store down??

    Hello there jodi o,
    It sounds like you are unable to access the iTunes Store on your computer. I would recommend you use the following article to help troubleshoot that:
    Can't connect to the iTunes Store
    If the issue persists after using the info for your operating system in the above article, here is the more advanced version with further troubleshooting info:
    iTunes: Advanced iTunes Store troubleshooting
    If you are using Windows, you should also try the information in this article:
    Apple software on Windows: May see performance issues and blank iTunes Store
    Thank you for using Apple Support Communities.
    All the best,
    Sterling

  • App Store information available to apps?

    Is there anything that an application bought from the App Store will know about itself? For example:
    - Date of purchase?
    - Unique identifier to distinguish this copy of the application from other copies bought by other people?
    Since the App Store doesn't exist yet, it is possible that there is no answer to this question. On the other hand, there may just be a document hanging around somewhere that I haven't found a link to - or someone in this forum may have heard something...

    I don't believe that the app will know anything about the App Store, when it was bought, etc. But if you're looking for a unique identifier, there is a uniqueIdentifier property in UIDevice. That is guaranteed to be unique, and works well as a key in a DB to store information about when the client last downloaded data, etc. It's also rather likely that this will be how you address phones through the coming push service.

  • Document from file - how better store information about document?

    I have a text file that contains information about documents (content from groups than define the document - one row is one document). Every group content from fields (from 10 to 70 in every group). Document consist of 9 groups. In one documen can difference number of groups (> 1 group). E.g. one document can have 3 group1, 2 group6. In another document 2 group9, 1 group 6 and so on. I need to store document in DB and must edit document (by JFrame). To store document I use object MyDocument to store information about document.
    3 solutions:
    1. Store every group as list from hastables
    public class MyDocument {
       private ArrayList<Hashtable<String, String>> group1;
       private ArrayList<Hashtable<String, String>> group2;
       private ArrayList<Hashtable<String, String>> group3;
       private ArrayList<Hashtable<String, String>> group4;
       private ArrayList<Hashtable<String, String>> group5;
       private ArrayList<Hashtable<String, String>> group6;
       private ArrayList<Hashtable<String, String>> group7;
       private ArrayList<Hashtable<String, String>> group8;
       private ArrayList<Hashtable<String, String>> group9; 2. Store all groups as one list from hashtables
    public class MyDocument2 {
      private ArrayList<Hashtable<String, String>> allGroups;
    } 3. Store groups as lists consist from individual objects (MyDocumentGroup1, MyDocumentGroup2 and so on.)
    public class MyDocument3 {
       private ArrayList<MyDocumentGroup1> group1;
       private ArrayList<MyDocumentGroup2> group2;
       private ArrayList<MyDocumentGroup3> group3;
       private ArrayList<MyDocumentGroup4> group4;
       private ArrayList<MyDocumentGroup5> group5;
       private ArrayList<MyDocumentGroup6> group6;
       private ArrayList<MyDocumentGroup7> group7;
       private ArrayList<MyDocumentGroup8> group8;
       private ArrayList<MyDocumentGroup9> group9;
    public class MyDocumentGroup1 {
       private ArrayList<Hashtable<String, String>> group1;
    public class MyDocumentGroup9 {
       private ArrayList<Hashtable<String, String>> group9;
    }What solutions is better? Or maybe has another solution?

    Maybe better to store one document in ONE HashMap
    public class M2Document {
         private HashMap<String, String> data = null;in the next format:
    -------------key ---------value----------
    GroupID_FN | some value
    where, GroupID is ID of group, FN - field number
    example:
    -------------key ---------value----------
    Group1_1 | some value
    Group1_2 | some value
    Group2_1 | some value
    Group2_2 | some value
    Group3_1 | some value
    Group3_2 | some value

  • How do I remove my App store information from a Mac about to be sold

    How do I remove my App Store information from
    a Mac about to be sold ?

    Before you sell or give away your computer, in addition to the steps mentioned in this support article, take these steps:
    Run Apple Diagnostics or the Apple Hardware Test. The buyer will do this (or he should), and you don't want to be surprised by the results.
    Reset the PRAM and the SMC, which might contain personal information.
    If you set a firmware password, remove it by running Firmware Password Utility in Recovery mode.
    If you activated FileVault in OS X 10.7 or later, turn it off.
    If you use Boot Camp, the partition must be deleted.
    If you created any other data partitions on the internal drive, remove them in Disk Utility.
    Erase the data partition(s) with the option to zero out data. An SSD doesn't need to be zeroed.
    You can't legally or practically transfer any software downloaded from the Mac App Store to the new owner of the machine, even if it was free. That includes OS X, so if you upgraded to OS X 10.7 or later, you must reinstall an older OS, either from the installation media, if applicable, or by starting up in Internet Recovery mode (option-command-R at the startup chime.) If you installed from physical media, deliver those to the new owner.
    If you're selling the machine, or donating it in working order, and it originally shipped with OS X 10.4 or 10.5, then you have the option of installing either from the discs that came with it or from a retail Snow Leopard disc (which you must then transfer with the machine.) The buyer should understand that if he doesn't get the original discs from you, he won't get the bundled iLife applications or the Apple Hardware Test. Replacements for the original discs can be ordered from Apple.
    The new owner will have to redownload any software that came from the App Store, including OS X upgrades, under his or her Apple ID. If you ever updated the bundled iLife applications (Garage Band, iMovie, and iPhoto) through the App Store, you can't transfer those either.
    Remove the machine from your list of registered products. If it's still covered by an AppleCare Protection Plan, transfer the coverage to the new owner by following the instructions in the AppleCare Terms and Conditions (under the heading "Transfer of Plan.")

  • Store information on security place

    Hello All,
    I'm using some dbms_crypto for encypt/decrypt data with following code:
    create or replace FUNCTION sec_return_encrypted_data(data IN VARCHAR) RETURN RAW IS
        key VARCHAR(16) := 'A1B2C3D4E5F6G7H8';
        encryption_mode NUMBER := DBMS_CRYPTO.ENCRYPT_AES128 + DBMS_CRYPTO.CHAIN_CBC  + DBMS_CRYPTO.PAD_PKCS5;
        BEGIN           
             RETURN DBMS_CRYPTO.ENCRYPT(UTL_I18N.STRING_TO_RAW (data, 'AL32UTF8'),
               encryption_mode, UTL_I18N.STRING_TO_RAW(key, 'AL32UTF8') );
        END;
    There is some variable, which is key. I need to store it some security place. How and where to store?
    Because it not visible for developers.
    Any idea and solution?
    BR,
    Eba

    If you know what browser cookies are, you can think of flash player local storage as the same sort of thing. That is, some storage space on your computer where a website can store information until it needs it, milliseconds or weeks later. As with cookies (or pretty much any tool), flash local storage can be used for helpful or harmful purposes.
    Because there are people in the world who use flash local storage for harmful purposes (as they were already using cookies), and because flash local storage is more difficult for people to find and remove, Safari now asks you for permission before it allows a website to use it. This is the message you are seeing.
    As for how to get rid of the message, there are several possibilities, depending on what you want Safari to do instead of asking. You could just turn off Flash entirely, but then you may lose some web content you want. You can install a flash-blocker like ClickToFlash, which allows you to choose which Flash content you want to see, but you may still see that message with flash content you choose to display.
    I run a flash blocker, so I cannot advise you on what to do if you choose to leave Flash unblocked. There are probabably ways to set a default "allow" or "disallow"; I leave that discussion to others.

Maybe you are looking for