001    /**
002     * Copyright (c) 2000-2013 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(PropsUtil.get(PropsKeys.
051                            SQL_DATA_COM_LIFERAY_PORTAL_MODEL_LISTTYPE_ACCOUNT_EMAIL_ADDRESS));
052    
053            public static final String ACCOUNT_PHONE = 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 = Contact.class.getName() + PHONE;
071    
072            public static final String CONTACT_PREFIX =
073                    Contact.class.getName() + ".prefix";
074    
075            public static final String CONTACT_SUFFIX =
076                    Contact.class.getName() + ".suffix";
077    
078            public static final String CONTACT_WEBSITE =
079                    Contact.class.getName() + WEBSITE;
080    
081            // Organization
082    
083            public static final String ORGANIZATION_ADDRESS =
084                    Organization.class.getName() + ADDRESS;
085    
086            public static final String ORGANIZATION_EMAIL_ADDRESS =
087                    Organization.class.getName() + EMAIL_ADDRESS;
088    
089            public static final String ORGANIZATION_PHONE =
090                    Organization.class.getName() + PHONE;
091    
092            public static final String ORGANIZATION_SERVICE =
093                    Organization.class.getName() + ".service";
094    
095            public static final String ORGANIZATION_STATUS =
096                    Organization.class.getName() + ".status";
097    
098            public static final int ORGANIZATION_STATUS_DEFAULT =
099                    GetterUtil.getInteger(PropsUtil.get(PropsKeys.
100                            SQL_DATA_COM_LIFERAY_PORTAL_MODEL_LISTTYPE_ORGANIZATION_STATUS));
101    
102            public static final String ORGANIZATION_WEBSITE =
103                    Organization.class.getName() + WEBSITE;
104    
105    }