001/* 002 * =========================================================================================== 003 * = COPYRIGHT 004 * PAX Computer Technology (Shenzhen) Co., Ltd. PROPRIETARY INFORMATION 005 * This software is supplied under the terms of a license agreement or nondisclosure 006 * agreement with PAX Computer Technology (Shenzhen) Co., Ltd. and may not be copied or 007 * disclosed except in accordance with the terms in that agreement. 008 * Copyright (C) 2017-2023 PAX Computer Technology (Shenzhen) Co., Ltd. All rights reserved. 009 * Description: // Detail description about the function of this module, 010 * // interfaces with the other modules, and dependencies. 011 * Revision History: 012 * Date Author Action 013 * 2017/04/01 PAX Create/Add/Modify/Delete 014 * =========================================================================================== 015 */ 016 017package com.pax.dal.entity; 018 019/** 020 * <div class="zh"> 网络访问过滤规则类 </div> <div class="en"> Network access filtering rule class</div> 021 * @since V3.29.00 022 */ 023public class NetItem { 024 025 private String addr; 026 private String dnsServer; 027 private int opType; 028 029 030 /** 031 * <div class="zh"> 创建一个NetItem的实例 </div> <div class="en"> Create an instance of NetItem</div> 032 */ 033 public NetItem() {} 034 035 /** 036 * <div class="zh"> 创建一个NetItem的实例 </div> <div class="en"> Create an instance of NetItem</div> 037 * @param opType <div class="zh">类型:0代表IP,1代表域名 </div> <div class="en">Type: 0 for IP, 1 for domain name</div> 038 * @param addr <div class="zh">IP或域名地址 </div> <div class="en">IP or domain name address</div> 039 * @param dnsServer <div class="zh">Dns服务器地址,若opType为0,则该项无需关注 </div> 040 * <div class="en">DNS server address, if opType is 0, this item does not need to be concerned</div> 041 */ 042 public NetItem(int opType, String addr, String dnsServer) { 043 this.opType = opType; 044 this.addr = addr; 045 this.dnsServer = dnsServer; 046 } 047 048 /** 049 * <div class="zh"> 获取域名或IP地址 </div> <div class="en"> Get domain name or IP address </div> 050 * 051 * @return addr 052 */ 053 public String getAddr() { 054 return addr; 055 } 056 057 /** 058 * <div class="zh"> 设置域名或IP地址 </div> <div class="en"> Set domain name or IP address </div> 059 * 060 */ 061 public void setAddr(String addr) { 062 this.addr = addr; 063 } 064 065 /** 066 * <div class="zh"> 获取DNS服务器 </div> <div class="en"> Get DNS server </div> 067 * 068 * @return dnsServer 069 */ 070 public String getDnsServer() { 071 return dnsServer; 072 } 073 074 /** 075 * <div class="zh"> 设置DNS服务器 </div> <div class="en"> Set DNS server </div> 076 * 077 */ 078 public void setDnsServer(String dnsServer) { 079 this.dnsServer = dnsServer; 080 } 081 082 /** 083 * <div class="zh"> 获取规则类型 </div> <div class="en"> Get rule type </div> 084 * 085 * @return opType 086 */ 087 public int getOpType() { 088 return opType; 089 } 090 091 /** 092 * <div class="zh"> 设置规则类型 </div> <div class="en"> Set rule type </div> 093 * 094 */ 095 public void setOpType(int opType) { 096 this.opType = opType; 097 } 098}