001    /**
002     * Copyright (c) 2000-present 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 = GetterUtil.getInteger(
042                    PropsUtil.get(
043                            PropsKeys.
044                                    SQL_DATA_COM_LIFERAY_PORTAL_MODEL_LISTTYPE_ACCOUNT_ADDRESS));
045    
046            public static final String ACCOUNT_EMAIL_ADDRESS =
047                    Account.class.getName() + EMAIL_ADDRESS;
048    
049            public static final int ACCOUNT_EMAIL_ADDRESS_DEFAULT =
050                    GetterUtil.getInteger(
051                            PropsUtil.get(
052                                    PropsKeys.
053                                            SQL_DATA_COM_LIFERAY_PORTAL_MODEL_LISTTYPE_ACCOUNT_EMAIL_ADDRESS));
054    
055            public static final String ACCOUNT_PHONE = Account.class.getName() + PHONE;
056    
057            public static final String ACCOUNT_WEBSITE =
058                    Account.class.getName() + WEBSITE;
059    
060            // Contact
061    
062            public static final String CONTACT_ADDRESS =
063                    Contact.class.getName() + ADDRESS;
064    
065            public static final String CONTACT_EMAIL_ADDRESS =
066                    Contact.class.getName() + EMAIL_ADDRESS;
067    
068            public static final int CONTACT_EMAIL_ADDRESS_DEFAULT =
069                    GetterUtil.getInteger(
070                            PropsUtil.get(
071                                    PropsKeys.
072                                            SQL_DATA_COM_LIFERAY_PORTAL_MODEL_LISTTYPE_CONTACT_EMAIL_ADDRESS));
073    
074            public static final String CONTACT_PHONE = Contact.class.getName() + PHONE;
075    
076            public static final String CONTACT_PREFIX =
077                    Contact.class.getName() + ".prefix";
078    
079            public static final String CONTACT_SUFFIX =
080                    Contact.class.getName() + ".suffix";
081    
082            public static final String CONTACT_WEBSITE =
083                    Contact.class.getName() + WEBSITE;
084    
085            // Organization
086    
087            public static final String ORGANIZATION_ADDRESS =
088                    Organization.class.getName() + ADDRESS;
089    
090            public static final String ORGANIZATION_EMAIL_ADDRESS =
091                    Organization.class.getName() + EMAIL_ADDRESS;
092    
093            public static final String ORGANIZATION_PHONE =
094                    Organization.class.getName() + PHONE;
095    
096            public static final String ORGANIZATION_SERVICE =
097                    Organization.class.getName() + ".service";
098    
099            public static final String ORGANIZATION_STATUS =
100                    Organization.class.getName() + ".status";
101    
102            public static final int ORGANIZATION_STATUS_DEFAULT = GetterUtil.getInteger(
103                    PropsUtil.get(
104                            PropsKeys.
105                                    SQL_DATA_COM_LIFERAY_PORTAL_MODEL_LISTTYPE_ORGANIZATION_STATUS));
106    
107            public static final String ORGANIZATION_WEBSITE =
108                    Organization.class.getName() + WEBSITE;
109    
110    }