Meaningless Drivel is fun!
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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
jQuery in Action, 3rd edition