Last change
on this file since 2d8c0e7 was 5577566, checked in by NikolaCenevski <cenevskinikola@…>, 3 years ago |
prototip part 2
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | package it.finki.charitable.entities;
|
---|
2 |
|
---|
3 | import javax.persistence.*;
|
---|
4 |
|
---|
5 | @Entity
|
---|
6 | @Table(name = "donation_information")
|
---|
7 | public class DonationInformation {
|
---|
8 |
|
---|
9 | @SequenceGenerator(
|
---|
10 | name = "donation_information_sequence",
|
---|
11 | sequenceName = "donation_information_sequence",
|
---|
12 | allocationSize = 1
|
---|
13 | )
|
---|
14 | @GeneratedValue(
|
---|
15 | strategy = GenerationType.SEQUENCE,
|
---|
16 | generator = "donation_information_sequence"
|
---|
17 | )
|
---|
18 | @Id
|
---|
19 | @Column(
|
---|
20 | name = "id",
|
---|
21 | nullable = false,
|
---|
22 | updatable = false
|
---|
23 | )
|
---|
24 | private Long id;
|
---|
25 |
|
---|
26 | private float donatedAmount;
|
---|
27 | private Long postId;
|
---|
28 | private String title;
|
---|
29 |
|
---|
30 | public DonationInformation() {
|
---|
31 | }
|
---|
32 |
|
---|
33 | public DonationInformation(float donatedAmount, Long postId, String title) {
|
---|
34 | this.donatedAmount = donatedAmount;
|
---|
35 | this.postId = postId;
|
---|
36 | this.title = title;
|
---|
37 | }
|
---|
38 |
|
---|
39 | public Long getId() {
|
---|
40 | return id;
|
---|
41 | }
|
---|
42 |
|
---|
43 | public void setId(Long id) {
|
---|
44 | this.id = id;
|
---|
45 | }
|
---|
46 |
|
---|
47 | public float getDonatedAmount() {
|
---|
48 | return donatedAmount;
|
---|
49 | }
|
---|
50 |
|
---|
51 | public void setDonatedAmount(float donatedAmount) {
|
---|
52 | this.donatedAmount = donatedAmount;
|
---|
53 | }
|
---|
54 |
|
---|
55 | public Long getPostId() {
|
---|
56 | return postId;
|
---|
57 | }
|
---|
58 |
|
---|
59 | public void setPostId(Long postId) {
|
---|
60 | this.postId = postId;
|
---|
61 | }
|
---|
62 |
|
---|
63 | public String getTitle() {
|
---|
64 | return title;
|
---|
65 | }
|
---|
66 |
|
---|
67 | public void setTitle(String title) {
|
---|
68 | this.title = title;
|
---|
69 | }
|
---|
70 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.