Class Occupant


  • @Entity
    public class Occupant
    extends Object
    This class provides an example of the owning/child side of a many-to-one, uni-directional relationship where the parent uses a (embedded) compound primary key.
    • Field Detail

      • id

        private int id
      • residence

        private House residence
    • Constructor Detail

      • Occupant

        protected Occupant()
      • Occupant

        public Occupant​(String name,
                        House residence)
    • Method Detail

      • getId

        public int getId()
      • getResidence

        public House getResidence()
      • setResidence

        public void setResidence​(House residence)
      • getName

        public String getName()
      • setName

        public void setName​(String name)