I want to add some custom code to my greenDAO entities. I saw there is something like protected regions. But I don't like the idea to check in the generated classes to my git repository. I'd like to use inheritance for this.
i.e. I have an entity User
. So I want greenDAO to generate a class called UserBase
. This I want to extend by User
and implement a method like this:
public String getFullName() {
return this.first + " " + this.last;
}
Where first
and last
are managed properties.
But I have no idea how to tell greenDAO to use the class User
instead of the generated entity UserBase
. Is there any way to do this?