How to copy ArrayList Object in HashMap











-4















I have a task given as suppose there is a list of options a to z. A user can select any of these options so for each option if the user clicks we should have 5 columns to that specific option as a-col1,a-col2,a-col3....a-col5 and similarly for other options as well.



     ArrayList<Object> columns=
{col1,col2,col3,col4,col5};
HashMap<Integer,columns> hm=new
HashMap<Integer,columns>();
or
HashMap<Integer,Object> hm=new
HashMap<Integer,Object>();


The problem is how should i add this list columns to my Object of hashmap like



        for(int i=0;i<options.length;i++)
hm.put(i,???Object.add())
or
hm.put(i,???Object.add(columns. get()));


Cant figure so as to how to add for each index all columns value in hashmap









share















locked by Bhargav Rao Dec 15 '18 at 10:47


This post has been locked while disputes about its content are being resolved. For more info visit meta.


Read more about locked posts here.














  • 1





    I cannot vote to close, but this question needs to have something done to it. It's been through several changes that completely and radically changed its content and intent. One of those invalidated the given answers, the rest would constitute an entirely new question by themselves. The open bounty means that it cannot be voted for closure.

    – VLAZ
    Dec 14 '18 at 8:48











  • @vlaz besides being radically edited multiple times, its current state does not meet any quality standard. But this question will be closable again in a few hours…

    – Holger
    Dec 14 '18 at 14:40











  • Actually the problem is i was unable to ask any more questions so edited the same the above was the one i needed to ask as critical. I tried to delete the previous one but that din happen the reason being the question has answers in it

    – Himanshu Ahuja
    Dec 14 '18 at 16:45
















-4















I have a task given as suppose there is a list of options a to z. A user can select any of these options so for each option if the user clicks we should have 5 columns to that specific option as a-col1,a-col2,a-col3....a-col5 and similarly for other options as well.



     ArrayList<Object> columns=
{col1,col2,col3,col4,col5};
HashMap<Integer,columns> hm=new
HashMap<Integer,columns>();
or
HashMap<Integer,Object> hm=new
HashMap<Integer,Object>();


The problem is how should i add this list columns to my Object of hashmap like



        for(int i=0;i<options.length;i++)
hm.put(i,???Object.add())
or
hm.put(i,???Object.add(columns. get()));


Cant figure so as to how to add for each index all columns value in hashmap









share















locked by Bhargav Rao Dec 15 '18 at 10:47


This post has been locked while disputes about its content are being resolved. For more info visit meta.


Read more about locked posts here.














  • 1





    I cannot vote to close, but this question needs to have something done to it. It's been through several changes that completely and radically changed its content and intent. One of those invalidated the given answers, the rest would constitute an entirely new question by themselves. The open bounty means that it cannot be voted for closure.

    – VLAZ
    Dec 14 '18 at 8:48











  • @vlaz besides being radically edited multiple times, its current state does not meet any quality standard. But this question will be closable again in a few hours…

    – Holger
    Dec 14 '18 at 14:40











  • Actually the problem is i was unable to ask any more questions so edited the same the above was the one i needed to ask as critical. I tried to delete the previous one but that din happen the reason being the question has answers in it

    – Himanshu Ahuja
    Dec 14 '18 at 16:45














-4












-4








-4








I have a task given as suppose there is a list of options a to z. A user can select any of these options so for each option if the user clicks we should have 5 columns to that specific option as a-col1,a-col2,a-col3....a-col5 and similarly for other options as well.



     ArrayList<Object> columns=
{col1,col2,col3,col4,col5};
HashMap<Integer,columns> hm=new
HashMap<Integer,columns>();
or
HashMap<Integer,Object> hm=new
HashMap<Integer,Object>();


The problem is how should i add this list columns to my Object of hashmap like



        for(int i=0;i<options.length;i++)
hm.put(i,???Object.add())
or
hm.put(i,???Object.add(columns. get()));


Cant figure so as to how to add for each index all columns value in hashmap









share
















I have a task given as suppose there is a list of options a to z. A user can select any of these options so for each option if the user clicks we should have 5 columns to that specific option as a-col1,a-col2,a-col3....a-col5 and similarly for other options as well.



     ArrayList<Object> columns=
{col1,col2,col3,col4,col5};
HashMap<Integer,columns> hm=new
HashMap<Integer,columns>();
or
HashMap<Integer,Object> hm=new
HashMap<Integer,Object>();


The problem is how should i add this list columns to my Object of hashmap like



        for(int i=0;i<options.length;i++)
hm.put(i,???Object.add())
or
hm.put(i,???Object.add(columns. get()));


Cant figure so as to how to add for each index all columns value in hashmap







java collections hashmap





share














share












share



share








edited Dec 15 '18 at 10:47









Bhargav Rao

30.6k2091113




30.6k2091113










asked Nov 9 '18 at 16:34









Himanshu AhujaHimanshu Ahuja

8582217




8582217




locked by Bhargav Rao Dec 15 '18 at 10:47


This post has been locked while disputes about its content are being resolved. For more info visit meta.


Read more about locked posts here.









locked by Bhargav Rao Dec 15 '18 at 10:47


This post has been locked while disputes about its content are being resolved. For more info visit meta.


Read more about locked posts here.










  • 1





    I cannot vote to close, but this question needs to have something done to it. It's been through several changes that completely and radically changed its content and intent. One of those invalidated the given answers, the rest would constitute an entirely new question by themselves. The open bounty means that it cannot be voted for closure.

    – VLAZ
    Dec 14 '18 at 8:48











  • @vlaz besides being radically edited multiple times, its current state does not meet any quality standard. But this question will be closable again in a few hours…

    – Holger
    Dec 14 '18 at 14:40











  • Actually the problem is i was unable to ask any more questions so edited the same the above was the one i needed to ask as critical. I tried to delete the previous one but that din happen the reason being the question has answers in it

    – Himanshu Ahuja
    Dec 14 '18 at 16:45














  • 1





    I cannot vote to close, but this question needs to have something done to it. It's been through several changes that completely and radically changed its content and intent. One of those invalidated the given answers, the rest would constitute an entirely new question by themselves. The open bounty means that it cannot be voted for closure.

    – VLAZ
    Dec 14 '18 at 8:48











  • @vlaz besides being radically edited multiple times, its current state does not meet any quality standard. But this question will be closable again in a few hours…

    – Holger
    Dec 14 '18 at 14:40











  • Actually the problem is i was unable to ask any more questions so edited the same the above was the one i needed to ask as critical. I tried to delete the previous one but that din happen the reason being the question has answers in it

    – Himanshu Ahuja
    Dec 14 '18 at 16:45








1




1





I cannot vote to close, but this question needs to have something done to it. It's been through several changes that completely and radically changed its content and intent. One of those invalidated the given answers, the rest would constitute an entirely new question by themselves. The open bounty means that it cannot be voted for closure.

– VLAZ
Dec 14 '18 at 8:48





I cannot vote to close, but this question needs to have something done to it. It's been through several changes that completely and radically changed its content and intent. One of those invalidated the given answers, the rest would constitute an entirely new question by themselves. The open bounty means that it cannot be voted for closure.

– VLAZ
Dec 14 '18 at 8:48













@vlaz besides being radically edited multiple times, its current state does not meet any quality standard. But this question will be closable again in a few hours…

– Holger
Dec 14 '18 at 14:40





@vlaz besides being radically edited multiple times, its current state does not meet any quality standard. But this question will be closable again in a few hours…

– Holger
Dec 14 '18 at 14:40













Actually the problem is i was unable to ask any more questions so edited the same the above was the one i needed to ask as critical. I tried to delete the previous one but that din happen the reason being the question has answers in it

– Himanshu Ahuja
Dec 14 '18 at 16:45





Actually the problem is i was unable to ask any more questions so edited the same the above was the one i needed to ask as critical. I tried to delete the previous one but that din happen the reason being the question has answers in it

– Himanshu Ahuja
Dec 14 '18 at 16:45












2 Answers
2






active

oldest

votes


















0














By default Informatica only stores latest session log. To save session logs for each run, you will have to configure it at the session properties in Workflow manager.





share
























  • Unfortunately multiple overwrites is one of the most effective ways of shredding data - some of the most popular shredding tools do the same thing

    – Daniel Machet
    Nov 10 '18 at 8:40





















0














Edit the session -> Properties tab within the workflow there is the option to save logs by session runs or session timestamp. If you save by timestamp then every run gets saved with the timestamp as part of its name so never gets overwritten. If you choose session runs then there will be a specifiable number of rotating logfiles with the number itself part of the log name (the number being set by the number of runs setting). Most likely you have your logs set to session runs and number of runs set to 0 change it to 60 for 60 days worth of self rotating logs).





share


























  • What's gone is gone... to plan for the future you have to set thos so you're not in the same situation months down tge line. Set to timestamp if you want to store indefinitely or session runs if you want to overwrite the oldest logfile.Set Number of runs to define how many logfiles to keep at anyone time when you choose this setting.

    – Daniel Machet
    Nov 25 '18 at 16:47


















2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














By default Informatica only stores latest session log. To save session logs for each run, you will have to configure it at the session properties in Workflow manager.





share
























  • Unfortunately multiple overwrites is one of the most effective ways of shredding data - some of the most popular shredding tools do the same thing

    – Daniel Machet
    Nov 10 '18 at 8:40


















0














By default Informatica only stores latest session log. To save session logs for each run, you will have to configure it at the session properties in Workflow manager.





share
























  • Unfortunately multiple overwrites is one of the most effective ways of shredding data - some of the most popular shredding tools do the same thing

    – Daniel Machet
    Nov 10 '18 at 8:40
















0












0








0







By default Informatica only stores latest session log. To save session logs for each run, you will have to configure it at the session properties in Workflow manager.





share













By default Informatica only stores latest session log. To save session logs for each run, you will have to configure it at the session properties in Workflow manager.






share











share


share










answered Nov 9 '18 at 17:41









SamikSamik

2,75511520




2,75511520













  • Unfortunately multiple overwrites is one of the most effective ways of shredding data - some of the most popular shredding tools do the same thing

    – Daniel Machet
    Nov 10 '18 at 8:40





















  • Unfortunately multiple overwrites is one of the most effective ways of shredding data - some of the most popular shredding tools do the same thing

    – Daniel Machet
    Nov 10 '18 at 8:40



















Unfortunately multiple overwrites is one of the most effective ways of shredding data - some of the most popular shredding tools do the same thing

– Daniel Machet
Nov 10 '18 at 8:40







Unfortunately multiple overwrites is one of the most effective ways of shredding data - some of the most popular shredding tools do the same thing

– Daniel Machet
Nov 10 '18 at 8:40















0














Edit the session -> Properties tab within the workflow there is the option to save logs by session runs or session timestamp. If you save by timestamp then every run gets saved with the timestamp as part of its name so never gets overwritten. If you choose session runs then there will be a specifiable number of rotating logfiles with the number itself part of the log name (the number being set by the number of runs setting). Most likely you have your logs set to session runs and number of runs set to 0 change it to 60 for 60 days worth of self rotating logs).





share


























  • What's gone is gone... to plan for the future you have to set thos so you're not in the same situation months down tge line. Set to timestamp if you want to store indefinitely or session runs if you want to overwrite the oldest logfile.Set Number of runs to define how many logfiles to keep at anyone time when you choose this setting.

    – Daniel Machet
    Nov 25 '18 at 16:47
















0














Edit the session -> Properties tab within the workflow there is the option to save logs by session runs or session timestamp. If you save by timestamp then every run gets saved with the timestamp as part of its name so never gets overwritten. If you choose session runs then there will be a specifiable number of rotating logfiles with the number itself part of the log name (the number being set by the number of runs setting). Most likely you have your logs set to session runs and number of runs set to 0 change it to 60 for 60 days worth of self rotating logs).





share


























  • What's gone is gone... to plan for the future you have to set thos so you're not in the same situation months down tge line. Set to timestamp if you want to store indefinitely or session runs if you want to overwrite the oldest logfile.Set Number of runs to define how many logfiles to keep at anyone time when you choose this setting.

    – Daniel Machet
    Nov 25 '18 at 16:47














0












0








0







Edit the session -> Properties tab within the workflow there is the option to save logs by session runs or session timestamp. If you save by timestamp then every run gets saved with the timestamp as part of its name so never gets overwritten. If you choose session runs then there will be a specifiable number of rotating logfiles with the number itself part of the log name (the number being set by the number of runs setting). Most likely you have your logs set to session runs and number of runs set to 0 change it to 60 for 60 days worth of self rotating logs).





share















Edit the session -> Properties tab within the workflow there is the option to save logs by session runs or session timestamp. If you save by timestamp then every run gets saved with the timestamp as part of its name so never gets overwritten. If you choose session runs then there will be a specifiable number of rotating logfiles with the number itself part of the log name (the number being set by the number of runs setting). Most likely you have your logs set to session runs and number of runs set to 0 change it to 60 for 60 days worth of self rotating logs).






share













share


share








edited Nov 10 '18 at 8:42

























answered Nov 10 '18 at 8:35









Daniel MachetDaniel Machet

552147




552147













  • What's gone is gone... to plan for the future you have to set thos so you're not in the same situation months down tge line. Set to timestamp if you want to store indefinitely or session runs if you want to overwrite the oldest logfile.Set Number of runs to define how many logfiles to keep at anyone time when you choose this setting.

    – Daniel Machet
    Nov 25 '18 at 16:47



















  • What's gone is gone... to plan for the future you have to set thos so you're not in the same situation months down tge line. Set to timestamp if you want to store indefinitely or session runs if you want to overwrite the oldest logfile.Set Number of runs to define how many logfiles to keep at anyone time when you choose this setting.

    – Daniel Machet
    Nov 25 '18 at 16:47

















What's gone is gone... to plan for the future you have to set thos so you're not in the same situation months down tge line. Set to timestamp if you want to store indefinitely or session runs if you want to overwrite the oldest logfile.Set Number of runs to define how many logfiles to keep at anyone time when you choose this setting.

– Daniel Machet
Nov 25 '18 at 16:47





What's gone is gone... to plan for the future you have to set thos so you're not in the same situation months down tge line. Set to timestamp if you want to store indefinitely or session runs if you want to overwrite the oldest logfile.Set Number of runs to define how many logfiles to keep at anyone time when you choose this setting.

– Daniel Machet
Nov 25 '18 at 16:47



Popular posts from this blog

Wiesbaden

Marschland

Dieringhausen