package com.ibm.portal.module.collereceiveins.dao;
import java.util.ArrayList;
import java.util.List;
import com.ibm.portal.module.collereceiveins.domain.DictionaryVo;
public class Dictionary {
private static Dictionary dictionary = null;
private static List<DictionaryVo> secretList =new ArrayList<DictionaryVo>();
private static List<DictionaryVo> sluggishList =new ArrayList<DictionaryVo>();
private static List<DictionaryVo> secretListY =new ArrayList<DictionaryVo>();
private static List<DictionaryVo> sluggishListY =new ArrayList<DictionaryVo>();
private Dictionary(){
DictionaryVo dv1 = new DictionaryVo("一般","一般");
DictionaryVo dv2 = new DictionaryVo("急","急");
DictionaryVo dv3 = new DictionaryVo("急件","急件");
DictionaryVo dv4 = new DictionaryVo("特急","特急");
if(!sluggishList.contains(dv1))sluggishList.add(dv1);
if(!sluggishList.contains(dv2))sluggishList.add(dv2);
if(!sluggishList.contains(dv3))sluggishList.add(dv3);
if(!sluggishList.contains(dv4))sluggishList.add(dv4);
DictionaryVo dv5 = new DictionaryVo("一般","一般");
DictionaryVo dv6 = new DictionaryVo("商秘","商秘");
DictionaryVo dv7 = new DictionaryVo("秘密","秘密");
DictionaryVo dv8 = new DictionaryVo("机密","机密");
DictionaryVo dv9 = new DictionaryVo("绝密","绝密");
if(!secretList.contains(dv5))secretList.add(dv5);
if(!secretList.contains(dv6))secretList.add(dv6);
if(!secretList.contains(dv7))secretList.add(dv7);
if(!secretList.contains(dv8))secretList.add(dv8);
if(!secretList.contains(dv9))secretList.add(dv9);
//院发文
DictionaryVo dvo1 = new DictionaryVo("一般","一般");
DictionaryVo dvo2 = new DictionaryVo("急","急");
DictionaryVo dvo3 = new DictionaryVo("急件","急件");
DictionaryVo dvo4 = new DictionaryVo("特急","特急");
if(!sluggishListY.contains(dvo1))sluggishListY.add(dvo1);
if(!sluggishListY.contains(dvo2))sluggishListY.add(dvo2);
if(!sluggishListY.contains(dvo3))sluggishListY.add(dvo3);
if(!sluggishListY.contains(dvo4))sluggishListY.add(dvo4);
DictionaryVo dvo5 = new DictionaryVo("一般","一般");
DictionaryVo dvo6 = new DictionaryVo("商秘","商秘");
DictionaryVo dvo7 = new DictionaryVo("秘密","秘密");
DictionaryVo dvo8 = new DictionaryVo("机密","机密");
DictionaryVo dvo9 = new DictionaryVo("绝密","绝密");
DictionaryVo dvo10 = new DictionaryVo("无(密级)","无(密级)");
DictionaryVo dvo11 = new DictionaryVo("内部信息","内部信息");
DictionaryVo dvo12 = new DictionaryVo("普通商密★1年","普通商密★1年");
if(!secretListY.contains(dvo5))secretListY.add(dvo5);
if(!secretListY.contains(dvo6))secretListY.add(dvo6);
if(!secretListY.contains(dvo7))secretListY.add(dvo7);
if(!secretListY.contains(dvo8))secretListY.add(dvo8);
if(!secretListY.contains(dvo9))secretListY.add(dvo9);
if(!secretListY.contains(dvo10))secretListY.add(dvo10);
if(!secretListY.contains(dvo11))secretListY.add(dvo11);
if(!secretListY.contains(dvo12))secretListY.add(dvo12);
}
public static Dictionary getDictionary(){
if(dictionary == null){
dictionary = new Dictionary();
}
return dictionary;
}
/**
* 密级
* @return
*/
public List<DictionaryVo> getSecretList(){
return secretList;
}
/**
* 缓急
* @return
*/
public List<DictionaryVo> getSluggishList(){
return sluggishList;
}
/**
* 院级发文密级
* @return
*/
public List<DictionaryVo> getSecretListY(){
return secretListY;
}
================================
package com.ibm.portal.module.collereceiveins.domain;
public class DictionaryVo {
private String key;
private String value;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((key == null) ? 0 : key.hashCode());
result = prime * result + ((value == null) ? 0 : value.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)return true;
if (obj == null)return false;
if (getClass() != obj.getClass())return false;
DictionaryVo other = (DictionaryVo) obj;
if (key == null) {
if (other.key != null)return false;
} else if (!key.equals(other.key))
return false;
if (value == null) {
if (other.value != null)return false;
} else if (!value.equals(other.value))
return false;
return true;
}
public DictionaryVo(String key, String value) {
super();
this.key = key;
this.value = value;
}
}
/**
* 院级发文缓急
* @return
*/
public List<DictionaryVo> getSluggishListY(){
return sluggishListY;
}
}