I do not do interfaces for storing beans data at all, that is, I do not create interfaces for classes with primitive type values and getters / seters for them. In fact, I never faced the moment when I needed interfaces for everything that I usually use for them (polymorphism and mockery, basically), so I did not worry about that.
I think I should note that most of the time when I use databeans, I also reflect the values of the same objects with custom classes that work as follows:
Reflector r = new Reflector(new DataBean( [ values given through constructor ] ));
long someNumber = r.get("method", Long.class);
source
share