Class PersonService
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.dataset.person.PersonService
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AddresscreateAddress()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)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 StringcreateRandomLengthText()static DoublecreateRandomMoneyAmount()static StringgenerateSimplePassword()static List<Address>getAddress(int number)Creates a list ofAddress.static String[]getCityNames()static String[]getDrinkList()static List<ExtendedPersonWithAddress>getExtendedPersonsWithAddress(int numberOfPersons)Creates a list ofExtendedPersonWithAddress.static List<Person>getFixedMixedPersons()static List<Person>getFixedPersons()static List<Person>getFixedPersonsWithNull()static String[]getFoodList()static List<Person>getPersons(int numberOfPersons)Creates a list ofPersons.static List<PersonWithAddress>getPersonsWithAddress(int numberOfPersons)Creates a list ofPersonWithAddress.static List<Person>getRandomPersons(int numberOfPersons)Creates a list of randomPersons.static String[]getStreetNames()
-
-
-
Method Detail
-
getRandomPersons
public static List<Person> getRandomPersons(int numberOfPersons)
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.
-
getFixedPersonsWithNull
public static List<Person> getFixedPersonsWithNull()
- Returns:
- A fixed list of
Persons with a few null values.
-
getFixedMixedPersons
public static List<Person> getFixedMixedPersons()
- Returns:
- A fixed list of
Persons with a few double values.
-
getPersonsWithAddress
public static List<PersonWithAddress> getPersonsWithAddress(int numberOfPersons)
Creates a list ofPersonWithAddress.- Parameters:
numberOfPersons- The number ofPersonWithAddressthat should be generated.- Returns:
- A list of
PersonWithAddress.
-
getExtendedPersonsWithAddress
public static List<ExtendedPersonWithAddress> getExtendedPersonsWithAddress(int numberOfPersons)
Creates a list ofExtendedPersonWithAddress.- Parameters:
numberOfPersons- The number ofExtendedPersonWithAddressthat should be generated.- Returns:
- A list of
ExtendedPersonWithAddress.
-
createAddress
public static Address 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
public static PersonWithAddress createPersonWithAddress(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. 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
public static ExtendedPersonWithAddress createExtendedPersonWithAddress(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. 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
public static String generateSimplePassword()
- Returns:
- A simple password consisting of 8 characters in the value ranges a-z, A-Z
-
getStreetNames
public static String[] getStreetNames()
- Returns:
- An array of street names that are also used to create random addresses.
-
getCityNames
public static String[] getCityNames()
- Returns:
- An array of city names that are also used to create random addresses.
-
getFoodList
public static String[] getFoodList()
- Returns:
- An array of food names.
-
getDrinkList
public static String[] getDrinkList()
- Returns:
- An array of drink names.
-
createRandomLengthText
public static String createRandomLengthText()
- Returns:
- A custom length text containing line breaks
-
createRandomMoneyAmount
public static Double createRandomMoneyAmount()
-
-