camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roberto Coral Azambuja (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CAMEL-6163) camel-bindy - Enable add custom data type converter.
Date Tue, 22 Mar 2016 01:55:25 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-6163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15204953#comment-15204953
] 

Roberto Coral Azambuja edited comment on CAMEL-6163 at 3/22/16 1:55 AM:
------------------------------------------------------------------------

I need this feature too and I want to implement it. I'm thinking of creating a new annotation
class called Converter. This annotation will have only one parameter: converter class. When
this parameter is setted the conversion automatically will be made ​​by the converter
class setted and the DataField annotation will be ignored (or an exception will be throwed
if both annotations setted at same field). What do you thinking about that?

Ex. Converter.java:
public @interface Converter {
    Class<? extends Format<?>> value();
}


was (Author: rcazambuja):
I need this feature too and I want to implement it. I'm thinking of creating a new annotation
class called Converter. This annotation will have only one parameter: converter class. When
this parameter is setted the conversion automatically will be made ​​by the convertee
class setted and will ignore the DataField annotation (or will raise an exception if both
annotations setted at same field). What do you thinking about that?

Ex. Converter.java:
public @interface Converter {
    Class<? extends Format<?>> value();
}

> camel-bindy - Enable add custom data type converter.
> ----------------------------------------------------
>
>                 Key: CAMEL-6163
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6163
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-bindy
>    Affects Versions: 2.10.4
>            Reporter: Gardella Juan Pablo
>
> It is useful add custom converter to camel-bindy, for example a new parameter on Datafield
annotation "converter=<someclass>". The converter receive an string and return a the
object. 
> If we can add custom converter, we can map to any data type.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message