Class PersonGenerator
java.lang.Object
com.datengaertnerei.test.dataservice.person.PersonGenerator
- All Implemented Interfaces:
IPersonGenerator
Generates random persons
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateRandomPerson
(AgeRange range) Creates a single random person object with linked address.createRandomPersonInArea
(String postalCode, AgeRange range) Creates a single random person object with linked address inside a given postal code area.createRandomPersonInCity
(String city, AgeRange range) Creates a single random person object with linked address inside a given city.void
init()
-
Constructor Details
-
PersonGenerator
public PersonGenerator()
-
-
Method Details
-
init
@PostConstruct public void init() -
createRandomPerson
Creates a single random person object with linked address.- Specified by:
createRandomPerson
in interfaceIPersonGenerator
- Parameters:
range
- age- Returns:
- the new person object
-
createRandomPersonInCity
Creates a single random person object with linked address inside a given city.- Specified by:
createRandomPersonInCity
in interfaceIPersonGenerator
- Parameters:
city
- the city to fetch random address fromrange
- age- Returns:
- the new person object
-
createRandomPersonInArea
Creates a single random person object with linked address inside a given postal code area.- Specified by:
createRandomPersonInArea
in interfaceIPersonGenerator
- Parameters:
postalCode
- the postal code marking the area to fetch random address fromrange
- age- Returns:
- the new person object
-