Code Review
/
portal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "LanguageController tests up"
[portal.git]
/
portal-BE
/
src
/
main
/
java
/
org
/
onap
/
portal
/
domain
/
db
/
fn
/
FnLanguage.java
diff --git
a/portal-BE/src/main/java/org/onap/portal/domain/db/fn/FnLanguage.java
b/portal-BE/src/main/java/org/onap/portal/domain/db/fn/FnLanguage.java
index
09cb5a6
..
d9aff94
100644
(file)
--- a/
portal-BE/src/main/java/org/onap/portal/domain/db/fn/FnLanguage.java
+++ b/
portal-BE/src/main/java/org/onap/portal/domain/db/fn/FnLanguage.java
@@
-40,11
+40,17
@@
package org.onap.portal.domain.db.fn;
package org.onap.portal.domain.db.fn;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import java.util.ArrayList;
+import java.util.List;
+import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Entity;
+import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.validation.constraints.Digits;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.validation.constraints.Digits;
@@
-72,7
+78,8
@@
CREATE TABLE `fn_language` (
@Getter
@Setter
@Entity
@Getter
@Setter
@Entity
-@SequenceGenerator(name="seq", initialValue=3, allocationSize=100)
+@JsonInclude()
+@SequenceGenerator(name="seq", initialValue=1000, allocationSize=100000)
public class FnLanguage {
@Id
public class FnLanguage {
@Id
@@
-82,13
+89,20
@@
public class FnLanguage {
private Long languageId;
@Column(name = "language_name", length = 100, nullable = false)
@Size(max = 100)
private Long languageId;
@Column(name = "language_name", length = 100, nullable = false)
@Size(max = 100)
- @NotNull
+ @NotNull
(message = "languageName must not be null")
@SafeHtml
private String languageName;
@Column(name = "language_alias", length = 100, nullable = false)
@Size(max = 100)
@SafeHtml
private String languageName;
@Column(name = "language_alias", length = 100, nullable = false)
@Size(max = 100)
- @NotNull
+ @NotNull
(message = "languageAlias must not be null")
@SafeHtml
private String languageAlias;
@SafeHtml
private String languageAlias;
+ @OneToMany(
+ targetEntity = FnUser.class,
+ mappedBy = "languageId",
+ cascade = CascadeType.ALL,
+ fetch = FetchType.EAGER
+ )
+ private List<FnUser> fnUsers = new ArrayList<>();
}
}