Re: How set null to integer or long field
"Sinisa Milosevic" <[email protected]> Mon, 8 Aug 2005 10:48:56 +0200
| Newsgroups | gmane.comp.java.enhydra.dods |
|---|---|
| Message-ID | <00ce01c59bf6$02ed1880$1500a8c0__27256.0255638838$1123490044$gmane$org@prozone.co.yu> |
This is a multi-part message in MIME format... ------------=_1123489955-23563-27 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi, Yes, you are right. DODS in standard templates doesn't support Integer, Long, Float, or Double classes (setXXX and getXXX methods), because they are not supported in JDBC interface. Also, DODS generator can use different set of templates, so it means that DODS templates can be a part of project if you have specific needs like this one. We can put this issue in our task list (with low priority) to include that feature in standard set of templates. Regards, Sinisa ----- Original Message ----- From: "Michael Strapp" <[email protected]> To: <[email protected]> Sent: Saturday, August 06, 2005 2:00 AM Subject: Re: [dods] How set null to integer or long field > Hi Daniel, > You'll need to use a javaType="java.math.BigDecimal" for your > INTEGER/BIGINT field (with canBeNull="true"). This is actually the only > non-primitive datatype for numbers that is supported in JDBC by its own > setXxx() methods (in the java.sql.PreparedStatement interface) and getXxx() > methods (in the java.sql.ResultSet interface) - which is my guess as to why > DODS doesn't support it (yet). Especially in the case of a BIGINT, it > sounds like this would be the javaType you'd want. > > Regards, > Mike. > > P.S. to the DODS developers: Are there any plans for extending the DODS > code templates to support the use of the Integer, Long, Float, or Double > wrapper classes for the javaType attribute, at some point in the future? > > ----- Original Message ----- > From: "Daniel Guryca" <[email protected]> > To: <[email protected]> > Sent: Friday, August 05, 2005 5:23 AM > Subject: [dods] How set null to integer or long field > > > >I have a problem with setting DB field which is of type INTEGER or BIGINT. > > > > It is imposible to set this field with DO object to null value. (0 is > > saved instead of null) - because it accepts java int (long) types only. > > It is also imposible to get null value from this field. (0 is return) - > > because it gets java int (long) types only. > > > > So is there a way how to set or get a value of null for DB fields of > > type INTEGER or BIGINT? > > > > Thank you for your help. > > > > > > > -------------------------------------------------------------------------- ------ > > > > > > -- > > You receive this message as a subscriber of the [email protected] mailing > > list. > > To unsubscribe: mailto:[email protected] > > For general help: mailto:[email protected]?subject=help > > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > > > ---------------------------------------------------------------------------- ---- > > -- > You receive this message as a subscriber of the [email protected] mailing list. > To unsubscribe: mailto:[email protected] > For general help: mailto:[email protected]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > ------------=_1123489955-23563-27 Content-Type: text/plain; name="message-footer.txt" Content-Disposition: inline; filename="message-footer.txt" Content-Transfer-Encoding: 8bit -- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws ------------=_1123489955-23563-27--