Link to home
Start Free TrialLog in
Avatar of Mickeys
MickeysFlag for Sweden

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.getString(1)).intValue());
                  item.setNamn(rs.getString(2));
                  item.setPrice(Integer.valueOf(rs.getString(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;
      
.....


ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial