trainDetailFrom = (ArrayList<TrainDetail>) session.createQuery("from TrainDetail where Station = '"+this.getFrom()+"'").list();
trainDetailTo =(ArrayList<TrainDetail>) session.createQuery("from TrainDetail where Station = '"+this.getTo()+"'").list();
for(TrainDetail trainFrom:trainDetailFrom)
{
for(TrainDetail trainTo:trainDetailTo)
{
if(trainFrom.getTrain()==trainTo.getTrain() &&trainFrom.getDistance()<trainTo.getDistance())
{
this.train.add(trainFrom.getTrain());
}
}
}
我无法在网页上获取训练值,当我运行此操作页面时,它不提供训练值,我认为 train.add() 没有设置值。请帮忙。