title: Long versus Integer for the id field of java entities
body: <p>Jpa entity generator assigns Integer type to the id fields of my entities. The corresponding attribute/column in my DB is of type serial ( yep <code>postgres</code>). I would also assign the integer type to my entities id fields. But i have seen usage of <code>Long getId()</code> on <a href="https://developers.google.com/web-toolkit/doc/latest/DevGuideRequestFactory" rel="noreferrer">this page</a>. I have also seen this type of type assigning on the geomajas examples. Is there any gotcha when it comes to using <code>Integer</code>? I mean, yeah you have to be careful with integer that the id is not below 0 but at the same time  you also have to make sure that your Long Id is not  bigger than 2,147,483,647. So what's deal here?</p>
  
  <p>EDIT: I was making a confusion between <code>Long</code> and unsigned integer so i guess what i was thinking was "unsigned integer versus <code>Integer</code> for the id field of java entities" which is nonsense now that my confusion between long and unsigned integer is gone. My bad. Thank you for your answers and comments. I guess if i would have used bigserial jpa entity generator would have used Long too.</p>