Mickeys
asked on
How do I set this value?
I have a class:
MysqlConnect
In here I do this:
while((rs!=null) && (rs.next()))
{
Item item = new Item();
item.setID(Integer.valueOf (rs.getStr ing(1)).in tValue());
item.setNamn(rs.getString( 2));
item.setPrice(Integer.valu eOf(rs.get String(5)) .intValue( ));
lista.add(item);
}
Now I want also to set a value called Betyg. In my Items class it looks like this:
public class Item {
private int _varuId;
private int _pris;
private String _namn;
private KategoriID _kategoriId;
private Betyg _betyg;
.....
so my problem. How do I set the Betyg in my class mysqlConnect.
My Betyg class looks like this:
public class Betyg {
private String _text;
private int _betyg;
private int _varuid;
private String _pnr;
.....
MysqlConnect
In here I do this:
while((rs!=null) && (rs.next()))
{
Item item = new Item();
item.setID(Integer.valueOf
item.setNamn(rs.getString(
item.setPrice(Integer.valu
lista.add(item);
}
Now I want also to set a value called Betyg. In my Items class it looks like this:
public class Item {
private int _varuId;
private int _pris;
private String _namn;
private KategoriID _kategoriId;
private Betyg _betyg;
.....
so my problem. How do I set the Betyg in my class mysqlConnect.
My Betyg class looks like this:
public class Betyg {
private String _text;
private int _betyg;
private int _varuid;
private String _pnr;
.....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.