Added name generating method

check out
public String generateName(String prefix)
from TrainingDB.java
The method generates a filename starting with the prefix and ending with
the smallest possible number that is larger than the last id of the
searchset table.
The method has to be non-static as it makes use of the non-static
variable 'connection'