summaryrefslogtreecommitdiffstats
path: root/cmso-service/src
diff options
context:
space:
mode:
Diffstat (limited to 'cmso-service/src')
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/model/Domain.java37
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/model/DomainData.java58
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/model/ElementData.java99
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/model/Schedule.java71
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/model/ScheduleApproval.java73
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/model/ScheduleQuery.java50
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/model/dao/ChangeManagementScheduleDAO.java29
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/model/dao/ElementDataDAO.java49
8 files changed, 293 insertions, 173 deletions
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/model/Domain.java b/cmso-service/src/main/java/org/onap/optf/cmso/model/Domain.java
index c7af7c5..c8f7e85 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/model/Domain.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/model/Domain.java
@@ -1,33 +1,28 @@
/*
- * Copyright © 2017-2018 AT&T Intellectual Property.
- * Modifications Copyright © 2018 IBM.
+ * Copyright � 2017-2018 AT&T Intellectual Property. Modifications Copyright � 2018 IBM.
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*
*
- * Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
- * you may not use this documentation except in compliance with the License.
- * You may obtain a copy of the License at
+ * Unless otherwise specified, all documentation contained herein is licensed under the Creative
+ * Commons License, Attribution 4.0 Intl. (the "License"); you may not use this documentation except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * https://creativecommons.org/licenses/by/4.0/
+ * https://creativecommons.org/licenses/by/4.0/
*
- * Unless required by applicable law or agreed to in writing, documentation
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
+ * Unless required by applicable law or agreed to in writing, documentation distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing permissions and
* limitations under the License.
-*/
+ */
package org.onap.optf.cmso.model;
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/model/DomainData.java b/cmso-service/src/main/java/org/onap/optf/cmso/model/DomainData.java
index 3bb0bea..b08bde9 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/model/DomainData.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/model/DomainData.java
@@ -1,39 +1,35 @@
/*
- * Copyright © 2017-2018 AT&T Intellectual Property.
- * Modifications Copyright © 2018 IBM.
+ * Copyright © 2017-2018 AT&T Intellectual Property. Modifications Copyright © 2018 IBM.
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*
*
- * Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
- * you may not use this documentation except in compliance with the License.
- * You may obtain a copy of the License at
+ * Unless otherwise specified, all documentation contained herein is licensed under the Creative
+ * Commons License, Attribution 4.0 Intl. (the "License"); you may not use this documentation except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * https://creativecommons.org/licenses/by/4.0/
+ * https://creativecommons.org/licenses/by/4.0/
*
- * Unless required by applicable law or agreed to in writing, documentation
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
+ * Unless required by applicable law or agreed to in writing, documentation distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing permissions and
* limitations under the License.
-*/
+ */
package org.onap.optf.cmso.model;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.util.UUID;
-
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
@@ -41,10 +37,6 @@ import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-import io.swagger.annotations.ApiModel;
-
/**
* The persistent class for the domain_data database table.
*
@@ -58,7 +50,7 @@ public class DomainData implements Serializable {
@JsonIgnore
@Id
- private UUID uuid;
+ private UUID uuid;
private String name;
@@ -73,16 +65,16 @@ public class DomainData implements Serializable {
public UUID getUuid() {
- return uuid;
- }
+ return uuid;
+ }
- public void setUuid(UUID uuid) {
- this.uuid = uuid;
- }
+ public void setUuid(UUID uuid) {
+ this.uuid = uuid;
+ }
- public String getName() {
+ public String getName() {
return this.name;
}
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/model/ElementData.java b/cmso-service/src/main/java/org/onap/optf/cmso/model/ElementData.java
new file mode 100644
index 0000000..b4114a8
--- /dev/null
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/model/ElementData.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright © 2017-2018 AT&T Intellectual Property. Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ *
+ *
+ * Unless otherwise specified, all documentation contained herein is licensed under the Creative
+ * Commons License, Attribution 4.0 Intl. (the "License"); you may not use this documentation except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * https://creativecommons.org/licenses/by/4.0/
+ *
+ * Unless required by applicable law or agreed to in writing, documentation distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.optf.cmso.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import io.swagger.annotations.ApiModel;
+import java.io.Serializable;
+import java.util.UUID;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.NamedQuery;
+import javax.persistence.Table;
+
+/**
+ * The persistent class for the domain_data database table.
+ *
+ */
+@Entity
+@Table(name = "ELEMENT_DATA")
+@NamedQuery(name = "ElementData.findAll", query = "SELECT d FROM ElementData d")
+@ApiModel(value = "Element data", description = "Element data represented as name/value pairs")
+public class ElementData implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ @JsonIgnore
+ @Id
+ private UUID uuid;
+
+ private String name;
+
+ private String value;
+
+ private UUID changeManagementSchedulesUuid;
+
+ public ElementData() {}
+
+
+ public UUID getUuid() {
+ return uuid;
+ }
+
+
+ public void setUuid(UUID uuid) {
+ this.uuid = uuid;
+ }
+
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getValue() {
+ return this.value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+
+ public UUID getChangeManagementSchedulesUuid() {
+ return changeManagementSchedulesUuid;
+ }
+
+
+ public void setChangeManagementSchedulesUuid(UUID changeManagementSchedulesUuid) {
+ this.changeManagementSchedulesUuid = changeManagementSchedulesUuid;
+ }
+
+
+}
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/model/Schedule.java b/cmso-service/src/main/java/org/onap/optf/cmso/model/Schedule.java
index 624e376..200e641 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/model/Schedule.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/model/Schedule.java
@@ -1,41 +1,38 @@
/*
- * Copyright © 2017-2018 AT&T Intellectual Property.
- * Modifications Copyright © 2018 IBM.
+ * Copyright © 2017-2018 AT&T Intellectual Property. Modifications Copyright © 2018 IBM.
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*
*
- * Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
- * you may not use this documentation except in compliance with the License.
- * You may obtain a copy of the License at
+ * Unless otherwise specified, all documentation contained herein is licensed under the Creative
+ * Commons License, Attribution 4.0 Intl. (the "License"); you may not use this documentation except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * https://creativecommons.org/licenses/by/4.0/
+ * https://creativecommons.org/licenses/by/4.0/
*
- * Unless required by applicable law or agreed to in writing, documentation
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
+ * Unless required by applicable law or agreed to in writing, documentation distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing permissions and
* limitations under the License.
-*/
+ */
package org.onap.optf.cmso.model;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
-
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
@@ -45,16 +42,10 @@ import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;
-
import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;
import org.joda.time.format.ISODateTimeFormat;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-import io.swagger.annotations.ApiModelProperty;
-
/**
* The persistent class for the schedules database table.
*
@@ -163,22 +154,22 @@ public class Schedule implements Serializable {
public Schedule() {}
public UUID getUuid() {
- return uuid;
- }
+ return uuid;
+ }
- public void setUuid(UUID uuid) {
- this.uuid = uuid;
- }
+ public void setUuid(UUID uuid) {
+ this.uuid = uuid;
+ }
- public void setDomainData(List<DomainData> domainData) {
- this.domainData = domainData;
- }
+ public void setDomainData(List<DomainData> domainData) {
+ this.domainData = domainData;
+ }
- public void setScheduleApprovals(List<ScheduleApproval> scheduleApprovals) {
- this.scheduleApprovals = scheduleApprovals;
- }
+ public void setScheduleApprovals(List<ScheduleApproval> scheduleApprovals) {
+ this.scheduleApprovals = scheduleApprovals;
+ }
- public String getCreateDateTime() {
+ public String getCreateDateTime() {
if (createDateTimeMillis != null)
return ISODateTimeFormat.dateTimeNoMillis().print(this.createDateTimeMillis);
return null;
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/model/ScheduleApproval.java b/cmso-service/src/main/java/org/onap/optf/cmso/model/ScheduleApproval.java
index 3239ae3..588aede 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/model/ScheduleApproval.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/model/ScheduleApproval.java
@@ -1,39 +1,37 @@
/*
- * Copyright © 2017-2018 AT&T Intellectual Property.
- * Modifications Copyright © 2018 IBM.
+ * Copyright © 2017-2018 AT&T Intellectual Property. Modifications Copyright © 2018 IBM.
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*
*
- * Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
- * you may not use this documentation except in compliance with the License.
- * You may obtain a copy of the License at
+ * Unless otherwise specified, all documentation contained herein is licensed under the Creative
+ * Commons License, Attribution 4.0 Intl. (the "License"); you may not use this documentation except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * https://creativecommons.org/licenses/by/4.0/
+ * https://creativecommons.org/licenses/by/4.0/
*
- * Unless required by applicable law or agreed to in writing, documentation
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
+ * Unless required by applicable law or agreed to in writing, documentation distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing permissions and
* limitations under the License.
-*/
+ */
package org.onap.optf.cmso.model;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.UUID;
-
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
@@ -42,15 +40,8 @@ import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
-
import org.joda.time.format.ISODateTimeFormat;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
/**
* The persistent class for the schedule_approvals database table.
*
@@ -137,24 +128,24 @@ public class ScheduleApproval implements Serializable {
}
- public UUID getUuid() {
- return uuid;
- }
+ public UUID getUuid() {
+ return uuid;
+ }
- public void setUuid(UUID uuid) {
- this.uuid = uuid;
- }
+ public void setUuid(UUID uuid) {
+ this.uuid = uuid;
+ }
- public UUID getApprovalTypesUuid() {
- return approvalTypesUuid;
- }
+ public UUID getApprovalTypesUuid() {
+ return approvalTypesUuid;
+ }
- public void setApprovalTypesUuid(UUID approvalTypesUuid) {
- this.approvalTypesUuid = approvalTypesUuid;
- }
+ public void setApprovalTypesUuid(UUID approvalTypesUuid) {
+ this.approvalTypesUuid = approvalTypesUuid;
+ }
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/model/ScheduleQuery.java b/cmso-service/src/main/java/org/onap/optf/cmso/model/ScheduleQuery.java
index 628fc6f..24caf1e 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/model/ScheduleQuery.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/model/ScheduleQuery.java
@@ -1,38 +1,32 @@
/*
- * Copyright © 2017-2018 AT&T Intellectual Property.
- * Modifications Copyright © 2018 IBM.
+ * Copyright © 2017-2018 AT&T Intellectual Property. Modifications Copyright © 2018 IBM.
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*
*
- * Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
- * you may not use this documentation except in compliance with the License.
- * You may obtain a copy of the License at
+ * Unless otherwise specified, all documentation contained herein is licensed under the Creative
+ * Commons License, Attribution 4.0 Intl. (the "License"); you may not use this documentation except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * https://creativecommons.org/licenses/by/4.0/
+ * https://creativecommons.org/licenses/by/4.0/
*
- * Unless required by applicable law or agreed to in writing, documentation
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
+ * Unless required by applicable law or agreed to in writing, documentation distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing permissions and
* limitations under the License.
-*/
+ */
package org.onap.optf.cmso.model;
import java.util.UUID;
-
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
@@ -43,13 +37,13 @@ public class ScheduleQuery {
@Column(name = "uuid")
private UUID uuid;
- public UUID getUuid() {
- return uuid;
- }
+ public UUID getUuid() {
+ return uuid;
+ }
- public void setUuid(UUID uuid) {
- this.uuid = uuid;
- }
+ public void setUuid(UUID uuid) {
+ this.uuid = uuid;
+ }
}
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/model/dao/ChangeManagementScheduleDAO.java b/cmso-service/src/main/java/org/onap/optf/cmso/model/dao/ChangeManagementScheduleDAO.java
index ad01a34..27a5029 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/model/dao/ChangeManagementScheduleDAO.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/model/dao/ChangeManagementScheduleDAO.java
@@ -1,27 +1,27 @@
/*
* Copyright © 2017-2018 AT&T Intellectual Property.
* Modifications Copyright © 2018 IBM.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
- *
+ *
+ *
* Unless otherwise specified, all documentation contained herein is licensed
* under the Creative Commons License, Attribution 4.0 Intl. (the "License");
* you may not use this documentation except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* https://creativecommons.org/licenses/by/4.0/
- *
+ *
* Unless required by applicable law or agreed to in writing, documentation
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,9 +34,7 @@ package org.onap.optf.cmso.model.dao;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
-
import javax.persistence.LockModeType;
-
import org.onap.optf.cmso.model.ChangeManagementSchedule;
import org.springframework.data.jpa.repository.Lock;
import org.springframework.data.jpa.repository.Modifying;
@@ -44,10 +42,13 @@ import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
public interface ChangeManagementScheduleDAO extends PagingAndSortingRepository<ChangeManagementSchedule, UUID> {
+ @Override
Optional<ChangeManagementSchedule> findById(UUID id);
+ @Override
ChangeManagementSchedule save(ChangeManagementSchedule persisted);
+ @Override
void delete(ChangeManagementSchedule toDelete);
@Query(value = "SELECT d FROM ChangeManagementSchedule d WHERE d.changeManagementGroupUuid = ?1")
@@ -58,7 +59,15 @@ public interface ChangeManagementScheduleDAO extends PagingAndSortingRepository<
public int deleteByChangeManagementGroupsId(UUID id);
@Query(value = "SELECT d FROM ChangeManagementSchedule d WHERE d.changeManagementGroupUuid = ?1 AND d.vnfName = ?2")
- ChangeManagementSchedule findOneByGroupIDAndVnfName(UUID id, String vnfName);
+ ChangeManagementSchedule findOneByGroupUuidAndVnfName(UUID id, String vnfName);
+
+ @Query(value = "SELECT d FROM ChangeManagementSchedule d, ChangeManagementGroup g"
+ + " WHERE g.schedulesUuid = ?1"
+ + " AND g.groupId = ?2"
+ + " AND d.changeManagementGroupUuid = g.uuid"
+ + " AND d.vnfName = ?3")
+ ChangeManagementSchedule findOneByScheduleUUIDGroupIdAndVnfName(UUID id, String groupId, String vnfName);
+
@Query(value = "SELECT d FROM ChangeManagementSchedule d WHERE (d.status = ?1 AND d.startTimeMillis <= ?2) or d.status = 'Scheduled Immediate' order by d.startTimeMillis")
List<ChangeManagementSchedule> findByStatusAndEndTime(String status, Long date);
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/model/dao/ElementDataDAO.java b/cmso-service/src/main/java/org/onap/optf/cmso/model/dao/ElementDataDAO.java
new file mode 100644
index 0000000..dada4e1
--- /dev/null
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/model/dao/ElementDataDAO.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Unless otherwise specified, all documentation contained herein is licensed
+ * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+ * you may not use this documentation except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://creativecommons.org/licenses/by/4.0/
+ *
+ * Unless required by applicable law or agreed to in writing, documentation
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+package org.onap.optf.cmso.model.dao;
+
+import java.util.Optional;
+import java.util.UUID;
+import org.onap.optf.cmso.model.ElementData;
+import org.springframework.data.repository.PagingAndSortingRepository;
+
+public interface ElementDataDAO extends PagingAndSortingRepository<ElementData, UUID> {
+ @Override
+ Optional<ElementData> findById(UUID id);
+
+ @Override
+ ElementData save(ElementData persisted);
+
+ @Override
+ void delete(ElementData toDelete);
+
+}