⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dict.java

📁 WAP PUSH后台源码,WAP PUSH后台源码
💻 JAVA
字号:
package com.sxit.wap.common;import java.sql.*;import java.util.*;import com.sxit.wap.common.*;import com.sxit.wap.exception.*;import com.sxit.wap.feetype.*;import com.sxit.wap.systemparam.*;import com.sxit.wap.wap2mobile.*;public class Dict implements java.io.Serializable {  Hashtable feeTypeTable = null;Collection feeTypeColl = null;  Hashtable wap2MobileTable = null;  SystemParamModel systemParamModel = null;  public Dict() throws SysException {    init();  }  public void init() throws SysException {    System.out.println(">>>dict init begin");    feeTypeColl = FeeTypeBean.getFeeTypeColl();feeTypeTable = FeeTypeBean.toHashtable(feeTypeColl);System.out.println(">>>init feetype success");    systemParamModel = SystemParamBean.getSystemParamModel();System.out.println(">>>init systemParamModel success");    wap2MobileTable = Wap2MobileBean.queryWap2Mobile();System.out.println(">>>init wap2 mobile success");    System.out.println(">>>dict init finish");  }  public SystemParamModel getSystemParamModel() {    return systemParamModel;  }  public void setSystemParamModel(SystemParamModel systemParamModel) {    this.systemParamModel = systemParamModel;  }  public int getInitPageRow() {    return getSystemParamModel().getInitPageRow();  }  public String getSystemName() {    return getSystemParamModel().getSystemName();  }  public FeeTypeModel getFeeTypeModel(int feeType) {    if (feeType == 0) return null;    return (FeeTypeModel)feeTypeTable.get("" + feeType);  }  public String getFeeName(int feeType) {    FeeTypeModel feeTypeModel = getFeeTypeModel(feeType);    if (feeTypeModel == null) return "";    else return feeTypeModel.getFeeName();  }  public static void main(String[] args) throws Exception {    Dict dict = new Dict();  }  public Collection getFeeTypeColl() {    return feeTypeColl;  }  public void setFeeTypeColl(Collection feeTypeColl) {    this.feeTypeColl = feeTypeColl;  }  public Hashtable getFeeTypeTable() {    return feeTypeTable;  }  public void setFeeTypeTable(Hashtable feeTypeTable) {    this.feeTypeTable = feeTypeTable;  }  public boolean isWap2Mobile(String userAgent) throws SysException {    if (wap2MobileTable.get(userAgent) != null) return true;    Enumeration en = wap2MobileTable.elements();    while (en.hasMoreElements()) {      String ele = (String) en.nextElement();      if (userAgent.indexOf(ele) != -1) {        return true;      }    }    return false;  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -