Using Map and List, simple

Hi,
My prolem is very simple, but i'm beggining with java.
I have 10 key-values: "CUSTOMER_ID" , the others are not important
What is important is that I want to have different values under the same key CUSTOMER_ID
The structure should be like this:
CUSTOMER_ID 5
CUSTOMER_ID 1
CUSTOMER_ID 4
OFFICE_ID 33
SOME_KEY 10
SOME_OTHER_KEY 123
Which structure can I use?
can I use Java Map?
List?
Other?
and how to insert this values and how to load it?
Please show me simple code

Everything you need to know: The Java� Tutorial - Java� Collections Framework

Similar Messages

  • I have problem with using maps and directions.

    Hi,
    I'm using iPhone 5, I purchased before 1 year from Qatar. I have a problem with maps and direction here, I have attached error message. Please kindly inform me reason.

    The feature(s) you are looking for don't appear to be available in your country.
    See:
    http://www.apple.com/ios/feature-availability/

  • When I use maps, and search directions using the public transport, it only gives me one option.. Why cant I decide to use the train or the bus? because on this occasion its not showing me to use the tube despite this being the obvious and quickest way?

    I am trying to get directions around london using the 'maps' on the homepage, however when I ask for the directions to use public transport it isn't using the london underground? why..?

    hello, this sounds like an issue with adware present on your pc. please perform all these steps:
    # [[Reset Firefox – easily fix most problems|reset firefox]] (this will keep your bookmarks and passwords)
    # afterwards go to the firefox menu ≡ > addons > extensions and in case there are still extensions listed there, disable them.
    # finally run a full scan of your system with different security tools like the [http://www.malwarebytes.org/products/malwarebytes_free free version of malwarebytes] and [http://www.bleepingcomputer.com/download/adwcleaner/ adwcleaner] to make sure that adware isn't present in other places of your system as well.
    [[Troubleshoot Firefox issues caused by malware]]

  • Use of dsp:select with some map or list???

    Dear Friends,
    I want to use dsp:select by using map or list as the option of the given combobox using repository. Can anybody help me out to resolve my problem. Thanks to in advance.
    Regards,
    Girish Mishra

    Hi,
    You can use the below snippet.
    <dsp:select bean="YourBean.value">
    <dsp:droplet name="ForEach">
    <dsp:param name="array" param="YourList"/>
    <dsp:oparam name="output">
    <dsp:option><dsp:valueof param="element"/></dsp:option>
    </dsp:oparam>
    </dsp:droplet>
    </dsp:select>
    You have to set the list from the repository before you render this page.
    Hope this helps.
    Keep posting the updates / questions.
    Thanks,
    Gopinath Ramasamy

  • I want to use maps in jsf?its not working help needed

    Hi
    i am trying to use map and area in jsf. i added the tablib demo/coponenets but it says <d:map> is unknown tag
    do i need to add any jar file for making it work
    please guide me
    thanks in advance.

    See [[/questions/923988]]

  • Slow down of E71 when using maps.

    Hi,
        I bought E71 today and found some problem.
    My phone hangs when i use Maps and i have to take my battery out inorder to start my phone again.
       I use 2GB memory card with E71 phone.
    Lets suppose you are not connected to internet by any means (no WLAN or else) . Make sure there is memory card in the phone and some maps are already there when you used the maps application earlier.
    Now, launch Maps application.
    After sometime there is message which says " No internet connection. Try connecting to internet"
    When I press "OK" the phone hangs.
     Is this normaly seen in Nokia E71, that it hangs?
    If not, please help me in resolving the issue.
    Thanks and regards,
    Mandeep
    Message Edited by minksingh on 29-Jul-2009 09:34 AM

    Hi,
       I figured out the problem. I bought this phone from US and therefore the firmware version is 
    200.21.118
    Please carry out the following steps. 
    In the Maps option menu select internet. Then select Connect at startup. Select YES.
    Now exit Maps application. Do not connect to anytype of internet.
    Now try launching Maps application. Wait for 10 to 20 sec to get the message "Your not connected to Internet. Connect it Now". 
    Try pressing OK key or any other key for that matter. The phone hangs ...
    I don't know wheather this problem is in all kind of firmware versions or only in
    200.21.118
    Regards,
    Mandeep

  • 3G Iphone freezes in maps and directions

    My 3G iphone freezes when I use Maps and directions and when I use my camera sometimes.  Restarting helps for a short time.
    It is up to date.  Is this because Apple is not updating 3G's as often as newer phones?

    Hello Mizzrebecc,
    Congratulations on your new iPhone!  Thank you for also providing the details of the issues you are experiencing with your iPhone. 
    I recommend following these steps for issues like this (you can skip 4 because it does not relate to the issue you are experiencing):
    If a single application is not responding or stops responding when it opens, you can force it to close.
    If the device is unresponsive or if certain controls aren't working as expected, restart your device.
    If the device remains unresponsive or does not turn on (or power on),reset your device.
    If there is no video or if the screen remains black, verify that the device has enough charge to turn on:
    If you are using an iPad, ensure that it's connected to the USB Power Adapter supplied with the device.
    Let charge for at least twenty minutes, then see if it starts normally.
    If there is no image on the screen, press the Sleep/Wake button to attempt to wake the device.
    If the screen displays a red battery icon, continue charging the device until the battery is fully charged.
    If the above steps do not resolve the issue, or the if the screen remains black or shows a persistent Apple logo, try restoring with iTunes:
    Connect the device to your computer and open iTunes.
    If the device appears in iTunes, select and click Restore on the Summary pane. Learn more about restoring iOS software.
    If the device doesn't appear in iTunes, try to force the device into recovery mode, and then restore it.
    If the above steps do not resolve the issue, contact Apple.
    You can find the full article here:
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    If you get to step 5, I recommend backing up your iPhone before performing the restore:
    iOS: How to back up and restore your content
    http://support.apple.com/kb/HT1766
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Intercompany and Key Mapping Price List

    Hi expert,
    I have the Intercompany Add-ON version 2.0.8.30 installed on a SAP Business One 9.0 PL15 for 4 localization:
    Head Office (H000): IT
    Branch 001 (B001): FR
    Branch 002 (B002): DE
    Branch 003 (B003): CH
    This is the scenario:
    I started two weeks ago without Key Mapping the Price List because the first choice was that to use different price lists for each country.
    Now, I need to replicate the H000 price lists in new created rice List in each brench.
    We created new Price lists named "ZZ IT 01", "ZZ IT 02" and so on and we Key Mapped them.
    Here the screenshot for Key Mapping:
    Problem is that:
    NO REPLICATION APPENS!
    The Mapping was created 1 week ago but NO syncronization appened...
    So, the question is: How I can syncronize the Price Lists?
    thanks in advance,
    Jonny Cortonicchi

    Hi ,
    In ABAP API also you can retrieve key mapping of main table records using function 'MDM_API_RETR_CLIENT_SYS_KEYS'.
    You will get details of this function in sap library or ABAP API documentation provided by SAP.
    For any further queries kindly reply.
    Regards,
    Neethu Joy

  • Help me please : Serious problems with collection-mapping, list-mapping and map-mappi

    Hi everybody;
    I have serious problems with list-mapping, collection-mapping and map-mapping.
    Acording to specifications and requirements in a system I am working on it is needed to
    get a "list" of values or an indivudual value.I am working with ORACLE 9i Database,
    ORACLE 9i AS and ORACLE 9i JDEVELOPER.
    I tried to map a master-detail relationship in an entity-bean, using list-mapping.
    And this was very useful in order to get a "list" of details, ...but, when I wanted
    to get a single value I have some problems with persistence, something about "saving a state"
    despite I just want to get the value of a single detail.
    I decided to change it to map-mapping and the problem related with a single detail
    worked successfully, but I can get access to the whole bunch of details.
    May anyone of you help me with that?
    I am very confused I do not know what to do.
    Have any of you a solution for that problem?
    Thank you very much.

    Have you tried a restore in iTunes?

  • [svn:osmf:] 13042: Fix for FM-287, reinstating the main sample ( that uses serial and parallel composition), and making another pass at  getting all the changed trait methods mapped correctly back- and forth between JS and Flash .

    Revision: 13042
    Revision: 13042
    Author:   [email protected]
    Date:     2009-12-17 03:45:27 -0800 (Thu, 17 Dec 2009)
    Log Message:
    Fix for FM-287, reinstating the main sample (that uses serial and parallel composition), and making another pass at  getting all the changed trait methods mapped correctly back- and forth between JS and Flash.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-287
    Modified Paths:
        osmf/trunk/apps/samples/framework/HTMLGatewaySample/HTMLGatewaySample.as
        osmf/trunk/apps/samples/framework/HTMLGatewaySample/html-template/index.template.html
        osmf/trunk/framework/MediaFramework/org/osmf/external/HTMLElement.as
        osmf/trunk/framework/MediaFramework/org/osmf/gateways/HTMLGateway.as

    Perre wrote:I'm used to being able to pick one or a couple of songs and then adding it a specified playlist. Is this impossible in sonata?
    It's clearly not impossible, just different than you expect. Create your playlist as you want it to appear in the Current tab (meaning don't dump every single song from your library in there, just the ones you want) and then save the playlist.
    Perre wrote:And if I try to play the m3u file created (the one with every song listed) through freevo I get a message that the directory is empty. What am I doing wrong??
    Look at save_absolute_paths_in_playlists in your mpd.conf.

  • Using MAP on networks with AIX and Oracle

    Im new to MAP. We have an environment with Windows and AIX hosts which i want to use MAP on. I see plenty of references to MAP being compatable with Linux and even HP-UX.  But will it also discover AIX hosts too?  In particular, Oracle databases
    on AIX?  Thanks!!

    Some distros of Linux and HP-UX for UNIX are what is supported, but it may be possible for MAP to inventory AIX, but no guarantees. For Oracle, when MAP inventories a Linux/UNIX machine, it queries for the RPM and DPKG installations then looks for ‘Oracle’
    in the vendor attribute. Any application that is not listed in either of those queries is not discovered by MAP.
    Therefore, if Oracle was installed by some other means then it is unlikely to be discovered through this method. Admittedly, I have almost no knowledge of how these services work and if they register software or something else.
    Please remember to click "Mark as Answer" on the post that helps you, and to click
    "Unmark as Answer" if a marked post does not actually answer your question. Please
    VOTE as HELPFUL if the post helps you. This can be beneficial to other community members reading the thread.

  • Problem with Thunderbird email: When I send email using a mailing list, with my email included in the list, the message shows up in my Sent list and others rece

    Problem with Thunderbird email:
    When I send email using a mailing list, with my email included in the list, the message shows up in my Sent list and others receive it but it does not come to my email Inbox. The same problem occurs when I send the email to the mailing list addresses individually. When I send a simple test message to myself, I do receive it in my Inbox. Can you help me??
    Bob Greenman

    Are you using either cc or bcc? Is googlemail involved? Some email providers suppress cc's and bcc's to oneself since you will have a copy in your Sent folder.

  • Using an array list as a hash map value

    Hi,
    I have an object which has a "properties" field, which contains certain data for that object.
    Most of the time the key/values are both Strings, but in at least one instance, the key is a string, the value needs to be an array list.
    The Map is declared as HashMap<String, Object>
    when I populate the map, and then attempt to retrieve its value, it seems to work correctly.
    But when I try to retrieve the arrayList from another object, using its getter, it doesn't work,
    IOW, if I have code like this:
    // object created from outside the class where the map is populated
    ExampleObject eo = new exampleObject();
    eo.getProperties.get("string value that is a key for the map. ");
    // if I try to determine the class the value is,
    System.out.println("class: " + eo.getProperties,get("string value that is a key for the map. ").getClass());
    // the code above indicates the object is a string. I googled and found a suggestion on this forum, that instead of making the map value an arrayList, I should create an object that contains an array list as a field, and then use that new object as the map value. I tried that and had the same problem.
    any idea what I'm doing wrong? Hope that's clear...
    thanks!!
    bp
    Edited by: badperson on Aug 13, 2008 9:38 AM

    threw this together and it worked fine, so something else is screwed up in my code.
    import java.util.*;
    public class MapTester {
         private HashMap<String, Object> testMap;
         private ArrayList testList;
         public ArrayList<String> createList(String listName){
              System.out.println("creating list");
              testList = new ArrayList<String>();
              testList.add(listName + " line one");
              testList.add(listName + " line two");
              testList.add(listName + " line three");
              return testList;
         public HashMap<String, Object> createMap(String key, Object value){
              System.out.println("populating map");
              testMap = new HashMap<String, Object>();
              testMap.put(key, value);
              return testMap;
         public static void main(String[] args){
              MapTester mapTester = new MapTester();
              mapTester.createList("List 1");
              mapTester.createMap("listKey", mapTester.getTestList());
              System.out.println("retrieving arrayList");
              System.out.println("map value is type: " + mapTester.getTestMap().get("listKey").getClass());
         public ArrayList getTestList() {
              return testList;
         public HashMap<String, Object> getTestMap() {
              return testMap;
    }thanks for the replies
    bp

  • Custom Map in flash using XML data for dynamic map and point of intrest loading...

    Been some time since I have used Flash for anything...
    I'm working on a little project to dynamically build a map
    and set points of interest on the map. At this time I have the
    (mySQL) data being queried and formatted with PHP and pushing the
    data to Flash as XML.
    In starting the project I'm a bit lost... I mean I have my
    data and a good XML format but as it is I'm lost on parsing the
    data in Flash and assigning its values to movie clips or other...
    I've looked at the Loader Component and the XML Connector
    Component and find I can get that to work at all...
    My second though was to create a single movie clip on stage
    and give it an instance name of "Background" and have it load the
    URL of an image given in the attached XML doc... Node "a_zone" and
    the value given to attribute "image"... But this brings me back to
    square one of not quite understanding Flash and parsing XML... With
    this second idea I would use AS to create a movie clip, set it's X
    & Y cords and load an image to it based on the XML attributes
    listed in the "Gatherable" node (one for each node).
    Any suggestions, examples or related info is welcome...
    Thanks in advance!

    Okay, that really wasn't what I was looking for... But I did
    go back and RTM :-)
    Here's what I have... 1st frame:
    2nd Layer: movieclip with the instance name "currentPicture"
    The image loads into "currentPicture" from the URL given in
    the XML "a_zone" node attribute "image" just fine....
    But I'm not able to grab the attributes of each "Gatherable"
    node it seems... am I missing something or just not pointing to the
    right node?
    I keep getting:
    undefined
    undefined
    undefined
    Error opening URL
    "file:///C|/apache2triad/htdocs/gatherer/flash/undefined"
    Error opening URL
    "file:///C|/apache2triad/htdocs/gatherer/flash/undefined"
    Error opening URL
    "file:///C|/apache2triad/htdocs/gatherer/flash/undefined"

  • Any tutorials on creating a simple Login using Mysql and sessions?

    Hey guys. I cannot seem to find any information(online) or books that cover sessions in JSF and how to do a simple log in. I can get the application to query a mysql table and check the credentials and go to the next page, but I'm not sure how to make that page locked from non authorized access. I am very familiar with PHP and using it to create database driven applications. It's very straightforward, making safe logins using mysql, and creating sessions once the user has logged in(making pages locked unless the user is logged in, etc).. I have the core java server faces book but it's a joke. I feel like its an incomplete book. It merely skims a topic, and when you think it's going to get interesting it moves on to something else. It teaches basic stuff but nothing of what I want to do(or need to do). The older Javaserver faces book that came out in 2004 from O'Reilly doesn't seem to help either. I'm just wondering where people learn JSF at. I know Java, I would say pretty well as far as desktop applications go. I really like the way JSF is layed out and would really like to use it in my next project. At the level I know it now it's perfect for static web pages with no dynamic information.(but I could use plain html for that). Thanks for all your help.

    dothedru22 wrote:
    but I'm not sure how to make that page locked from non authorized access.You can use a Filter for that. Map the filter on the desired url-pattern and write doFilter() logic which checks if the user is logged in (basically: if there is an User object in the HttpSession) and handle accordingly (chain.doFilter() on success or response.sendRedirect on fail).
    and creating sessions once the user has logged in(making pages locked unless the user is logged in, etc).. The HttpSession is backed by a cookie (as is PHP's $_SESSION, did you know that?), you don't need to do any low-level stuff with cookies. Maybe at highest if you ever want a "remember me on this computer" option.
    booksThe mentioned books learns you the JSF basics. They doesn't really learn the best practices / practical use cases. There you have other resources for (or just practical experiences). Besides, I recommend you to go get a book which covers JSF 1.2 or newer. The mentioned ones are outdated, as is everything else older dan two years in the programming world.

Maybe you are looking for