This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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: 17250



I love short answers. ;)

Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
GeeCON Prague 2014
subject: JdbcTmplate.update and POJO data type