commons-user mailing list archives

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

             Simon Kitching                                                     
             rg>                                                             To 
                                         Commons Users List                     
             09/10/2008 10:49 AM         <>              
              Please respond to                                         Subject 
               "Commons Users            Re: Scripting Suggestion?              
> I figured out an alternative.  Primarily, all source data needs to get
> 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
> 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
> 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
> "-" (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:
For additional commands, e-mail:

View raw message