Guest User

Untitled

a guest
Jun 8th, 2018
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.21 KB | None | 0 0
  1. [{"id":1,"email":"papa@papa.com","fatherName":"πατέρας","firstName":"όνομα","lastName":"επίθετο","telephone":"2821074737"},{"id":2,"email":"lala@gmail.com","fatherName":"dfjs","firstName":"Ιωσήφ","lastName":"Βαρουξάκης","telephone":"8583848824"},{"id":3,"email":"","fatherName":"","firstName":"Χαράλαμπος","lastName":"Πρωτοπαπαδάκης","telephone":"4343454345"},{"id":4,"email":"","fatherName":"","firstName":"Ελευθέριος","lastName":"Παπαδάκης","telephone":"2821084834"},{"id":5,"email":"","fatherName":"","firstName":"Παναγιώτης","lastName":"Τζεράκης","telephone":"28210848383"},{"id":6,"email":"","fatherName":"","firstName":"Κων/νος","lastName":"Κωνσταντινίδης","telephone":"2821084838"},{"id":7,"email":"","fatherName":"","firstName":"Παναγιώτης","lastName":"Ψιστάκης","telephone":"2810838383"},{"id":8,"email":"","fatherName":"Εμμανουήλ","firstName":"Θεανώ","lastName":"Πατακάκη","telephone":"2821048438"},{"id":9,"email":"","fatherName":"","firstName":"Μαρία","lastName":"Καφούση","telephone":"2810848283"},{"id":10,"email":"","fatherName":"","firstName":"Μανούσος","lastName":"Χριστοδουλάκης","telephone":"2810848383"},{"id":11,"email":"saf@fdsa.gr","fatherName":"αφδσ","firstName":"φδσα","lastName":"σφδ","telephone":"2323233223"},{"id":12,"email":"","fatherName":"φεδσαφ","firstName":"φδσαφδσα","lastName":"φδσαφγσφαδ","telephone":"3333333333"},{"id":13,"email":"mixtou@gmail.co","fatherName":"Dimitrios","firstName":"Toutoudakis","lastName":"Mixail","telephone":"6948571893"}]
  2.  
  3. [{"id":1,"birthday":"1975-08-19","email":"mixtou@gmail.com","fatherName":"Δημήτριος","firstName":"Μιχαήλ","lastName":"Τουτουδάκης","telephone":"6948571893","sex":true},{"id":2,"birthday":"1942-06-10","email":"lla@gmail.com","fatherName":"Μιχαήλ","firstName":"Δημήτριος","lastName":"Τουτουδάκης","telephone":"7364927473","sex":true},{"id":3,"birthday":"1975-05-06","email":"lala@gmail.com","fatherName":"Μιχαήλ","firstName":"Μιχαήλ","lastName":"Μαραγκάκης","telephone":"8484848484","sex":false},{"id":4,"birthday":"1957-08-14","email":"lasdjf@lkdafs.gr","fatherName":"Τεστ","firstName":"Μηνάς","lastName":"Παπαδάκης","telephone":"8484842747","sex":false},{"id":5,"birthday":"2018-03-26","email":"","fatherName":"","firstName":"Στέφανος","lastName":"Μαριόλος","telephone":"4838583845","sex":true},{"id":6,"birthday":"2018-03-20","email":"jkdas@gjal.com","fatherName":"Μ..κας","firstName":"Κων/νος","lastName":"Μπλαζάκης","telephone":"2347878763","sex":false},{"id":7,"birthday":"2018-03-08","email":"ajs@gjla;.gr","fatherName":"pateras","firstName":"f;ldas","lastName":"akdfsj","telephone":"445354345453","sex":true},{"id":8,"birthday":"2018-03-12","email":"lala@gam.gr","fatherName":"Εμμανουήλ","firstName":"Ιωάννης","lastName":"Μαλανδράκης","telephone":"4343434343","sex":false},{"id":9,"birthday":"1980-05-12","email":"antonis@gmai.com","fatherName":"Δεν Ξέρω","firstName":"Αντώνιος","lastName":"Ιγγλεζάκης","telephone":"28210848484","sex":false},{"id":10,"birthday":"2018-04-19","email":"test@etes.gr","fatherName":"test","firstName":"test`","lastName":"tet","telephone":"2345674424","sex":false},{"id":11,"birthday":"1984-02-13","email":"lala@gmail.com","fatherName":"Δημήτριος","firstName":"Ιωάννης","lastName":"Μαλανδράκης","telephone":"1223323344","sex":false},{"id":12,"birthday":"2018-05-16","email":"lala@gmail.com","fatherName":"Τεεε","firstName":"Τέστης","lastName":"Τεστάκης","telephone":"84848484823","sex":false},{"id":13,"birthday":"2018-06-05","email":"lala@gmail.com","fatherName":"test","firstName":"test","lastName":"test","telephone":"2821022222","sex":true}]
  4.  
  5. [{"id":4,"name":"Αγ. Νικόλαος"},{"id":3,"name":"Ηράκλειο"},{"id":2,"name":"Ρέθυμνο"},{"id":5,"name":"Ρόδος"},{"id":1,"name":"Χανιά"}]
  6.  
  7. [{"id":1,"name":"Αγγειοχειρουργική"},{"id":2,"name":"Αιματολογία"},{"id":3,"name":"Ακτινοδιαγνωστική"},{"id":4,"name":"Ακτινοθεραπευτική"},{"id":5,"name":"Αλλεργιολογία"},{"id":6,"name":"Αναισθησιολογία"},{"id":7,"name":"Γαστρεντερολογία"},{"id":8,"name":"Γενική Ιατρική"},{"id":9,"name":"Δερματολογία"},{"id":10,"name":"Ενδοκρινολογία"},{"id":12,"name":"Ιατρική Εργασίας"},{"id":13,"name":"Ιατροδικαστική"},{"id":14,"name":"Καρδιολογία"},{"id":15,"name":"Κυτταρολογία"},{"id":16,"name":"Μαιευτική Γυναικολογία"},{"id":11,"name":"Μικροβιολογία"},{"id":17,"name":"Νευρολογία"},{"id":18,"name":"Νευροχειρουργική"},{"id":19,"name":"Νεφρολογία"},{"id":20,"name":"Ορθοπαιδική"},{"id":21,"name":"Ουρολογία"},{"id":22,"name":"Οφθαλμολογία"},{"id":23,"name":"Παθολογία"},{"id":24,"name":"Παθολογική Ανατομική"},{"id":25,"name":"Παθολογική Ογκολογία"},{"id":26,"name":"Παιδιατρική"},{"id":27,"name":"Παιδοψυχιατρική"},{"id":28,"name":"Πλαστική Χειρουργική"},{"id":29,"name":"Πνευμονολογία - Φυματιολογία"},{"id":30,"name":"Πυρηνική Ιατρική"},{"id":31,"name":"Ρευματολογία"},{"id":39,"name":"Στοματική & Γναθοπροσωπική Χειρουργική"},{"id":32,"name":"Φυσική Ιατρική και Αποκατάσταση"},{"id":33,"name":"Χειρουργική"},{"id":36,"name":"Χειρουργική Β΄"},{"id":34,"name":"Χειρουργική Θώρακος"},{"id":35,"name":"Χειρουργική Παίδων"},{"id":37,"name":"Ψυχιατρική"},{"id":38,"name":"ΩΡΛ"}]
  8.  
  9. <?xml version="1.0" encoding="UTF-8"?>
  10. <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" version="2.1">
  11.  
  12. <persistence-unit name="PersistenceUnit">
  13. <!--<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>-->
  14. <class>gr.histopath.platform.model.TransferObjects.BodyPart</class>
  15. <class>gr.histopath.platform.model.TransferObjects.City</class>
  16. <class>gr.histopath.platform.model.TransferObjects.Clinic</class>
  17. <class>gr.histopath.platform.model.TransferObjects.Doctor</class>
  18. <class>gr.histopath.platform.model.TransferObjects.Incident</class>
  19. <class>gr.histopath.platform.model.TransferObjects.Patient</class>
  20. <class>gr.histopath.platform.model.TransferObjects.SigningDoctor</class> <class>gr.histopath.platform.model.TransferObjects.Specialty</class>
  21. <class>gr.histopath.platform.model.TransferObjects.User</class>
  22.  
  23. <properties>
  24. <!--<property name="hibernate.hbm2ddl.auto" value="create"/>-->
  25. <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/histopath.gr?useSSL=false&useLegacyDatetimeCode=false&serverTimezone=Europe/Athens"/>
  26. <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
  27. <property name="hibernate.connection.username" value="histopathUser"/>
  28. <!--<property name="hibernate.connection.username" value="root"/>-->
  29. <property name="hibernate.connection.password" value="h1s+0p@+h"/>
  30. <!--<property name="hibernate.connection.password" value="Malak1es"/>-->
  31. <property name="hibernate.archive.autodetection" value="class"/>
  32. <property name="hibernate.show_sql" value="true"/>
  33. <property name="hibernate.format_sql" value="true"/>
  34. <property name="hbm2ddl.auto" value="update"/>
  35. <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
  36. <property name="hibernate.connection.provider_class" value="org.hibernate.c3p0.internal.C3P0ConnectionProvider"/>
  37. <property name="hibernate.connection.CharSet" value="utf8"/>
  38. <property name="hibernate.connection.characterEncoding" value="utf8"/>
  39. <property name="hibernate.connection.useUnicode" value="true"/>
  40. <property name="connection.pool_size" value="1"/>
  41.  
  42. <!--<property name="hibernate.search.default.directory_provider" value="filesystem"/>-->
  43. <!-- hibernate c3p0 connection pooling configuration -->
  44. <property name="hibernate.c3p0.acquire_increment" value="1"/>
  45. <property name="hibernate.c3p0.idle_test_period" value="60"/> <!-- seconds -->
  46. <property name="hibernate.c3p0.min_size" value="5"/>
  47. <property name="hibernate.c3p0.max_size" value="20"/>
  48. <property name="hibernate.c3p0.max_statements" value="50"/>
  49. <property name="hibernate.c3p0.timeout" value="0"/> <!-- seconds -->
  50. <property name="hibernate.c3p0.acquireRetryAttempts" value="1"/>
  51. <property name="hibernate.c3p0.acquireRetryDelay" value="250"/>
  52.  
  53. </properties>
  54. </persistence-unit>
  55. </persistence>
  56.  
  57. package gr.histopath.platform.model.TransferObjects;
  58.  
  59. import com.fasterxml.jackson.annotation.JsonIgnore;
  60.  
  61. import javax.persistence.*;
  62. import java.util.Collection;
  63. import java.util.Objects;
  64.  
  65. @Entity
  66. public class City {
  67. private int id;
  68. private String name;
  69. private Collection<Doctor> doctors;
  70. private Collection<Patient> patients;
  71.  
  72. @Id
  73. @Column(name = "id")
  74. public int getId() {
  75. return id;
  76. }
  77.  
  78. public void setId(int id) {
  79. this.id = id;
  80. }
  81.  
  82. @Basic
  83. @Column(name = "name")
  84. public String getName() {
  85. return name;
  86. }
  87.  
  88. public void setName(String name) {
  89. this.name = name;
  90. }
  91.  
  92. @Override
  93. public boolean equals(Object o) {
  94. if (this == o) return true;
  95. if (o == null || getClass() != o.getClass()) return false;
  96. City city = (City) o;
  97. return id == city.id &&
  98. Objects.equals(name, city.name);
  99. }
  100.  
  101. @Override
  102. public int hashCode() {
  103.  
  104. return Objects.hash(id, name);
  105. }
  106.  
  107. @OneToMany(mappedBy = "city")
  108. @JsonIgnore
  109. public Collection<Doctor> getDoctors() {
  110. return doctors;
  111. }
  112.  
  113. public void setDoctors(Collection<Doctor> doctorsById) {
  114. this.doctors = doctorsById;
  115. }
  116.  
  117. @OneToMany(mappedBy = "city")
  118. @JsonIgnore
  119. public Collection<Patient> getPatients() {
  120. return patients;
  121. }
  122.  
  123. public void setPatients(Collection<Patient> patientsById) {
  124. this.patients = patientsById;
  125. }
  126. }
  127.  
  128. package gr.histopath.platform.model.TransferObjects;
  129.  
  130. import com.fasterxml.jackson.annotation.JsonIgnore;
  131.  
  132. import javax.persistence.*;
  133. import java.util.Collection;
  134. import java.util.Objects;
  135.  
  136. @Entity
  137. public class Doctor {
  138. private int id;
  139. private String email;
  140. private String fatherName;
  141. private String firstName;
  142. private String lastName;
  143. private String telephone;
  144. private City city;
  145. private Specialty specialty;
  146. private Collection<Incident> incidents;
  147.  
  148. @Id
  149. @Column(name = "id")
  150. public int getId() {
  151. return id;
  152. }
  153.  
  154. public void setId(int id) {
  155. this.id = id;
  156. }
  157.  
  158. @Basic
  159. @Column(name = "email")
  160. public String getEmail() {
  161. return email;
  162. }
  163.  
  164. public void setEmail(String email) {
  165. this.email = email;
  166. }
  167.  
  168. @Basic
  169. @Column(name = "fatherName")
  170. public String getFatherName() {
  171. return fatherName;
  172. }
  173.  
  174. public void setFatherName(String fatherName) {
  175. this.fatherName = fatherName;
  176. }
  177.  
  178. @Basic
  179. @Column(name = "firstName")
  180. public String getFirstName() {
  181. return firstName;
  182. }
  183.  
  184. public void setFirstName(String firstName) {
  185. this.firstName = firstName;
  186. }
  187.  
  188. @Basic
  189. @Column(name = "lastName")
  190. public String getLastName() {
  191. return lastName;
  192. }
  193.  
  194. public void setLastName(String lastName) {
  195. this.lastName = lastName;
  196. }
  197.  
  198. @Basic
  199. @Column(name = "telephone")
  200. public String getTelephone() {
  201. return telephone;
  202. }
  203.  
  204. public void setTelephone(String telephone) {
  205. this.telephone = telephone;
  206. }
  207.  
  208. @Override
  209. public boolean equals(Object o) {
  210. if (this == o) return true;
  211. if (o == null || getClass() != o.getClass()) return false;
  212. Doctor doctor = (Doctor) o;
  213. return id == doctor.id &&
  214. Objects.equals(email, doctor.email) &&
  215. Objects.equals(fatherName, doctor.fatherName) &&
  216. Objects.equals(firstName, doctor.firstName) &&
  217. Objects.equals(lastName, doctor.lastName) &&
  218. Objects.equals(telephone, doctor.telephone);
  219. }
  220.  
  221. @Override
  222. public int hashCode() {
  223.  
  224. return Objects.hash(id, email, fatherName, firstName, lastName, telephone, city, specialty);
  225. }
  226.  
  227. @ManyToOne
  228. @JoinColumn(name = "city_id", referencedColumnName = "id")
  229. @JsonIgnore
  230. public City getCity() {
  231. return city;
  232. }
  233.  
  234. public void setCity(City cityByCityId) {
  235. this.city = cityByCityId;
  236. }
  237.  
  238. @ManyToOne
  239. @JoinColumn(name = "specialty_id", referencedColumnName = "id")
  240. @JsonIgnore
  241. public Specialty getSpecialty() {
  242. return specialty;
  243. }
  244.  
  245. public void setSpecialty(Specialty specialtyBySpecialtyId) {
  246. this.specialty = specialtyBySpecialtyId;
  247. }
  248.  
  249. @OneToMany(mappedBy = "doctor")
  250. @JsonIgnore
  251. public Collection<Incident> getIncidents() {
  252. return incidents;
  253. }
  254.  
  255. public void setIncidents(Collection<Incident> incidentsById) {
  256. this.incidents = incidentsById;
  257. }
  258. }
  259.  
  260. package gr.histopath.platform.model.TransferObjects;
  261.  
  262. import com.fasterxml.jackson.annotation.JsonIgnore;
  263.  
  264. import javax.persistence.*;
  265. import java.sql.Date;
  266. import java.util.Collection;
  267. import java.util.Objects;
  268.  
  269. @Entity
  270. public class Patient {
  271. private int id;
  272. private Date birthday;
  273. private String email;
  274. private String fatherName;
  275. private String firstName;
  276. private String lastName;
  277. private String telephone;
  278. private Boolean sex;
  279. private Collection<Incident> incidents;
  280. private City city;
  281.  
  282. @Id
  283. @Column(name = "id")
  284. public int getId() {
  285. return id;
  286. }
  287.  
  288. public void setId(int id) {
  289. this.id = id;
  290. }
  291.  
  292. @Basic
  293. @Column(name = "birthday")
  294. public Date getBirthday() {
  295. return birthday;
  296. }
  297.  
  298. public void setBirthday(Date birthday) {
  299. this.birthday = birthday;
  300. }
  301.  
  302. @Basic
  303. @Column(name = "email")
  304. public String getEmail() {
  305. return email;
  306. }
  307.  
  308. public void setEmail(String email) {
  309. this.email = email;
  310. }
  311.  
  312. @Basic
  313. @Column(name = "fatherName")
  314. public String getFatherName() {
  315. return fatherName;
  316. }
  317.  
  318. public void setFatherName(String fatherName) {
  319. this.fatherName = fatherName;
  320. }
  321.  
  322. @Basic
  323. @Column(name = "firstName")
  324. public String getFirstName() {
  325. return firstName;
  326. }
  327.  
  328. public void setFirstName(String firstName) {
  329. this.firstName = firstName;
  330. }
  331.  
  332. @Basic
  333. @Column(name = "lastName")
  334. public String getLastName() {
  335. return lastName;
  336. }
  337.  
  338. public void setLastName(String lastName) {
  339. this.lastName = lastName;
  340. }
  341.  
  342. @Basic
  343. @Column(name = "telephone")
  344. public String getTelephone() {
  345. return telephone;
  346. }
  347.  
  348. public void setTelephone(String telephone) {
  349. this.telephone = telephone;
  350. }
  351.  
  352. @Basic
  353. @Column(name = "sex")
  354. public Boolean getSex() {
  355. return sex;
  356. }
  357.  
  358. public void setSex(Boolean sex) {
  359. this.sex = sex;
  360. }
  361.  
  362.  
  363. @Override
  364. public boolean equals(Object o) {
  365. if (this == o) return true;
  366. if (o == null || getClass() != o.getClass()) return false;
  367. Patient patient = (Patient) o;
  368. return id == patient.id &&
  369. Objects.equals(birthday, patient.birthday) &&
  370. Objects.equals(email, patient.email) &&
  371. Objects.equals(fatherName, patient.fatherName) &&
  372. Objects.equals(firstName, patient.firstName) &&
  373. Objects.equals(lastName, patient.lastName) &&
  374. Objects.equals(telephone, patient.telephone) &&
  375. Objects.equals(sex, patient.sex) &&
  376. Objects.equals(incidents, patient.incidents) &&
  377. Objects.equals(city, patient.city);
  378. }
  379.  
  380. @Override
  381. public int hashCode() {
  382. return Objects.hash(id, birthday, email, fatherName, firstName, lastName, telephone, sex, incidents, city);
  383. }
  384.  
  385. @OneToMany(mappedBy = "patient")
  386. @JsonIgnore
  387. public Collection<Incident> getIncidents() {
  388. return incidents;
  389. }
  390.  
  391. public void setIncidents(Collection<Incident> incidentsById) {
  392. this.incidents = incidentsById;
  393. }
  394.  
  395. @ManyToOne
  396. @JsonIgnore
  397. @JoinColumn(name = "city_id", referencedColumnName = "id")
  398. public City getCity() {
  399. return city;
  400. }
  401.  
  402. public void setCity(City cityByCityId) {
  403. this.city = cityByCityId;
  404. }
  405. }
  406.  
  407. package gr.histopath.platform.model.TransferObjects;
  408.  
  409. import com.fasterxml.jackson.annotation.JsonIgnore;
  410.  
  411. import javax.persistence.*;
  412. import java.util.Collection;
  413. import java.util.Objects;
  414.  
  415. @Entity
  416. public class Specialty {
  417. private int id;
  418. private String name;
  419. private Collection<Doctor> doctors;
  420.  
  421. @Id
  422. @Column(name = "id")
  423. public int getId() {
  424. return id;
  425. }
  426.  
  427. public void setId(int id) {
  428. this.id = id;
  429. }
  430.  
  431. @Basic
  432. @Column(name = "name")
  433. public String getName() {
  434. return name;
  435. }
  436.  
  437. public void setName(String name) {
  438. this.name = name;
  439. }
  440.  
  441. @Override
  442. public boolean equals(Object o) {
  443. if (this == o) return true;
  444. if (o == null || getClass() != o.getClass()) return false;
  445. Specialty specialty = (Specialty) o;
  446. return id == specialty.id &&
  447. Objects.equals(name, specialty.name);
  448. }
  449.  
  450. @Override
  451. public int hashCode() {
  452.  
  453. return Objects.hash(id, name);
  454. }
  455.  
  456. @OneToMany(mappedBy = "specialty")
  457. @JsonIgnore
  458. public Collection<Doctor> getDoctors() {
  459. return doctors;
  460. }
  461.  
  462. public void setDoctors(Collection<Doctor> doctorsById) {
  463. this.doctors = doctorsById;
  464. }
  465. }
Add Comment
Please, Sign In to add comment