Session sess=sf.getCurrentSession();
List pl= sess.createQuery("select o.identifier from domain.Fleet f,domain.Unit u,domain.object o "
+ " where f.pk_fleetid=u.fk_fleetid and "
+ " u.fk_objectid=o.pk_objectid and "
+ "f.pk_fleetid= :fleetid ").setInteger(“fleetid”, 4)
.list();
int size=pl.size();