Last change
on this file was ed20c2c, checked in by HumaSejdini <humasejdini12@…>, 2 years ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
996 bytes
|
Rev | Line | |
---|
[ed20c2c] | 1 | package com.example.baza.model;
|
---|
| 2 |
|
---|
| 3 |
|
---|
| 4 | import javax.persistence.*;
|
---|
| 5 |
|
---|
| 6 | @Entity
|
---|
| 7 | @Table(name = "bibliotekar", schema = "project")
|
---|
| 8 | public class Bibliotekar2 {
|
---|
| 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 = "id_na_bibliotekar", nullable = false)
|
---|
| 20 | private Integer idNaBibliotekar;
|
---|
| 21 |
|
---|
| 22 | public Integer getIdNaBibliotekar() {
|
---|
| 23 | return idNaBibliotekar;
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | public void setIdNaBibliotekar(Integer idNaBibliotekar) {
|
---|
| 27 | this.idNaBibliotekar = idNaBibliotekar;
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | public Chovek2 getChovek() {
|
---|
| 31 | return chovek;
|
---|
| 32 | }
|
---|
| 33 |
|
---|
| 34 | public void setChovek(Chovek2 chovek) {
|
---|
| 35 | this.chovek = chovek;
|
---|
| 36 | }
|
---|
| 37 |
|
---|
| 38 | public Integer getId() {
|
---|
| 39 | return id;
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | public void setId(Integer id) {
|
---|
| 43 | this.id = id;
|
---|
| 44 | }
|
---|
| 45 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.