HashMap order in a file

Hi all
Until now in my program i use a HashMap collection to store my objects. The problem i have now is that the objects are too many (over 1.000.000) so keeping them in memory in a hashmap collection is impossible. So the solution (?) is to keep them in a file and retrieve the objects i want from the file directly, but i would like to have the ability to retrieve information from the file in constant time as before. Is that possible, can somehow have a hashmap in the file? If yes can you tell me how or post a link with information?
thank you in advance

Pitelk wrote:
Hi all
Until now in my program i use a HashMap collection to store my objects. The problem i have now is that the objects are too many (over 1.000.000) so keeping them in memory in a hashmap collection is impossible. Not necessarily. Have you tried, or are you assuming?
So the solution (?) is to keep them in a file and retrieve the objects i want from the file directly, but i would like to have the ability to retrieve information from the file in constant time as before. Is that possible, can somehow have a hashmap in the file? If yes can you tell me how or post a link with information? If keeping your objects in memory is unwieldy or impossible, and you want to retrieve them randomly by some key, then you probably want a database. There's one included with the JDK download, or you can download a few one like Postgres or MySQL.

Similar Messages

  • Load Sales Order from Xml file

    Hi,
    I want to load a sales order from xml file. How can I do so? Where I'll get the xml schema for Sales Order or other documents (delivery,invoice etc)?
    Plz reply with code and xml file.

    When I'm going to load SO from xml file, it's showing an error:
    "The connected value 0 was not found in table Uasge of Nota Fiscal".
    What is this table for? Which attribute is related with this table?
    How can I find out that?

  • I want to load a sales order from xml file. How can I do.

    Hi,
    I want to load a sales order from XML  file. How can I do ? how can i create the sales order?
    what are the necessary  setting for  create the sales orders.
    with Regards,
    Prakesh.

    Three options come to my mind.
    Option 1: Use SAP transaction SXDA_TOOLS (Object Type BUS2032), Program Type (BAPI) and Program (CREATEFROMDAT2).
    Option 2: Use SAP transaction SXDA_TOOLS (Object Type BUS2032), Program Type (DINP) and Program (RVINVB10).
    Option 3: Translate the xml to IDoc so that ORDER04 / ORDER05 Idoc can be used to create Sales order (WEDI transaction).

  • Update purchase Order using offline file

    Hi Experts
    How to create and update purchase Order using offline file. How to execute offline API from program in batch ?

    Hi Experts
    How to create and update purchase Order using offline file. How to execute offline API from program in batch ?

  • Importing data for tuple changes the order from source file - please help

    Hi all:
    I am using MDM 7.1 with the new tuple functionality. I have to import some product texts in a specific order. Tuples is working fine, the only issue is that it changes the order of the rows when importing from Excel.  Let's say I have product number
    A123, Text 1
    A123, Text 2
    A123, Text 3
    When importing in MDM I get:
    A123, Text 2
    A123, text 3
    A123, Text 1
    It is changing the order in which records are from source Excel file. Any ideas on how to force it to import in the same order as source file?
    Thanks,
    -Arturo Blasi.

    import java.util.*;
    import java.io.*;
    Student Name: Qiang Wu
    Student Number: 205722913
    public class Check05C
         public static void main(String[] args) throws IOException
              Scanner input = new Scanner(System.in);
              PrintStream output = System.out;
              output.print("Please enter filename...");
              File MarkFile = new File(input.nextLine());
              Scanner fileinput = new Scanner(MarkFile);
              double average;
              int maxmark = 0;
              int minmark = 100;
              int sum = 0;
              for (int score = fileinput.nextInt(); fileinput.hasNextInt(); score = fileinput.nextInt())
                   sum = sum + score;
                   if (score >= maxmark)
                        maxmark = score;
                   else if (score <= minmark)
                        minmark = score;
              average = (maxmark + minmark) / 2;
              output.println("Class Average is: " + average);
              output.println("Maximum mark is: " + maxmark);
              output.println("Minimum mark is: " + minmark);
              fileinput.close();
    }: ) I still cant figure out how to modify.

  • Aperture performs adjustments in a different order depending on file type

    Aperture performs Adjustments in a different order depending on file type.
    Here's an example:
    Starting with two copies of an image, one in RAW format (Canon CRW from a D60), the other in TIFF (opened the .crw file in Preview and exported an 8bit tiff file).
    {The test image is a photo of my copy of Aperture on the floor of my studio (which, for reference, is a few points of Cyan off of a neutral grey).}
    The original Image.
    http://members.arstechnica.com/x/adrien/testRAW_originalImage.jpg
    Adjustments
    http://members.arstechnica.com/x/adrien/adjustments.jpg
    The RAW file adjusted
    http://members.arstechnica.com/x/adrien/testRAW_adjusted.jpg
    The TIFF files adjusted
    http://members.arstechnica.com/x/adrien/testTIFF_adjusted.jpg
    Import both of these files (testRAW.crw & testTIFF.tiff) into Aperture.
    Make adjustments to the RAW and TIFF images:
    - Exposure: Saturation -> 0 (lowest possible value).
    - White Balance: Temp -> 3500K (from 5000K).
    It doesn't matter what order you perform these operations in.
    The RAW file is now a neutral greyscale image. With the Saturation set to 0, the White Balance makes no major difference in the image, it stays grey.
    The TIFF file, however, is now a blue tinted greyscale image - much like a sepia-tone effect. Moving the White Balance slider changes the color of the image.
    It appears that Aperture is performing the Saturation and WB operations in a different order: for the RAW file it first performs the WB, then the saturation; while in the TIFF file it performs the saturation first, then the WB.
    The result is the same for a JPEG image.
    The RAW behavior is the 'expected' behavior in photography - White Balance should happen 'before' the Saturation setting.
    I've filed the bug with Apple (number 4394125 at bugreport.apple.com). hopefully they'll fix this.
    Cross posted from this discussion at the MacAch on ArsTechnica forums:
    http://episteme.arstechnica.com/groupee/forums/a/tpc/f/8300945231/m/893007866731 /r/832001796731#832001796731

    Well, there are different ways of achieving this.
    Solution 1:
    You can create a new output type which will be triggered and call a same driver program and the new smart form. I am sure you can customize as to what Purchasing document type will trigger which output type. Get in touch with someone in the function team to get this configured.
    Solution 2:
    No Customizing, let the configuration be the same, but in the driver program change the value of  "TNAPR-FONAM" immediately after the form entry_neu to the new form name based on the Purchasing document type.

  • [svn] 3638: Changing the build order of swc file update with dita xml files .

    Revision: 3638
    Author: [email protected]
    Date: 2008-10-14 16:49:56 -0700 (Tue, 14 Oct 2008)
    Log Message:
    Changing the build order of swc file update with dita xml files.
    By default this would now happen during the checkintests target - so "ant clean main" shouldn't get affected.
    To opt out use -Dno.doc=true
    QA: No
    Doc: No
    Tests: checkintests
    Modified Paths:
    flex/sdk/trunk/build.xml
    flex/sdk/trunk/frameworks/build.xml
    flex/sdk/trunk/frameworks/projects/airframework/build.xml
    flex/sdk/trunk/frameworks/projects/flash-integration/build.xml
    flex/sdk/trunk/frameworks/projects/flex/build.xml
    flex/sdk/trunk/frameworks/projects/flex4/build.xml
    flex/sdk/trunk/frameworks/projects/framework/build.xml
    flex/sdk/trunk/frameworks/projects/haloclassic/build.xml
    flex/sdk/trunk/frameworks/projects/rpc/build.xml
    flex/sdk/trunk/frameworks/projects/utilities/build.xml

    Revision: 3638
    Author: [email protected]
    Date: 2008-10-14 16:49:56 -0700 (Tue, 14 Oct 2008)
    Log Message:
    Changing the build order of swc file update with dita xml files.
    By default this would now happen during the checkintests target - so "ant clean main" shouldn't get affected.
    To opt out use -Dno.doc=true
    QA: No
    Doc: No
    Tests: checkintests
    Modified Paths:
    flex/sdk/trunk/build.xml
    flex/sdk/trunk/frameworks/build.xml
    flex/sdk/trunk/frameworks/projects/airframework/build.xml
    flex/sdk/trunk/frameworks/projects/flash-integration/build.xml
    flex/sdk/trunk/frameworks/projects/flex/build.xml
    flex/sdk/trunk/frameworks/projects/flex4/build.xml
    flex/sdk/trunk/frameworks/projects/framework/build.xml
    flex/sdk/trunk/frameworks/projects/haloclassic/build.xml
    flex/sdk/trunk/frameworks/projects/rpc/build.xml
    flex/sdk/trunk/frameworks/projects/utilities/build.xml

  • Fusion Order Demo zip file which works with JDeveloper 11.1.1.3.0

    Hi,
    Please can anyone tell me where to find the Fusion Order Demo zip file that will work with JDeveloper 11.1.1.3.0 (latest version 13/5/10).
    I have downloade OracleXE 10g for Windows on my laptop and now want to create the Fusion Schemas (Tables/Schemas/Procedures etc) for the Demos.
    I have downloaded FOD_11.zip, FusionOrderDemo_R1.zip and tryed the instructiion for running Fusion Order Demo here http://www.oracle.com/technology/documentation/jdev.html but each time I get the error
    "oracle.javacache_11.1.1 not found"
    How can I fix this?
    I want to learn Jdeveloper works and use it for Logical and Physical Schema mapping....
    Thanks
    BP

    Hey John,
    Thanks for the quick reply, and yes sir, I did follow those instructions.
    Let me describe what all I have done so far, maybe someone can figure out where I need to fix anything:
    I installed JDeveloper version 11.1.1.3.0, which came with its own WebLogic server, on my windows xp professional OS on my laptop.
    I then downloaded the zip file, FusionOrderDemo_R1PS2.zip.
    I encountered a problem while unzipping the file, where it was asking me some password for a few files, but Lynn from Oracle helped me figure that out....i had to use 7-zip utility to uninstall....windows default built-in unzip utility does not work.
    After unzipping all files, I followed the instructions given on http://www.oracle.com/technetwork/developer-tools/jdev/index-095536.html to import, build and run the application....
    And now when it runs....it just open my browser window (IE 7), and shows a "loading..." image in the center of the page....nothing happens after that.
    Any idea what might be missing?
    a few major errors I see in the wls log window of jdeveloper are:
    1) <DCBindingContainer><reportException> [3952] oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.sql.SQLDataException, msg=ORA-01882: timezone region not found
    2) <DCBindingContainer><reportException> [3958] oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=null
    3) <UIXInclude><tearDownVisitingContext> Tear down of include component context failed due to an unhandled exception.java.util.NoSuchElementException
    Please help!
    Regards,
    Hemant

  • How to organize the orders of audio files in ipod?

    Hey guys, I'm having a problem in organizing the audio files on my ipod, I wish you could help me out. I transferred some language lessons to my ipod, however they are not in order. If they are just songs it's OK, but for language lessons you really want them to be in order. Anybody can teach me how to arrange the order of audio files on ipod? Thanks a lot!
    ipod video 30GB

    Thanks for the reply, Chris. Are you talking about how to change the file name on itune or on ipod? I couldn't find the way to edit any info of the audio files on itune. And the file names were already in order (i.e. French001,French002...) but they appear on itune & ipod in different order.
    Thanks again.

  • Is it possible to  change the order of the files from the newest to the oldest ?

    is it possible to  change the order of the files from the newest to the oldest ?

    View->Sort, or use the A/Z icon on the Toolbar at the bottom of the grid (press T if it isn't showing)

  • Order of the File.listFiles()

    Hello,
    We have the following code in our application, every thing was working fine until we upgraded our server infrastructure to VMWare 5.
    Once our server were moved to VMWare 5, the order of the files in "allFiles" changed which is resulting in failure in the code that follows this.
    *File baseFolder = new File(folderName);
    File[] allFiles = baseFolder.listFiles(new JARFilter());
    JarFile jarfile = null;
    for(int i=0; i<allFiles.length; ++i)
         System.out.println("The class File found in " + allFiles);
    I agree that we shouldn't have written our code in such a way that it would depend on the order of the files in the "allFiles", that is a very bad code, but what is done is done :(
    We are in to production now and we can't even change the code, is there any way we can do to resolve this may a JVM args that would change the order or some thing on the OS level.
    Thanks

    Java isn't doing this to you, the operating system, file system, maybe VMWare, is. You won't find a solution at the Java end. You'll have to fix your code or undo the VMWare upgrade.

  • Changing page order within a file

    Just suscribed to PDF Pack, can I change page order within a file?  TIA

    Hi realestateguy,
    If you're using the Combine Files functionality in PDF Pack to combine multiple files into a single PDF, you can determine which order the files appear in the PDF. (Just select the files to combine, and then drag them into the order you want them to appear in the PDF.) However, if you're creating a single PDF, you need Acrobat to reorder the pages.
    I hope this helps.
    Best,
    Sara

  • Ordering the output file

    Is there a way to order the output files so the pieces come out in order by pallet so we don't get zero pallets in the middle of our container and address files?
    Thanks.

    Bill,
    You may want to take a look at Mailflow in Presort.  I think the below steps may give you the results you are looking for...
    VIEWS:
    1. Open presort job
    2. Double-click Execution options
    3. Select Sequence by Mailflow
    4. Click OK
    5. Expand Mailflow Setup
    6. Double-click Mailflow
    7. Select Alternate Mailstream Hierarchy Seq
    8. Click OK
    9. Double-click Alternate Mailstream Hierarchy Sequence
    10. Set Presort Scheme to 1
    11. Set Segment (or Entry Point) to 2 as desired
    12. Set Entry Point (or Segment) to 3 as desired
    13. Click OK
    JOBFILE:
    1. Open .pst in an editor
    2. Go to the Execution block
    3. Set the parameter + Sequence Output by Mailflow (Y/N) to Y
    4. Go to the Mailflow block (if block is not available, copy it from master.pst)
    5. Set the parameter Use Alt Mailstream Hierarchy Seq (Y/N) to yes
    6. Go to the Alternate Mailstream Hierarchy Sequence block (if block is not available, copy it from master.pst)
    7. Set Presort Scheme to 1
    8. Set Segment (or Entry Point) to 2 as desired
    9. Set Entry Point (or Segment) to 3 as desired
    Thanks,
    Kendra

  • I had to put my computer by together without migration or time machine I NEED help with order of the files?

    I had to put my computer by together without migration or time machine I NEED help with order of the files?

    Hi, where are these other files exactly?

  • TS2512 i m trying to convert dpx files to mov in colour 1.5.3 but in file browser files are not seen in proper order for ex files names are 12345 it is coming as 23145 bcoz of which in output also its coming in wrong order

    i m trying to convert dpx files to mov in colour 1.5.3 but in file browser files are not seen in proper order for ex files names are 12345 it is coming as 23145 bcoz of which in output also its coming in wrong order

    1) What you downloaded should be a packed file (zip, tar.gz, etc) that needs to be unpacked into the directory of your choice.
    2) & 3) are answered by Ant's installation documentation (the page you're quoting from):
    http://ant.apache.org/manual/index.html

Maybe you are looking for

  • IPod nano 4th gen says "Attempitng to copy to Cesar's IPO failed, disk could not be read from or written to." what do I do?

    Itunes froze completely, tried the task manager but to no avail. Resorted to hard rebooting PC. iPod disks seems to have been damaged as a result, since it was syncing, I think.

  • VGA display "out of range"

    I searched through the postings, and didn't see anything quite like this. I have a new Mini Core 2 duo and an old Kogi VGA 1280x1024 @60htz monitor. The monitor works fine with my iBook G4, and worked fine with my son's Quicksilver dual 867. When I b

  • Problem after R/3 UPGRADE - IDOC

    Our r/3 systems have been upgraded. We have now in production environment the following error Transaction Canceled IDOC_ADAPTER 155 ( SAPSBP E2EDP01007 ORDERS05 ) It is working fine in dev but not in prod... I know it is not very clear as description

  • Scroller wont scroll

    This might call for me to post the code, if so let me know and I will,I have an applet that I am trying to use a scroll panel and move the scroll bar when information is added to a JEditorPane contained in the scrollpane, the text shows but the scrol

  • RFC Function Modules

    Hi Friends, Is there any transaction to see all the RFC Function Modules. How can we identify all the RFC Function Modules in SAP System. Any Transaction / Report or any Customizing Path Regards: Sridhar