0

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

Gurneeraj Dahele 11 месяцев назад обновлен u11156342 11 месяцев назад 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();

Сервис поддержки клиентов работает на платформе UserEcho