2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright 2019 China Mobile
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.datalake.feeder.domain;
23 import com.fasterxml.jackson.annotation.JsonBackReference;
26 import org.onap.datalake.feeder.dto.PortalConfig;
28 import javax.persistence.*;
31 * Domain class representing portal
39 @Table(name = "portal")
43 @Column(name = "`name`")
46 @Column(name = "`enabled`")
47 private Boolean enabled;
49 @Column(name = "`host`")
52 @Column(name = "`port`")
55 @Column(name = "`login`")
58 @Column(name = "`pass`")
61 @ManyToOne(fetch=FetchType.EAGER)
62 @JoinColumn(name = "related_db")
66 public PortalConfig getPortalConfig() {
67 PortalConfig portalConfig = new PortalConfig();
69 portalConfig.setName(getName());
70 portalConfig.setLogin(getLogin());
71 portalConfig.setPass(getPass());
72 portalConfig.setEnabled(getEnabled());
73 portalConfig.setHost(getHost());
74 portalConfig.setPort(getPort());
75 portalConfig.setDb(getDb().getName());