Yes and no. You can use it if you also provide setters.
Hibernate uses Java Beans to access properties, so it relies on the getXXX() and setXXX() methods. The whole purpose of the builder pattern (at least according to Joshua Bloch) is to create immutable objects without setters. This will not work with Hibernate (or any ORM), as they use installers to enter values.
But if you just want to use your builder API as a free interface for creating objects, leaving their getters and setters intact, then of course there is no harm (except that this is code duplication).
BTW: Free Setters are not valid Java Beans Setters. The Introspector mechanism does not understand them. Setters must have a void return type.
Sean Patrick Floyd
source share