Red Hat Application Migration Toolkit
package com.mpdmal.cloudental.entities; import com.mpdmal.cloudental.entities.Visit; import com.mpdmal.cloudental.entities.base.DBEntity; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; @Entity public class Toothhistory extends DBEntity implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue( strategy = GenerationType.IDENTITY ) private Integer id; private String comments; private Integer toothid; @ManyToOne @JoinColumn( name = "visitid", insertable = false, updatable = false ) private Visit visit; public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } public String getComments() { return this.comments; } public void setComments(String comments) { this.comments = comments; } public Integer getTooth() { return this.toothid; } public void setTooth(Integer tooth) { this.toothid = tooth; } public Visit getVisit() { return this.visit; } public void setVisit(Visit visit) { this.visit = visit; } public String getXML() { StringBuilder ans = new StringBuilder("<toothoperation></toothoperation>"); ans.insert(ans.indexOf("</toothoperation"), "<toothid>" + this.toothid + "</toothid>"); ans.insert(ans.indexOf("</toothoperation"), "<comments>" + this.comments + "</comments>"); return ans.toString(); } }