Advertisement
Guest User

Untitled

a guest
Apr 5th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. {
  2. id: 2,
  3. Nom: "ee",
  4. Prenom: "az",
  5. Profil: "RC",
  6. Pseudo: "aze",
  7. Password: null,
  8. role: null,
  9. password: null,
  10. nom: "ee",
  11. prenom: "az",
  12. profil: "RC",
  13. pseudo: "aze"
  14. },
  15. {
  16. id: 3,
  17. Nom: "xx",
  18. Prenom: "xxx",
  19. Profil: "dataa",
  20. Pseudo: "data",
  21. Password: null,
  22. role: null,
  23. password: null,
  24. nom: "xx",
  25. prenom: "xxx",
  26. profil: "dataa",
  27. pseudo: "data"
  28. },
  29. {
  30.  
  31. import javax.persistence.Column;
  32. import javax.persistence.Entity;
  33. import javax.persistence.GeneratedValue;
  34. import javax.persistence.GenerationType;
  35. import javax.persistence.Id;
  36. import javax.persistence.JoinColumn;
  37. import javax.persistence.ManyToOne;
  38. import javax.persistence.Table;
  39.  
  40.  
  41.  
  42.  
  43. @Entity
  44. @Table(name=""UTILISATEUR"")
  45. public class Utilisateur {
  46.  
  47.  
  48. @Id
  49. @GeneratedValue(strategy=GenerationType.AUTO)
  50. @Column(name=""IdUtilisateur"")
  51. public Long id ;
  52. @Column(name=""Nom"")
  53. public String Nom ;
  54. @Column(name=""Prenom"")
  55. public String Prenom ;
  56. @Column(name=""Profil"")
  57. public String Profil ;
  58. @Column(name=""Pseudo"")
  59. public String Pseudo ;
  60. @Column(name=""Password"")
  61. public String Password ;
  62. @ManyToOne
  63. @JoinColumn(name=""id_role"")
  64. public Role role ;
  65. public Long getId() {
  66. return id;
  67. }
  68. public void setId(Long id) {
  69. this.id = id;
  70. }
  71. public String getNom() {
  72. return Nom;
  73. }
  74. public void setNom(String nom) {
  75. Nom = nom;
  76. }
  77. public String getPrenom() {
  78. return Prenom;
  79. }
  80. public void setPrenom(String prenom) {
  81. Prenom = prenom;
  82. }
  83. public String getProfil() {
  84. return Profil;
  85. }
  86. public void setProfil(String profil) {
  87. Profil = profil;
  88. }
  89. public String getPseudo() {
  90. return Pseudo;
  91. }
  92. public void setPseudo(String pseudo) {
  93. Pseudo = pseudo;
  94. }
  95.  
  96.  
  97. public String getPassword() {
  98. return Password;
  99. }
  100. public void setPassword(String password) {
  101. Password = password;
  102. }
  103. public Role getRole() {
  104. return role;
  105. }
  106. public void setRole(Role role) {
  107. this.role = role;
  108. }
  109. public Utilisateur(String nom, String prenom, String profil, String pseudo, String password,
  110. Role role) {
  111. super();
  112. Nom = nom;
  113. Prenom = prenom;
  114. Profil = profil;
  115. Pseudo = pseudo;
  116.  
  117. Password = password;
  118. this.role = role;
  119. }
  120. public Utilisateur() {
  121. super();
  122. }
  123.  
  124. CREATE TABLE "UTILISATEUR"
  125. (
  126. "IdUtilisateur" serial NOT NULL,
  127. "Nom" character varying(50),
  128. "Prenom" character varying(50),
  129. "Profil" character varying(50),
  130. "Pseudo" character varying(20),
  131. "IdSite" integer DEFAULT 0,
  132. "Password" character varying(1024),
  133. id_role integer,
  134. )
  135.  
  136. spring.datasource.url = jdbc:postgresql://localhost/baseecu
  137. spring.datasource.username = postgres
  138. spring.datasource.password =root
  139.  
  140.  
  141. spring.datasource.driverClassName=org.postgresql.Driver
  142. spring.jpa.database = MYSQL
  143. spring.jpa.show-sql = true
  144. spring.jpa.hibernate.ddl-auto= update
  145. spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
  146. spring.jpa.hibernate.naming_strategy: org.hibernate.cfg.EJB3NamingStrategy
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement