District (referenced by contract.contract.districtId) is an entity bean with generic getter and setters for the id, name, and region vars. Nothing special. Contract is an entity bean (referenced by contract.contract) with getter and setters for a ton of fields. The districtId property isn't really an Id. It is the District entity. The districtId getter and setters are: public com.company.entity.District getDistrictId() { ...