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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "JdbcTmplate.update and POJO data type" Watch "JdbcTmplate.update and POJO data type" New topic
Author

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
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Yes

Mark

I love short answers. ;)


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JdbcTmplate.update and POJO data type
 
Similar Threads
how to pass an object 'byvalue'
Significance of XML encoding/decoding over Serialization
Doubt in this()
Method Variable in java
This and Constructor