Class PersonService
java.lang.Object
org.eclipse.nebula.widgets.nattable.dataset.person.PersonService
Class that acts as service for accessing numerous
Persons. The values
are randomly put together out of names and places from "The Simpsons"-
Method Summary
Modifier and TypeMethodDescriptionstatic AddressCreates a random address out of street names, postal codes and city names which are taken from "The Simpsons" (i haven't found postal codes, so here i invented some for the example)static ExtendedPersonWithAddresscreateExtendedPersonWithAddress(int id) Creates a random person out of names which are taken from "The Simpsons" and enrich them with random generated married state and birthday date.static PersonWithAddresscreatePersonWithAddress(int id) Creates a random person out of names which are taken from "The Simpsons" and enrich them with random generated married state and birthday date.static Stringstatic Doublestatic StringgetAddress(int number) Creates a list ofAddress.static String[]static String[]static List<ExtendedPersonWithAddress>getExtendedPersonsWithAddress(int numberOfPersons) Creates a list ofExtendedPersonWithAddress.static String[]getPersons(int numberOfPersons) Creates a list ofPersons.static List<PersonWithAddress>getPersonsWithAddress(int numberOfPersons) Creates a list ofPersonWithAddress.getRandomPersons(int numberOfPersons) Creates a list of randomPersons.static String[]
-
Method Details
-
getRandomPersons
Creates a list of randomPersons.- Parameters:
numberOfPersons- The number ofPersons that should be generated.- Returns:
- A list containing the given amount of random generated persons.
-
getFixedPersons
- Returns:
- A fixed list of
Persons.
-
getFixedPersonsWithNull
- Returns:
- A fixed list of
Persons with a few null values.
-
getFixedMixedPersons
- Returns:
- A fixed list of
Persons with a few double values.
-
getPersons
Creates a list ofPersons. -
getAddress
Creates a list ofAddress. -
getPersonsWithAddress
Creates a list ofPersonWithAddress.- Parameters:
numberOfPersons- The number ofPersonWithAddressthat should be generated.- Returns:
- A list of
PersonWithAddress.
-
getExtendedPersonsWithAddress
Creates a list ofExtendedPersonWithAddress.- Parameters:
numberOfPersons- The number ofExtendedPersonWithAddressthat should be generated.- Returns:
- A list of
ExtendedPersonWithAddress.
-
createAddress
Creates a random address out of street names, postal codes and city names which are taken from "The Simpsons" (i haven't found postal codes, so here i invented some for the example)- Returns:
- A random address.
-
createPersonWithAddress
Creates a random person out of names which are taken from "The Simpsons" and enrich them with random generated married state and birthday date. Also adds a random address out of street names, postal codes and city names which are taken from "The Simpsons" (i haven't found postal codes, so here i invented some for the example)- Parameters:
id- A unique id for the person.- Returns:
- A random person with a random address.
-
createExtendedPersonWithAddress
Creates a random person out of names which are taken from "The Simpsons" and enrich them with random generated married state and birthday date. Adds a random address out of street names, postal codes and city names which are taken from "The Simpsons" (i haven't found postal codes, so here i invented some for the example). Also adds extended information like a password, a random long description text, a money balance and collections of favourite food and drinks.- Parameters:
id- A unique id for the person.- Returns:
- A random person with a random address and some random extended information.
-
generateSimplePassword
- Returns:
- A simple password consisting of 8 characters in the value ranges a-z, A-Z
-
getStreetNames
- Returns:
- An array of street names that are also used to create random addresses.
-
getCityNames
- Returns:
- An array of city names that are also used to create random addresses.
-
getFoodList
- Returns:
- An array of food names.
-
getDrinkList
- Returns:
- An array of drink names.
-
createRandomLengthText
- Returns:
- A custom length text containing line breaks
-
createRandomMoneyAmount
-