Michael Kulla
2022-12-10 1ff68f5aac03282c67ae271f1f0c5cfbd7ce17a0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package de.gedoplan.seminar.jpa.exercise.domain;
 
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
 
@Entity
@Table(name = Highway.TABLE_NAME)
public class Highway {
    
    public static final String TABLE_NAME = "JPA_HIGHWAY";
 
    @Id
    private int id;
    private String name;
    private String origin;
    private String destination;
    
    public Highway() {
    }
 
    public Highway(int id, String name, String origin, String destination) {
        this.id = id;
        this.name = name;
        this.origin = origin;
        this.destination = destination;
    }
 
    public int getId() {
        return this.id;
    }
 
    public void setId(int id) {
        this.id = id;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public void setOrigin(String origin) {
        this.origin = origin;
    }
 
    public void setDestination(String destination) {
        this.destination = destination;
    }
 
    public String getName() {
        return this.name;
    }
 
    public String getOrigin() {
        return this.origin;
    }
 
    public String getDestination() {
        return this.destination;
    }
 
    @Override
    public String toString() {
        return "Highway [id=" + id + ", name=" + name + ", origin=" + origin + ", destination=" + destination + "]";
    }
 
}