0

How can we design a class/method where we instantiate a long entity object?

Gurneeraj Dahele hace 3 años actualizado por hace 3 años 1

How can we design a class/method where we instantiate a long entity object? Size of method will become very long. Can we pass entity as parameter to private methods and setting related values in each private method. Is this good approach?

Have you looked at the builder pattern perhaps? 

Google for java builder examples, but youll have something like MyClass.builder().setProperty1().setProperty2().build();