Commit 4dc4ea2f authored by Mohamed Khalil Labidi's avatar Mohamed Khalil Labidi
Browse files

Merge branch 'get-monitors' into 'proactive-dev'

Change get monitors to get EmsDeploymentRequest class instances

See merge request !131
parents 6ca9651d 0c3a61e2
...@@ -183,11 +183,11 @@ public class PAGateway { ...@@ -183,11 +183,11 @@ public class PAGateway {
/** /**
* *
* @return the list of all available monitors * @return the list of all available EMS deployment monitor requests
*/ */
public List<Monitor> getMonitorsList() { public List<EmsDeploymentRequest> getMonitorsList() {
return EntityManagerHelper.createQuery("SELECT mon FROM Monitor mon", return EntityManagerHelper.createQuery("SELECT emsdr FROM EmsDeploymentRequest emsdr",
Monitor.class).getResultList(); EmsDeploymentRequest.class).getResultList();
} }
......
package org.activeeon.morphemic.model;
import lombok.*;
import javax.persistence.*;
import java.io.Serializable;
@AllArgsConstructor
@NoArgsConstructor
@ToString(callSuper = true)
@Getter
@Setter
@Entity
@Table(name = "MONITOR")
public class Monitor implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "MONITOR_ID")
private int monitorId;
}
...@@ -43,10 +43,6 @@ public class Task implements Serializable { ...@@ -43,10 +43,6 @@ public class Task implements Serializable {
@Fetch(value = FetchMode.SUBSELECT) @Fetch(value = FetchMode.SUBSELECT)
private List<Port> portsToOpen; private List<Port> portsToOpen;
@OneToMany(fetch = FetchType.EAGER, orphanRemoval = true, cascade = CascadeType.REFRESH)
@Fetch(value = FetchMode.SUBSELECT)
private List<Monitor> monitors;
@Column(name = "PARENT_TASKS") @Column(name = "PARENT_TASKS")
@ElementCollection(targetClass=String.class) @ElementCollection(targetClass=String.class)
private List<String> parentTasks; private List<String> parentTasks;
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
<class>org.activeeon.morphemic.model.PACloud</class> <class>org.activeeon.morphemic.model.PACloud</class>
<class>org.activeeon.morphemic.model.Deployment</class> <class>org.activeeon.morphemic.model.Deployment</class>
<class>org.activeeon.morphemic.model.Port</class> <class>org.activeeon.morphemic.model.Port</class>
<class>org.activeeon.morphemic.model.Monitor</class>
<class>org.activeeon.morphemic.model.Credentials</class> <class>org.activeeon.morphemic.model.Credentials</class>
<class>org.activeeon.morphemic.model.EmsDeploymentRequest</class> <class>org.activeeon.morphemic.model.EmsDeploymentRequest</class>
<class>org.activeeon.morphemic.model.NodeCandidate</class> <class>org.activeeon.morphemic.model.NodeCandidate</class>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment