I'll simply use a custom GeneratorStrategy, it's not that bad! :-)
On Tuesday, December 31, 2013 3:07:14 PM UTC-5, [email protected] wrote: > > 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 the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
