Currently i'm trying to map a csv to a java object.
The headers should be:
CID,CName,SID,SName,Country,Street,StreetNumber,ZipCode,Number,IP,type,isAdmin
The actual CSV has no headers and looks like this:
1,RINT,00001,Foo,Bar,Street,1,1010,1,10.1.2.1,typeR,1
1,RINT,00001,Foo,Bar,Street,1,1010,2,10.1.2.2,typeL,0
1,RINT,00001,Foo,Bar,Street,1,1010,3,10.1.2.3,typeL,0
1,RINT,00001,Foo,Bar,Street,1,1010,4,10.1.2.4,typeL,0
2,RANT,00002,Foo,Bar,Street,2,1011,1,10.1.2.1,typeR,1
2,RANT,00002,Foo,Bar,Street,2,1011,2,10.1.2.2,typeL,0
2,RANT,00002,Foo,Bar,Street,2,1011,3,10.1.2.3,typeL,0
2,RANT,00002,Foo,Bar,Street,2,1011,4,10.1.2.4,typeL,0
While i have found out that i could map this with this. Ofc I'd first need a class called Sessions which looks like the csv sheet???
public class Sessions(){
private integer cId;
private String cName;
private integer sId;
private String sName;
....
}
I am a bit confused about how to get the data from the object to further process it (like: display in a GUI to let me select certain data and write putty sessions with this information -> .reg files OR .txt files).
The amount of sessions (each csv row) i have right now is around 1000 - 2000 and growing. They are exported via a trigger out of a database and then should be further processed by a java program (that i'm writing) to manage the amount of sessions for putty.
So how do i "read" the data from that Object (Session.class) again? Maybe im just dumb right now.