-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotificationEntity.java
More file actions
208 lines (187 loc) · 5.45 KB
/
NotificationEntity.java
File metadata and controls
208 lines (187 loc) · 5.45 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
package net.theevilreaper.vulpes.api.model;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import net.theevilreaper.vulpes.api.generator.VulpesGenerator;
import java.util.UUID;
/**
* Represents a Notification in the system. This class is used as an entity for persistence
* with JPA and Micronaut Data. It contains details related to a notification such as name,
* description, material, etc.
* <p>
* This class is mapped to the database table "vulpes_notifications" and contains fields that
* are automatically persisted by the JPA and Micronaut Data layers.
* </p>
*/
@Entity(name = "notifications")
public class NotificationEntity implements VulpesModel {
@Id
@GeneratedValue(strategy = GenerationType.UUID)
@VulpesGenerator
private UUID id;
private String modelName;
private String name;
private String description;
private String material;
private String frameType;
private String title;
/**
* Default constructor for JPA and Micronaut Data.
* <p>
* This constructor is required for the JPA provider to instantiate the entity.
* </p>
*/
public NotificationEntity() {
// No-argument constructor for JPA
}
/**
* Constructs a new {@link NotificationEntity} with the specified values.
*
* @param id the unique identifier of the notification
* @param modelName the model name associated with the notification
* @param name the name of the notification
* @param description a description of the notification
* @param material the material type associated with the notification
* @param frameType the frame type associated with the notification
* @param title the title of the notification
*/
public NotificationEntity(UUID id, String modelName, String name, String description, String material, String frameType, String title) {
this.id = id;
this.modelName = modelName;
this.name = name;
this.description = description;
this.material = material;
this.frameType = frameType;
this.title = title;
}
/**
* Returns the unique identifier of the notification
*
* @return the unique identifier of the notification
*/
public UUID getId() {
return id;
}
/**
* Sets the unique identifier of the notification
*
* @param id the unique identifier to set
*/
public void setId(UUID id) {
this.id = id;
}
/**
* Returns the model name associated with the notification
*
* @return the model name of the notification
*/
public String getModelName() {
return modelName;
}
/**
* Sets the model name associated with the notification
*
* @param modelName the model name to set
*/
public void setModelName(String modelName) {
this.modelName = modelName;
}
/**
* Returns the name of the notification
*
* @return the name of the notification
*/
public String getName() {
return name;
}
/**
* Sets the name of the notification
*
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* Returns the description of the notification
*
* @return the description of the notification
*/
public String getDescription() {
return description;
}
/**
* Sets the description of the notification
*
* @param description the description to set
*/
public void setDescription(String description) {
this.description = description;
}
/**
* Returns the material type associated with the notification
*
* @return the material type of the notification
*/
public String getMaterial() {
return material;
}
/**
* Sets the material type associated with the notification
*
* @param material the material to set
*/
public void setMaterial(String material) {
this.material = material;
}
/**
* Returns the frame type associated with the notification
*
* @return the frame type of the notification
*/
public String getFrameType() {
return frameType;
}
/**
* Sets the frame type associated with the notification
*
* @param frameType the frame type to set
*/
public void setFrameType(String frameType) {
this.frameType = frameType;
}
/**
* Returns the title of the notification
*
* @return the title of the notification
*/
public String getTitle() {
return title;
}
/**
* Sets the title of the notification
*
* @param title the title to set
*/
public void setTitle(String title) {
this.title = title;
}
/**
* Provides a string representation of the NotificationModel
*
* @return a string representation
*/
@Override
public String toString() {
return "NotificationModel{" +
"id='" + id + '\'' +
", modelName='" + modelName + '\'' +
", name='" + name + '\'' +
", description='" + description + '\'' +
", material='" + material + '\'' +
", frameType='" + frameType + '\'' +
", title='" + title + '\'' +
'}';
}
}