@@ -0,0 +1,1942 @@
+/*%0A * Copyright 2012-2017 the original author or authors.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage sample.data.jpa.domain;%0A%0Aimport java.io.Serializable;%0Aimport java.util.Set;%0A%0Aimport javax.persistence.Column;%0Aimport javax.persistence.Entity;%0Aimport javax.persistence.FetchType;%0Aimport javax.persistence.GeneratedValue;%0Aimport javax.persistence.Id;%0Aimport javax.persistence.ManyToOne;%0Aimport javax.persistence.OneToMany;%0Aimport javax.persistence.SequenceGenerator;%0A%0Aimport org.hibernate.annotations.NaturalId;%0A%0A@Entity%0Apublic class Hotel implements Serializable %7B%0A%0A%09private static final long serialVersionUID = 1L;%0A%0A%09@Id%0A%09@SequenceGenerator(name=%22hotel_generator%22, sequenceName=%22hotel_sequence%22, initialValue = 28)%0A%09@GeneratedValue(generator = %22hotel_generator%22)%0A%09private Long id;%0A%0A%09@ManyToOne(optional = false)%0A%09@NaturalId%0A%09private City city;%0A%0A%09@Column(nullable = false)%0A%09@NaturalId%0A%09private String name;%0A%0A%09@Column(nullable = false)%0A%09private String address;%0A%0A%09@Column(nullable = false)%0A%09private String zip;%0A%0A%09@OneToMany(fetch = FetchType.LAZY, mappedBy = %22hotel%22)%0A%09private Set%3CReview%3E reviews;%0A%0A%09protected Hotel() %7B%0A%09%7D%0A%0A%09public Hotel(City city, String name) %7B%0A%09%09this.city = city;%0A%09%09this.name = name;%0A%09%7D%0A%0A%09public City getCity() %7B%0A%09%09return this.city;%0A%09%7D%0A%0A%09public String getName() %7B%0A%09%09return this.name;%0A%09%7D%0A%0A%09public String getAddress() %7B%0A%09%09return this.address;%0A%09%7D%0A%0A%09public String getZip() %7B%0A%09%09return this.zip;%0A%09%7D%0A%7D%0A

Create Hotel.java