please any one help,its very urgent.I need to store one table in an object (collection) then want to retrieve. so i have confusion which is the best method to use whether list,map,set........ etc and my table values are upto 11 records.
You haven't given much background to help anyone pick the rigt answer, but, in general, if the columns are of various types, then you would be pretty safe with creating a class to represent one row (instance variables for each column) then having an ArrayList of those instances to represent all the records.
Of course it's highly possible that something you didn't mention in your post could completely change that answer...
I should have onetime server hit to get db values and populate to a static map(that should be used as a cache for client side validations).
But the value should not be a VO,what is teh other ways to implement this instead of using a VO.
i clear with my quesion...................................any one help me to solve this.....................
Yeah, I was given this task two weeks ago, but didn't bother until five minutes before the deadline.
so I think it's clear why we don't all jump to the occasion of doing your job for you.
first thing you do: check your coursenotes, or online, what the differences, advantages/disadvantages are between the different implementations. then, you compare that to your needs.
the next thing to do is, to implement the one you would benefit of.
Maybe this means that it has to be implemented just using standard Collection classes, with no custom-written VO/DTO classes? (?)
In which case maybe:
Store each record in a HashMap with column names as the keys and the data as values, then put all those into an ArrayList?
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.