2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.mso.db.catalog.beans;
24 import org.openecomp.mso.db.catalog.utils.MavenLikeVersioning;
26 import java.sql.Timestamp;
27 import java.text.DateFormat;
29 public class NetworkResource extends MavenLikeVersioning {
31 private String networkType;
32 private String orchestrationMode = null;
33 private String description = null;
34 private int templateId;
35 private String neutronNetworkType = null;
36 private String aicVersionMin = null;
37 private String aicVersionMax = null;
39 private Timestamp created;
41 public NetworkResource() {}
47 public void setId(int id) {
51 public String getNetworkType() {
54 public void setNetworkType(String networkType) {
55 this.networkType = networkType;
58 public String getOrchestrationMode() {
59 return orchestrationMode;
61 public void setOrchestrationMode(String orchestrationMode) {
62 this.orchestrationMode = orchestrationMode;
65 public String getDescription() {
68 public void setDescription(String description) {
69 this.description = description;
72 public int getTemplateId () {
76 public void setTemplateId (int templateId) {
77 this.templateId = templateId;
80 public String getNeutronNetworkType() {
81 return neutronNetworkType;
84 public void setNeutronNetworkType(String neutronNetworkType) {
85 this.neutronNetworkType = neutronNetworkType;
88 public Timestamp getCreated() {
92 public void setCreated(Timestamp created) {
93 this.created = created;
96 public String getAicVersionMin() {
100 public void setAicVersionMin(String aicVersionMin) {
101 this.aicVersionMin = aicVersionMin;
104 public String getAicVersionMax() {
105 return aicVersionMax;
108 public void setAicVersionMax(String aicVersionMax) {
109 this.aicVersionMax = aicVersionMax;
113 public String toString () {
114 StringBuffer sb = new StringBuffer();
115 sb.append("NETWORK=");
116 sb.append(networkType);
117 sb.append(",version=");
120 sb.append(orchestrationMode);
121 sb.append(",template=");
122 sb.append(templateId);
123 sb.append(",neutronType=");
124 sb.append(neutronNetworkType);
125 sb.append(",aicVersionMin=");
126 sb.append(aicVersionMin);
127 sb.append(",aicVersionMax=");
128 sb.append(aicVersionMax);
133 if (created != null) {
134 sb.append (",created=");
135 sb.append (DateFormat.getInstance().format(created));
137 return sb.toString();