2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 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.onap.ccsdk.apps.ms.neng.persistence.entity;
23 import java.io.Serializable;
24 import java.sql.Timestamp;
25 import jakarta.persistence.Column;
26 import jakarta.persistence.Entity;
27 import jakarta.persistence.GeneratedValue;
28 import jakarta.persistence.GenerationType;
29 import jakarta.persistence.Id;
30 import jakarta.persistence.Table;
33 * Represents a generated name.
36 @Table(name = "GENERATED_NAME")
37 public class GeneratedName implements Serializable {
38 private static final long serialVersionUID = 1L;
40 Integer generatedNameId;
43 String sequenceNumberEnc;
49 Timestamp createdTime;
51 Timestamp lastUpdatedTime;
55 * Primary key for this entity.
58 @Column(name = "GENERATED_NAME_ID")
59 @GeneratedValue(strategy = GenerationType.IDENTITY)
60 public Integer getGeneratedNameId() {
61 return generatedNameId;
64 public void setGeneratedNameId(Integer generatedNameId) {
65 this.generatedNameId = generatedNameId;
69 * Sequence number used for generation of this entity, as an integer.
71 @Column(name = "SEQUNCE_NUMBER")
72 public Long getSequenceNumber() {
73 return sequenceNumber;
76 public void setSequenceNumber(Long sequenceNumber) {
77 this.sequenceNumber = sequenceNumber;
81 * Sequence number used for generation of this entity, in the form encoded in the name.
83 @Column(name = "SEQUENCE_NUMBER_ENC")
84 public String getSequenceNumberEnc() {
85 return sequenceNumberEnc;
88 public void setSequenceNumberEnc(String sequenceNumberEnc) {
89 this.sequenceNumberEnc = sequenceNumberEnc;
93 * Type of the element.
95 @Column(name = "ELEMENT_TYPE")
96 public String getElementType() {
100 public void setElementType(String elementType) {
101 this.elementType = elementType;
105 * The generated name.
107 @Column(name = "NAME")
108 public String getName() {
112 public void setName(String name) {
117 * Prefix of the name.
119 @Column(name = "PREFIX")
120 public String getPrefix() {
124 public void setPrefix(String prefix) {
125 this.prefix = prefix;
129 * Suffix of the name.
131 @Column(name = "SUFFIX")
132 public String getSuffix() {
136 public void setSuffix(String suffix) {
137 this.suffix = suffix;
141 * Indicator telling if the name is released from active use.
143 @Column(name = "IS_RELEASED")
144 public String getIsReleased() {
148 public void setIsReleased(String isReleased) {
149 this.isReleased = isReleased;
153 * Time-stamp for this entity creation.
155 @Column(name = "CREATED_TIME", insertable = false)
156 public Timestamp getCreatedTime() {
160 public void setCreatedTime(Timestamp createdTime) {
161 this.createdTime = createdTime;
165 * Identifier for the entity creation.
167 @Column(name = "CREATED_BY")
168 public String getCreatedBy() {
172 public void setCreatedBy(String createdBy) {
173 this.createdBy = createdBy;
177 * Time-stamp for this entity update.
179 @Column(name = "LAST_UPDATED_TIME")
180 public Timestamp getLastUpdatedTime() {
181 return lastUpdatedTime;
184 public void setLastUpdatedTime(Timestamp lastUpdatedTime) {
185 this.lastUpdatedTime = lastUpdatedTime;
189 * Identifier for this entity update.
191 @Column(name = "LAST_UPDATED_BY")
192 public String getLastUpdatedBy() {
193 return lastUpdatedBy;
196 public void setLastUpdatedBy(String lastUpdatedBy) {
197 this.lastUpdatedBy = lastUpdatedBy;
201 * External system ID mapped to this entity/name.
203 @Column(name = "EXTERNAL_ID")
204 public String getExternalId() {
208 public void setExternalId(String externalId) {
209 this.externalId = externalId;