commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick.Grim...@xtl.com
Subject Re: Scripting Suggestion?
Date Wed, 10 Sep 2008 14:50:56 GMT
Thanks Simon.
(Embedded image moved to file: pic05447.jpg)



                                                                                
             Simon Kitching                                                     
             <skitching@apache.o                                                
             rg>                                                             To 
                                         Commons Users List                     
             09/10/2008 10:49 AM         <user@commons.apache.org>              
                                                                             cc 
                                                                                
              Please respond to                                         Subject 
               "Commons Users            Re: Scripting Suggestion?              
                    List"                                                       
             <user@commons.apach                                                
                   e.org>                                                       
                                                                                
                                                                                
                                                                                




Patrick.Grimard@xtl.com schrieb:
> I figured out an alternative.  Primarily, all source data needs to get
truncated
> to fit the target columns.  The only source data I might need to do something
> tricky with appears to be java.sql.Timestamp values.  One particular column in
> my target table that is a String data type that holds a date value wants to
see
> the dates as YYYY-MM-DD-HH-MM-SS.  So when I'm getting values from my source
> data ResultSet, rather than just using the getString() method, I'm using the
> getObject() method instead.
>
> Doing it that way, I'm able to test the returned Object to see what class it's
> an instance of.  This allows me to convert the data to a string and do any
other
> conversions that are specific to the source data type.  In the case of my date
> above, I'm replacing the " " (space) character between the data and time with
a
> "-" (dash) and dropping the nanos.  That gives me the converted value I need.
> So no fancy scripting needed in my XML.
>

Ok, thanks for letting us know. And good luck with your project.

And by the way, if you have any future questions for this list then
please put the name of the commons project in the subject line, eg
  [digester] scripting suggestion

Regards, Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org



Mime
View raw message