<fields> <!-- The field matcher regular expression. --> <expression>passwordEncrypted</expression> <fieldSetter><expression>setPasswordEncrypted</expression></fieldSetter> <fieldGetter><expression>getPasswordEncrypted</expression></fieldGetter> </fields>
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hello Lukas,
I don't work as much as I'd like on my project right now, but what I decided to do is to use my own Maven plugin and call GenerationTool.main(configuration) by myself. It is still untested yet, but I don't see why it wouldn't work.
I didn't try to find why jooq-codegen-maven isn't working properly though, sorry.
matcherRuleGetter.setExpression("get$1");
matcherRuleGetter.setTransform(MatcherTransformType.AS_IS);
matcherRuleGetter.setExpression("get_$1");
matcherRuleGetter.setTransform(MatcherTransformType.CAMEL);
matcherRuleGetter.setExpression("get_$1");
matcherRuleGetter.setTransform(MatcherTransformType.PASCAL);
Lukas,
So finally I use my own Maven plugin and it works well.
But for the camel cased setters and getters, it seems the only format that I'm not able to generate is the one I want!!
I try to apply the format to all fields, using : fields.setExpression("^(.+)$");
For "passwordEncrypted", I want the generated getter to be "getPasswordEncrypted()".
This doesn't work because the first letter is not uppercased :matcherRuleGetter.setExpression("get$1");
matcherRuleGetter.setTransform(MatcherTransformType.AS_IS);
Results in "getpasswordEncrypted()".
I also tried :
matcherRuleGetter.setExpression("get_$1");
matcherRuleGetter.setTransform(MatcherTransformType.CAMEL);
Results in "getPasswordencrypted()".
And :matcherRuleGetter.setExpression("get_$1");
matcherRuleGetter.setTransform(MatcherTransformType.PASCAL);
Results in "GetPasswordencrypted()".
Sadly I think (not sure) that it's not possible to specify, in a Java's regular expressions replacement string, that we want to convert a character to uppercase.
I hope the format I'm looking for is possible to generate since, in my opinion, it's the one that makes the more sense when dealing with pojos, don't you think? It would follow the beans' getters and setters specification.
--
You received this message because you are subscribed to a topic in the Google Groups "jOOQ User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jooq-user/1iy0EdWe_T8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jooq-user+...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
There are too many private/package private/final elements to easily override the behaviour. For example, extending DefaultRecordMapper doesn't allow to override the map() method. Also, the inner class MutablePOJOMapper is private so I can't use it. I would have to copy/paste almost all the code to change the behavior and I don't want to do that.> In the mean time, you will probably have to resort to writing your own RecordMapperProvider to override this behaviour:> http://www.jooq.org/doc/3.2/manual/sql-execution/fetching/pojos-with-recordmapper-provider/
My temporary workaround will be to use only lowercase names for all columns in the database!