|
| 1 | +// Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +// or more contributor license agreements. See the NOTICE file |
| 3 | +// distributed with this work for additional information |
| 4 | +// regarding copyright ownership. The ASF licenses this file |
| 5 | +// to you under the Apache License, Version 2.0 (the |
| 6 | +// "License"); you may not use this file except in compliance |
| 7 | +// with the License. You may obtain a copy of the License at |
| 8 | +// |
| 9 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +// |
| 11 | +// Unless required by applicable law or agreed to in writing, |
| 12 | +// software distributed under the License is distributed on an |
| 13 | +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +// KIND, either express or implied. See the License for the |
| 15 | +// specific language governing permissions and limitations |
| 16 | +// under the License. |
| 17 | +package org.apache.cloudstack.resourcedetail; |
| 18 | + |
| 19 | +import javax.persistence.Column; |
| 20 | +import javax.persistence.Entity; |
| 21 | +import javax.persistence.GeneratedValue; |
| 22 | +import javax.persistence.GenerationType; |
| 23 | +import javax.persistence.Id; |
| 24 | +import javax.persistence.Table; |
| 25 | + |
| 26 | +import org.apache.cloudstack.api.ResourceDetail; |
| 27 | + |
| 28 | +@Entity |
| 29 | +@Table(name="user_ip_address_details") |
| 30 | +public class UserIpAddressDetailVO implements ResourceDetail{ |
| 31 | + @Id |
| 32 | + @GeneratedValue(strategy= GenerationType.IDENTITY) |
| 33 | + @Column(name="id") |
| 34 | + private long id; |
| 35 | + |
| 36 | + @Column(name="user_ip_address_id") |
| 37 | + private long resourceId; |
| 38 | + |
| 39 | + @Column(name="name") |
| 40 | + private String name; |
| 41 | + |
| 42 | + @Column(name="value", length=1024) |
| 43 | + private String value; |
| 44 | + |
| 45 | + @Column(name="display") |
| 46 | + private boolean display; |
| 47 | + |
| 48 | + public UserIpAddressDetailVO() {} |
| 49 | + |
| 50 | + public UserIpAddressDetailVO(long networkId, String name, String value) { |
| 51 | + this.resourceId = networkId; |
| 52 | + this.name = name; |
| 53 | + this.value = value; |
| 54 | + } |
| 55 | + |
| 56 | + @Override |
| 57 | + public long getId() { |
| 58 | + return id; |
| 59 | + } |
| 60 | + |
| 61 | + @Override |
| 62 | + public String getName() { |
| 63 | + return name; |
| 64 | + } |
| 65 | + |
| 66 | + @Override |
| 67 | + public String getValue() { |
| 68 | + return value; |
| 69 | + } |
| 70 | + |
| 71 | + @Override |
| 72 | + public long getResourceId() { |
| 73 | + return resourceId; |
| 74 | + } |
| 75 | + |
| 76 | + @Override |
| 77 | + public boolean isDisplay() { |
| 78 | + return display; |
| 79 | + } |
| 80 | +} |
0 commit comments