Advertisement
Guest User

Untitled

a guest
Feb 26th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.43 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. To change this license header, choose License Headers in Project Properties.
  4. To change this template file, choose Tools | Templates
  5. and open the template in the editor.
  6. -->
  7.  
  8. <persistence version="2.1"
  9. xmlns="http://xmlns.jcp.org/xml/ns/persistence"
  10. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  11. xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
  12. http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
  13. >
  14.  
  15. <persistence-unit name="yritys">
  16. <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
  17. <class>tietokantahommat.harjoitus9.Postinumeroalue</class>
  18. <properties>
  19. <property name="javax.persistence.jdbc.url" value="jdbc:mysql://10.114.32.24:3306/yritys"/>
  20. <property name="javax.persistence.jdbc.user" value="root"/>
  21. <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
  22. <property name="javax.persistence.jdbc.password" value="Mariaroot7"/>
  23. <property name="javax.persistence.schema-generation.database.action" value="none"/>
  24. <property name="hibernate.show_sql" value="true"/>
  25. </properties>
  26. </persistence-unit>
  27. </persistence>
  28.  
  29.  
  30.  
  31.  
  32.  
  33. /*
  34. * To change this license header, choose License Headers in Project Properties.
  35. * To change this template file, choose Tools | Templates
  36. * and open the template in the editor.
  37. */
  38. package tietokantahommat.harjoitus9;
  39.  
  40. import java.io.Serializable;
  41. import javax.persistence.*;
  42. /**
  43. *
  44. * @author mirotol
  45. */
  46. @Entity
  47. @Table(name = "POSTITUS")
  48. public class Postinumeroalue implements Serializable {
  49.  
  50. private String postinumero, postitoimipaikka;
  51.  
  52. public Postinumeroalue() {
  53. }
  54.  
  55. public Postinumeroalue(String postinumero, String postitoimipaikka) {
  56. this.postinumero = postinumero;
  57. this.postitoimipaikka = postitoimipaikka;
  58. }
  59.  
  60. @Id
  61. @Column(name = "Postinumero")
  62. public String getPostinumero() {
  63. return postinumero;
  64. }
  65.  
  66. @Column(name = "Postitoimipaikka")
  67. public String getPostitoimipaikka() {
  68. return postitoimipaikka;
  69. }
  70.  
  71. public void setPostinumero(String postinumero) {
  72. this.postinumero = postinumero;
  73. }
  74.  
  75. public void setPostitoimipaikka(String postitoimipaikka) {
  76. this.postitoimipaikka = postitoimipaikka;
  77. }
  78.  
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement