Mail Archive Home | enhydra List | August 2005 Index
| <-- Date Index --> | <-- Thread Index --> |
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" <mstrapp@xxxxxxxxxxxxx> To: <dods@xxxxxxxxxxxxx> 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" <daniel.guryca@xxxxxxxxxx> > To: <dods@xxxxxxxxxxxxx> > 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 dods@xxxxxxxxxxxxx mailing > > list. > > To unsubscribe: mailto:dods-unsubscribe@xxxxxxxxxxxxx > > For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help > > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > > > ---------------------------------------------------------------------------- ---- > > -- > You receive this message as a subscriber of the dods@xxxxxxxxxxxxx mailing list. > To unsubscribe: mailto:dods-unsubscribe@xxxxxxxxxxxxx > For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws >
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.