Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- To change this license header, choose License Headers in Project Properties.
- To change this template file, choose Tools | Templates
- and open the template in the editor.
- -->
- <persistence version="2.1"
- xmlns="http://xmlns.jcp.org/xml/ns/persistence"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
- http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
- >
- <persistence-unit name="yritys">
- <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
- <class>tietokantahommat.harjoitus9.Postinumeroalue</class>
- <properties>
- <property name="javax.persistence.jdbc.url" value="jdbc:mysql://10.114.32.24:3306/yritys"/>
- <property name="javax.persistence.jdbc.user" value="root"/>
- <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
- <property name="javax.persistence.jdbc.password" value="Mariaroot7"/>
- <property name="javax.persistence.schema-generation.database.action" value="none"/>
- <property name="hibernate.show_sql" value="true"/>
- </properties>
- </persistence-unit>
- </persistence>
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package tietokantahommat.harjoitus9;
- import java.io.Serializable;
- import javax.persistence.*;
- /**
- *
- * @author mirotol
- */
- @Entity
- @Table(name = "POSTITUS")
- public class Postinumeroalue implements Serializable {
- private String postinumero, postitoimipaikka;
- public Postinumeroalue() {
- }
- public Postinumeroalue(String postinumero, String postitoimipaikka) {
- this.postinumero = postinumero;
- this.postitoimipaikka = postitoimipaikka;
- }
- @Id
- @Column(name = "Postinumero")
- public String getPostinumero() {
- return postinumero;
- }
- @Column(name = "Postitoimipaikka")
- public String getPostitoimipaikka() {
- return postitoimipaikka;
- }
- public void setPostinumero(String postinumero) {
- this.postinumero = postinumero;
- }
- public void setPostitoimipaikka(String postitoimipaikka) {
- this.postitoimipaikka = postitoimipaikka;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement