Autofill in Hibernate using the .txt

I`m new in Hibernate, that`s why I don`t understant how to autofill tables in DB.

I did DB and tables in it using Hibernate and join them, also write DAO and Service, but to test my work and go to cashing I need to autofill all tables from different .txt files.

I`m planning to use BufferedReader and Rexeg Matcher to parse the file. But I don`t understand what table I need to fill first and how to be with connections, in case, how to fill @JoinColumns.

I was trying to find something in GitHub or there, but just saw an examples for single tables without a mapping. Maybe someone saw good example?