|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.org.ogsadai.client.dbcreate2.TravelDataCreator
This class generates the data used in the test databases.
| Constructor Summary | |
TravelDataCreator()
|
|
| Method Summary | |
java.lang.String |
generateAddress(int i)
Returns a address corresponding to the specified index in the test data. |
byte[] |
generateBytes(int i,
int length)
Returns a randomly generated byte array corresponding to the specified index in the test data. |
java.lang.String |
generateCountry(int i)
Picks a country from the list corresponding to the specified index in the test data. |
java.lang.String |
generateDepartureDate(long i)
Generates a departure date in the years 2000 to 2010. |
java.lang.String |
generateDepartureTime(long i)
Generates a departure time corresponding to the specified index within the test data. |
java.lang.String |
generateDescription(int i)
Generates a text description corresponding to the specified index |
int |
generateDestination(long i,
int maxValue)
Generates an integer n where 1 <= n <= maxValue, corresponding to the specified index in the test data. |
java.lang.String |
generateDestinationName(int i)
Picks the name of a destination from a list corresponding to the specified index in the test data |
java.lang.String |
generateDOB(int i)
Generates a date of birth corresponding to the specified index in the test data. |
java.lang.String |
generateName(int i)
Returns a name corresponding to the specified index in the test data. |
java.lang.String |
generatePhone(int i)
Returns a randomly generated phone number. |
double |
generatePrice(long i)
Generates a price with corresponding to the specified index in the test data |
java.lang.String |
generateTimestamp(long i)
Generates a time stamp corresponding to the specified index in the test data |
int |
generateTraveller(long i,
int maxValue)
Generates an integer n where 1 <= n <= maxValue, depending on the specified index in the test data. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TravelDataCreator()
| Method Detail |
public java.lang.String generatePhone(int i)
String containing the phone number.public java.lang.String generateName(int i)
i - index within test data
String containing a name.public java.lang.String generateAddress(int i)
i - index within test data
String containing the address.public java.lang.String generateDOB(int i)
i - index within test data
public int generateTraveller(long i,
int maxValue)
maxValue - the upper boundi - index within test data
public int generateDestination(long i,
int maxValue)
i - index within test datamaxValue - the upper bound
public java.lang.String generateDestinationName(int i)
i - index within test data
public java.lang.String generateCountry(int i)
i - index within test data
String containing a country namepublic java.lang.String generateDescription(int i)
i - index within test data
public byte[] generateBytes(int i,
int length)
i - index within test datalength - the length of the byte array
public java.lang.String generateDepartureDate(long i)
i - index within test data
public java.lang.String generateDepartureTime(long i)
i - index within test data
public java.lang.String generateTimestamp(long i)
i - index within test data
public double generatePrice(long i)
i - index within test data
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||