Have a look at the discussion chain on topic :-
That provides a complete solution to a similar problem with two differences.
That problem was for a singleton solution, in which only one Entity Bean exists in the database.
In your case, you need a BMP entity bean for each train number. So replace the fixed primary key by train number.
In the example, the Entity Bean stores and returns an ArrayList of String objects. You will presumably need to store and return an ArrayList of TrainInfo (or whatever) objects.
Hope this helps.