Guest User

Untitled

a guest
Apr 11th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.03 KB | None | 0 0
  1. import java.io.Serializable;
  2. import javax.persistence.Column;
  3. import javax.persistence.Entity;
  4. import javax.persistence.Id;
  5.  
  6.  
  7. @SuppressWarnings("serial")
  8. @Entity
  9. public class Application_Identity implements Serializable
  10. {
  11. @Id
  12. @Column(columnDefinition = "serial")
  13.  
  14. private long Application_ID;
  15.  
  16. public long getApplication_ID() {
  17. return Application_ID;
  18. }
  19.  
  20. public void setApplication_ID(long application_ID) {
  21. Application_ID = application_ID;
  22. }
  23.  
  24.  
  25. }
  26.  
  27. <?xml version="1.0" encoding="UTF-8"?>
  28. <!DOCTYPE hibernate-configuration PUBLIC
  29. "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
  30. "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
  31. <hibernate-configuration>
  32. <session-factory>
  33. <property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
  34. <property name="hibernate.connection.password">babaswami</property>
  35. <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/cola?useSSL=true</property>
  36. <property name="hibernate.connection.username">himanshu</property>
  37. <property name="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
  38. <property name="hibernate.hbm2ddl.auto">create</property>
  39. <property name="show_sql">true</property>
  40. <!-- Mapping files -->
  41. <mapping resource="Application_Identity.hbm.xml"/>
  42. <mapping resource="Application_Type.hbm.xml"/>
  43. <mapping resource="Graduation.hbm.xml"/>
  44. <mapping resource="Other_Details.hbm.xml"/>
  45. <mapping resource="Other_Qualifications.hbm.xml"/>
  46. <mapping resource="Personal_Details.hbm.xml"/>
  47. <mapping resource="Phd.hbm.xml"/>
  48. <mapping resource="Post_Graduation.hbm.xml"/>
  49. <mapping resource="Sslc_Puc.hbm.xml"/>
  50. </session-factory>
  51. </hibernate-configuration>
  52.  
  53. import java.io.Serializable;
  54.  
  55. import javax.persistence.CascadeType;
  56. import javax.persistence.Entity;
  57. import javax.persistence.GeneratedValue;
  58. import javax.persistence.GenerationType;
  59. import javax.persistence.Id;
  60. import javax.persistence.OneToOne;
  61.  
  62.  
  63.  
  64. @SuppressWarnings("serial")
  65. @Entity
  66. public class Application_Type implements Serializable
  67. {
  68. @Id
  69. @GeneratedValue(strategy=GenerationType.AUTO)
  70. private long application_type_id;
  71. private String applicant_type;
  72. @OneToOne(cascade=CascadeType.ALL,targetEntity=Application_Type.class)
  73. private Application_Identity application_identity;
  74.  
  75. public long getApplication_type_id() {
  76. return application_type_id;
  77. }
  78. public void setApplication_type_id(long application_type_id) {
  79. this.application_type_id = application_type_id;
  80. }
  81. public String getApplicant_type() {
  82. return applicant_type;
  83. }
  84. public void setApplicant_type(String applicant_type) {
  85. this.applicant_type = applicant_type;
  86. }
  87. public Application_Identity getApplication_identity() {
  88. return application_identity;
  89. }
  90. public void setApplication_identity(Application_Identity application_identity) {
  91. this.application_identity = application_identity;
  92. }
  93.  
  94. }
Add Comment
Please, Sign In to add comment