You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reading the documentation, specifically regarding @PropertyDefinitionalias. Using the below example I would expect it to generate getCase and setCase methods, but generates getACase and setACase instead.
@BeanDefinition
public class AliasQuery
implements Bean {
@PropertyDefinition(alias = "case")
private String aCase;
}
I've got several POJO's I would like to switch over to using Joda Beans, but because the name conflicts with a keyword the private variable is often prefixed with '_' or a and the getter and setter have slightly different names. e.g. getCase/setCase and getLong/setLong.
Am I missing something from the documentation which might aid me switching to Joda Beans without having to do a mass refactoring exercise.
The text was updated successfully, but these errors were encountered:
As mentioned above, the prefix command line argument (available in the Maven plugin too) allows all instance variables to have the same prefix. But you can't mix and match, with some having the prefix and others not having the prefix.
The alias concept is intended for some backwards compatibility use cases. When using methods that lookup the property by name, if the alias was used then both the alias and the actual name will resolve to the same property.
Just looked into prefix, looks like it will do what I need. But the fact I've got variables matching java keywords, e.g. case, long and switch. It looks simpler if I manually manage those getter/setter methods.
Reading the documentation, specifically regarding
@PropertyDefinition
alias
. Using the below example I would expect it to generategetCase
andsetCase
methods, but generatesgetACase
andsetACase
instead.I've got several POJO's I would like to switch over to using Joda Beans, but because the name conflicts with a keyword the private variable is often prefixed with '_' or a and the getter and setter have slightly different names. e.g. getCase/setCase and getLong/setLong.
Am I missing something from the documentation which might aid me switching to Joda Beans without having to do a mass refactoring exercise.
The text was updated successfully, but these errors were encountered: