Code Review
/
portal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
WidgetsCatalogControllerTest up
[portal.git]
/
portal-BE
/
src
/
main
/
java
/
org
/
onap
/
portal
/
domain
/
db
/
ep
/
EpWidgetCatalog.java
diff --git
a/portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpWidgetCatalog.java
b/portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpWidgetCatalog.java
index
260483f
..
2068e21
100644
(file)
--- a/
portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpWidgetCatalog.java
+++ b/
portal-BE/src/main/java/org/onap/portal/domain/db/ep/EpWidgetCatalog.java
@@
-40,8
+40,8
@@
package org.onap.portal.domain.db.ep;
package org.onap.portal.domain.db.ep;
-import java.
util.ArrayList
;
-import java.util.
Lis
t;
+import java.
io.Serializable
;
+import java.util.
Se
t;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
@@
-60,6
+60,7
@@
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import lombok.AllArgsConstructor;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import lombok.AllArgsConstructor;
+import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@@
-83,11
+84,11
@@
CREATE TABLE `ep_widget_catalog` (
@Getter
@Setter
@Entity
@Getter
@Setter
@Entity
-public class EpWidgetCatalog {
+@Builder
+public class EpWidgetCatalog implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name = "widget_id", length = 11, nullable = false, columnDefinition = "int(11) AUTO_INCREMENT")
- @Digits(integer = 11, fraction = 0)
+ @Column(name = "widget_id", nullable = false)
private Long widgetId;
@Column(name = "wdg_name", length = 100, columnDefinition = "varchar(100) default '?'", nullable = false)
@Size(max = 100)
private Long widgetId;
@Column(name = "wdg_name", length = 100, columnDefinition = "varchar(100) default '?'", nullable = false)
@Size(max = 100)
@@
-106,12
+107,9
@@
public class EpWidgetCatalog {
@NotNull
@SafeHtml
private String wdgFileLoc;
@NotNull
@SafeHtml
private String wdgFileLoc;
- @Column(name = "all_user_flag", length = 1, columnDefinition = "char(1) not null default 'N'", nullable = false)
- @Pattern(regexp = "[YNyn]")
- @Size(max = 1)
- @SafeHtml
+ @Column(name = "all_user_flag", length = 1, columnDefinition = "boolean default '0'", nullable = false)
@NotNull
@NotNull
- private
String
allUserFlag;
+ private
Boolean
allUserFlag;
@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinTable(
name = "ep_widget_microservice",
@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinTable(
name = "ep_widget_microservice",
@@
-122,40
+120,40
@@
public class EpWidgetCatalog {
@Index(name = "FK_EP_WIDGET_MICROSERVICE_EP_WIDGET", columnList = "widget_id")
}
)
@Index(name = "FK_EP_WIDGET_MICROSERVICE_EP_WIDGET", columnList = "widget_id")
}
)
- private
List<EpMicroservice> epMicroservices = new ArrayList<>()
;
+ private
Set<EpMicroservice> epMicroservices
;
@OneToMany(
targetEntity = EpWidgetCatalogRole.class,
mappedBy = "widgetId",
cascade = CascadeType.ALL,
fetch = FetchType.LAZY
)
@OneToMany(
targetEntity = EpWidgetCatalogRole.class,
mappedBy = "widgetId",
cascade = CascadeType.ALL,
fetch = FetchType.LAZY
)
- private
List<EpWidgetCatalogRole> widgetCatalogRoles = new ArrayList<>()
;
+ private
Set<EpWidgetCatalogRole> widgetCatalogRoles
;
@OneToMany(
targetEntity = EpPersUserWidgetSel.class,
mappedBy = "widgetId",
cascade = CascadeType.ALL,
fetch = FetchType.LAZY
)
@OneToMany(
targetEntity = EpPersUserWidgetSel.class,
mappedBy = "widgetId",
cascade = CascadeType.ALL,
fetch = FetchType.LAZY
)
- private
List<EpPersUserWidgetSel> epPersUserWidgetSels = new ArrayList<>()
;
+ private
Set<EpPersUserWidgetSel> epPersUserWidgetSels
;
@OneToMany(
targetEntity = EpPersUserWidgetSel.class,
mappedBy = "widgetId",
cascade = CascadeType.ALL,
fetch = FetchType.LAZY
)
@OneToMany(
targetEntity = EpPersUserWidgetSel.class,
mappedBy = "widgetId",
cascade = CascadeType.ALL,
fetch = FetchType.LAZY
)
- private
List<EpPersUserWidgetSel> persUserWidgetSels = new ArrayList<>()
;
+ private
Set<EpPersUserWidgetSel> persUserWidgetSels
;
@OneToMany(
targetEntity = EpPersUserWidgetPlacement.class,
mappedBy = "widgetId",
cascade = CascadeType.ALL,
fetch = FetchType.LAZY
)
@OneToMany(
targetEntity = EpPersUserWidgetPlacement.class,
mappedBy = "widgetId",
cascade = CascadeType.ALL,
fetch = FetchType.LAZY
)
- private
List<EpPersUserWidgetPlacement> epPersUserWidgetPlacements = new ArrayList<>()
;
+ private
Set<EpPersUserWidgetPlacement> epPersUserWidgetPlacements
;
@OneToMany(
targetEntity = EpWidgetCatalogParameter.class,
mappedBy = "widgetId",
cascade = CascadeType.ALL,
fetch = FetchType.LAZY
)
@OneToMany(
targetEntity = EpWidgetCatalogParameter.class,
mappedBy = "widgetId",
cascade = CascadeType.ALL,
fetch = FetchType.LAZY
)
- private
List<EpWidgetCatalogParameter> epWidgetCatalogParameters = new ArrayList<>()
;
+ private
Set<EpWidgetCatalogParameter> epWidgetCatalogParameters
;
}
}