package com.smartgwt.sample.showcase.server; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table (name="city") public class CityOneToMany implements Serializable { @Id @Column (nullable = false) @GeneratedValue (strategy = GenerationType.IDENTITY) private Long cityId; @Column (nullable = false) private String cityName; public CityOneToMany () { } public Long getCityId () { return cityId; } public void setCityId (Long cityId) { this.cityId = cityId; } public String getCityName () { return cityName; } public void setCityName (String cityName) { this.cityName = cityName; } /** * Returns a string representation of the object. Resulting string contains * full name of the class and list of its properties and their values. * * @return
String
representation of this object. */ public String toString () { return getClass().getName() + "[" + "cityId=" + ((getCityId() == null) ? "null" : getCityId().toString()) + ", " + "cityName=" + ((getCityName() == null) ? "null" : getCityName().toString()) + "]"; } }