File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes JdbcTmplate.update and POJO data type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "JdbcTmplate.update and POJO data type" Watch "JdbcTmplate.update and POJO data type" New topic

JdbcTmplate.update and POJO data type

FY Hsieh
Ranch Hand

Joined: Aug 07, 2006
Posts: 73
I saw some spring jdbc code like

if I have

class Member {
private String name;
private String address;
private int zip;
private int age;

question --- Using this approach, what if I want to pass null value to zip ?
Does that mean I HAVE to use

private Integer zip;

instead ??

is it true we usually should use wrapper class instead of int, double, etc data type in the POJO so that we can handle passing NULL value ?

Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276



I love short answers. ;)

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: JdbcTmplate.update and POJO data type
It's not a secret anymore!