/** * Get rolling stock by road and number * * @param road RollingStock road * @param number RollingStock number * @return requested RollingStock object or null if none exists */ public RollingStock getByRoadAndNumber(String road, String number) { String id = RollingStock.createId(road, number); return getById(id); }
public void changeId(RollingStock rs, String road, String number) { _hashTable.remove(rs.getId()); rs._id = RollingStock.createId(road, number); register(rs); }