📄 contactvaluetype.java
字号:
/* CRMS, customer relationship management system Copyright (C) 2003 Service To Youth Council This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For further information contact the SYC ICT department on GPL@syc.net.au 98 Kermode Street North Adelaide South Australia SA 5006 +61 (0)8 8367 0755 *//* * ContactValueType.java * * Created on 8 April 2003, 00:47 */package crms.util;/** * * @author dmurphy */public class ContactValueType extends AbstractCode { // Company Values public static final ContactValueType PHONE = new ContactValueType("phone","Phone"); public static final ContactValueType FAX = new ContactValueType("fax","Fax"); public static final ContactValueType ADDRESS = new ContactValueType("address","Address"); public static final ContactValueType SUBURB = new ContactValueType("suburb","Suburb"); public static final ContactValueType STATE = new ContactValueType("state","State"); public static final ContactValueType POSTCODE = new ContactValueType("postcode","Postcode"); public static final ContactValueType ABN = new ContactValueType("abn","ABN"); public static final ContactValueType ACN = new ContactValueType("acn","ACN"); public static final ContactValueType COUNTRY = new ContactValueType("country","Country"); // lubo: company identifiers public static final ContactValueType COMP_SIZE = new ContactValueType("comp-size","Comp-Size"); public static final ContactValueType COMP_TYPE = new ContactValueType("comp-type","Comp-Type"); // Contact Values public static final ContactValueType POSITION = new ContactValueType("position","Position"); public static final ContactValueType TITLE = new ContactValueType("title","Title"); public static final ContactValueType LOCATION = new ContactValueType("location","Location"); public static final ContactValueType LOC_PHONE = new ContactValueType("loc-phone","Location-Phone"); public static final ContactValueType LOC_FAX = new ContactValueType("loc-fax","Location-Fax"); public static final ContactValueType WORK_PHONE = new ContactValueType("work-phone","Work-Phone"); public static final ContactValueType WORK_FAX = new ContactValueType("work-fax","Work-Fax"); public static final ContactValueType WORK_MOBILE = new ContactValueType("work-mobile","Work-Mobile"); public static final ContactValueType WORK_ADDRESS = new ContactValueType("work-address","Work-Address"); public static final ContactValueType WORK_SUBURB = new ContactValueType("work-suburb","Work-Suburb"); public static final ContactValueType WORK_STATE = new ContactValueType("work-state","Work-State"); public static final ContactValueType WORK_COUNTRY = new ContactValueType("work-country","Work-Country"); public static final ContactValueType WORK_POSTCODE = new ContactValueType("work-postcode","Work-Postcode"); public static final ContactValueType HOME_PHONE = new ContactValueType("home-phone","Home-Phone"); public static final ContactValueType HOME_FAX = new ContactValueType("home-fax","Home-Fax"); public static final ContactValueType HOME_ADDRESS = new ContactValueType("home-address","Home-Address"); public static final ContactValueType HOME_SUBURB = new ContactValueType("home-suburb","Home-Suburb"); public static final ContactValueType HOME_STATE = new ContactValueType("home-state","Home-State"); public static final ContactValueType HOME_COUNTRY = new ContactValueType("home-country","Home-Country"); public static final ContactValueType HOME_POSTCODE = new ContactValueType("home-postcode","Home-Postcode"); public static final ContactValueType GENDER = new ContactValueType("gender", "Gender"); public static final ContactValueType BIRTHDATE = new ContactValueType("birthdate", "Birthdate"); public static final ContactValueType ROLE = new ContactValueType("role", "Role"); public static final ContactValueType CONT_EMAIL = new ContactValueType("cont-email","Contact-Email"); public static final ContactValueType CONT_WWW = new ContactValueType("cont-www","Contact-WWW"); /** Creates a new instance of ContactValueType */ private ContactValueType(String code, String name) { super(code,name); } public static ContactValueType getForCode(String code) { return (ContactValueType) AbstractCode.getForCode(code, ContactValueType.class); }/* Class clazz = ContactValueType.class; Field[] fields = clazz.getDeclaredFields(); try { for (int i=0; i < fields.length; i++) { Field f = fields[i]; if (Modifier.isPublic(f.getModifiers()) && AbstractCode.class.isAssignableFrom(f.getDeclaringClass())) { ContactValueType fieldCode = (ContactValueType) f.get(null); if (code.trim().equals(fieldCode.getCode())) return fieldCode; } } } catch (Exception ex) { } return null; } if (code.trim().equals(PHONE.getCode())) { return PHONE; } else if (code.trim().equals(FAX.getCode())) { return FAX; } else if (code.trim().equals(ADDRESS.getCode())) { return ADDRESS; } else if (code.trim().equals(SUBURB.getCode())) { return SUBURB; } else if (code.trim().equals(STATE.getCode())) { return STATE; } else if (code.trim().equals(POSTCODE.getCode())) { return POSTCODE; } else if (code.trim().equals(ABN.getCode())) { return ABN; } else if (code.trim().equals(COMP_SIZE.getCode())) { return COMP_SIZE; } else if (code.trim().equals(COMP_TYPE.getCode())) { return COMP_TYPE; } else if (code.trim().equals(WORK_PHONE.getCode())) { return WORK_PHONE; } else if (code.trim().equals(WORK_OTHER_PHONE.getCode())) { return WORK_OTHER_PHONE; } else if (code.trim().equals(WORK_FAX.getCode())) { return WORK_FAX; } else if (code.trim().equals(WORK_MOBILE.getCode())) { return WORK_MOBILE; } else if (code.trim().equals(WORK_ADDRESS.getCode())) { return WORK_ADDRESS; } else if (code.trim().equals(WORK_SUBURB.getCode())) { return WORK_SUBURB; } else if (code.trim().equals(WORK_STATE.getCode())) { return WORK_STATE; } else if (code.trim().equals(WORK_POSTCODE.getCode())) { return WORK_POSTCODE; } else if (code.trim().equals(HOME_PHONE.getCode())) { return HOME_PHONE; } else if (code.trim().equals(HOME_FAX.getCode())) { return HOME_FAX; } else if (code.trim().equals(HOME_ADDRESS.getCode())) { return HOME_ADDRESS; } else if (code.trim().equals(HOME_SUBURB.getCode())) { return HOME_SUBURB; } else if (code.trim().equals(HOME_STATE.getCode())) { return HOME_STATE; } else if (code.trim().equals(HOME_POSTCODE.getCode())) { return HOME_POSTCODE; } else if (code.trim().equals(GENDER.getCode())) { return GENDER; } else if (code.trim().equals(BIRTHDATE.getCode())) { return BIRTHDATE; } else if (code.trim().equals(ROLE.getCode())) { return ROLE; } else if (code.trim().equals(CONT_EMAIL.getCode())) { return CONT_EMAIL; } else if (code.trim().equals(CONT_WWW.getCode())) { return CONT_WWW; } else if (code.trim().equals(TITLE.getCode())) { return TITLE; } else if (code.trim().equals(POSITION.getCode())) { return POSITION; } return null; }*/ }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -