Roberto Perillo wrote:Now, your Room object doesn't have to carry the record number field, because this isn't a concern of a Room. Record numbers should only be controlled in/by the Data class. For your search, you can return Map<Integer, Room>.
David Byron wrote:It seems to me that in a world of Hibernate and Seam, etc. (even though they're not used in this project!), it's ok to have an identifying id in an entity such as a room or subcontractor object.
Roberto Perillo wrote:
David Byron wrote:...it's ok to have an identifying id in an entity such as a room or subcontractor object.
Yes, you are correct! But the thing is, in this assignment, the Room class has the database fields, and there isn't a field we can consider unique per room...