Last change
on this file was ed20c2c, checked in by HumaSejdini <humasejdini12@…>, 2 years ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Rev | Line | |
---|
[ed20c2c] | 1 | package com.example.baza.model;
|
---|
| 2 |
|
---|
| 3 | import javax.persistence.*;
|
---|
| 4 | import java.time.Instant;
|
---|
| 5 |
|
---|
| 6 | @Entity
|
---|
| 7 | @Table(name = "chlen", schema = "project")
|
---|
| 8 | public class Chlen2 {
|
---|
| 9 | @Id
|
---|
| 10 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
| 11 | @Column(name = "id_chovek", nullable = false)
|
---|
| 12 | private Integer id;
|
---|
| 13 |
|
---|
| 14 | @MapsId
|
---|
| 15 | @OneToOne(fetch = FetchType.LAZY, optional = false)
|
---|
| 16 | @JoinColumn(name = "id_chovek", nullable = false)
|
---|
| 17 | private Chovek2 chovek;
|
---|
| 18 |
|
---|
| 19 | @Column(name = "broj", nullable = false)
|
---|
| 20 | private Integer broj;
|
---|
| 21 |
|
---|
| 22 | @Column(name = "datum_na_zachlenuvanje", nullable = false)
|
---|
| 23 | private Instant datumNaZachlenuvanje;
|
---|
| 24 |
|
---|
| 25 | public Instant getDatumNaZachlenuvanje() {
|
---|
| 26 | return datumNaZachlenuvanje;
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | public void setDatumNaZachlenuvanje(Instant datumNaZachlenuvanje) {
|
---|
| 30 | this.datumNaZachlenuvanje = datumNaZachlenuvanje;
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | public Integer getBroj() {
|
---|
| 34 | return broj;
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | public void setBroj(Integer broj) {
|
---|
| 38 | this.broj = broj;
|
---|
| 39 | }
|
---|
| 40 |
|
---|
| 41 | public Chovek2 getChovek2() {
|
---|
| 42 | return chovek;
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 | public void setChovek2(Chovek2 chovek2) {
|
---|
| 46 | this.chovek = chovek2;
|
---|
| 47 | }
|
---|
| 48 |
|
---|
| 49 | public Integer getId() {
|
---|
| 50 | return id;
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 | public void setId(Integer id) {
|
---|
| 54 | this.id = id;
|
---|
| 55 | }
|
---|
| 56 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.