camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kgscorp <renaud.bel...@altran.com>
Subject Camel-Bindy - unusual default Date format
Date Tue, 26 Jan 2016 13:41:24 GMT
Hi all!

I have a situation where I use Camel-Bindy to create fixed-length records,
which are to be written to/read from a legacy (and of course, unmodifiable)
system.

The specification of the records asks all dates to be formatted with a
ddMMyyyy pattern, except for "empty" date fields, which are to be
initialized with a "00000000" value.

That's fine when writing - I simply use a "paddingChar='0" attribute.
However, when parsing "00000000" as a Date, I obviously get a format error.

I haven't found any forum thread matching such a case, nor I have found any
clever way to do that without changing the field type to Integer, in order
to be able handling this default value. 

I'd like to keep the type as Date, and haven't found a way to handle that
using provided Bindy annotations.


Any suggestion would be appreciated.

Thanks in advance.





--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Bindy-unusual-default-Date-format-tp5776720.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message