commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Zatko <zatko...@comcast.net>
Subject [DBUTILS] How to handle and int
Date Sat, 07 Feb 2004 00:12:20 GMT
Hello,
    This should be a very simple question. I am pulling in a table in a 
query that contains a bunch of Strings and an Integer. It works fine 
except its not getting the values for the ints. How do I map the 
database integer column to my bean? I've tried using int, Integer, and 
String, but none work.


public class MerchantBean {
   
    private String partNumber;
    private String description;
    private String name;
    private String thumbnail;
    private String picture;
    private String identifier;
    private int groupId;

...
}



Heres the snippet of code, nothing spectacular:

        runner = new QueryRunner();
        handler =
            new BeanListHandler(MerchantBean.class);
        List merchantRecords =
            (List)runner.query(conn, 
configuration.getMerchantFileQuery(), handler);


Everything works fine except I get 0's for my groupId field. Any ideas?
Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message