001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model;
016    
017    import com.liferay.portal.kernel.util.GetterUtil;
018    import com.liferay.portal.kernel.util.PropsKeys;
019    import com.liferay.portal.kernel.util.PropsUtil;
020    
021    /**
022     * @author Alexander Chow
023     */
024    public class ListTypeConstants {
025    
026            // Common
027    
028            public static final String ADDRESS = ".address";
029    
030            public static final String EMAIL_ADDRESS = ".emailAddress";
031    
032            public static final String PHONE = ".phone";
033    
034            public static final String WEBSITE = ".website";
035    
036            // Account
037    
038            public static final String ACCOUNT_ADDRESS =
039                    Account.class.getName() + ADDRESS;
040    
041            public static final int ACCOUNT_ADDRESS_DEFAULT =
042                    GetterUtil.getInteger(PropsUtil.get(PropsKeys.
043                            SQL_DATA_COM_LIFERAY_PORTAL_MODEL_LISTTYPE_ACCOUNT_ADDRESS));
044    
045            public static final String ACCOUNT_EMAIL_ADDRESS =
046                    Account.class.getName() + EMAIL_ADDRESS;
047    
048            public static final int ACCOUNT_EMAIL_ADDRESS_DEFAULT =
049                    GetterUtil.getInteger(PropsUtil.get(PropsKeys.
050                            SQL_DATA_COM_LIFERAY_PORTAL_MODEL_LISTTYPE_ACCOUNT_EMAIL_ADDRESS));
051    
052            public static final String ACCOUNT_PHONE =
053                    Account.class.getName() + PHONE;
054    
055            public static final String ACCOUNT_WEBSITE =
056                    Account.class.getName() + WEBSITE;
057    
058            // Contact
059    
060            public static final String CONTACT_ADDRESS =
061                    Contact.class.getName() + ADDRESS;
062    
063            public static final String CONTACT_EMAIL_ADDRESS =
064                    Contact.class.getName() + EMAIL_ADDRESS;
065    
066            public static final int CONTACT_EMAIL_ADDRESS_DEFAULT =
067                    GetterUtil.getInteger(PropsUtil.get(PropsKeys.
068                            SQL_DATA_COM_LIFERAY_PORTAL_MODEL_LISTTYPE_CONTACT_EMAIL_ADDRESS));
069    
070            public static final String CONTACT_PHONE =
071                    Contact.class.getName() + PHONE;
072    
073            public static final String CONTACT_PREFIX =
074                    Contact.class.getName() + ".prefix";
075    
076            public static final String CONTACT_SUFFIX =
077                    Contact.class.getName() + ".suffix";
078    
079            public static final String CONTACT_WEBSITE =
080                    Contact.class.getName() + WEBSITE;
081    
082            // Organization
083    
084            public static final String ORGANIZATION_ADDRESS =
085                    Organization.class.getName() + ADDRESS;
086    
087            public static final String ORGANIZATION_EMAIL_ADDRESS =
088                    Organization.class.getName() + EMAIL_ADDRESS;
089    
090            public static final String ORGANIZATION_PHONE =
091                    Organization.class.getName() + PHONE;
092    
093            public static final String ORGANIZATION_SERVICE =
094                    Organization.class.getName() + ".service";
095    
096            public static final String ORGANIZATION_STATUS =
097                    Organization.class.getName() + ".status";
098    
099            public static final int ORGANIZATION_STATUS_DEFAULT =
100                    GetterUtil.getInteger(PropsUtil.get(PropsKeys.
101                            SQL_DATA_COM_LIFERAY_PORTAL_MODEL_LISTTYPE_ORGANIZATION_STATUS));
102    
103            public static final String ORGANIZATION_WEBSITE =
104                    Organization.class.getName() + WEBSITE;
105    
106    }