001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 013 */ 014 015 package com.liferay.portlet.polls.model; 016 017 import com.liferay.portal.kernel.bean.AutoEscape; 018 import com.liferay.portal.model.BaseModel; 019 import com.liferay.portal.model.CacheModel; 020 import com.liferay.portal.service.ServiceContext; 021 022 import com.liferay.portlet.expando.model.ExpandoBridge; 023 024 import java.io.Serializable; 025 026 import java.util.Locale; 027 import java.util.Map; 028 029 /** 030 * The base model interface for the PollsChoice service. Represents a row in the "PollsChoice" database table, with each column mapped to a property of this class. 031 * 032 * <p> 033 * This interface and its corresponding implementation {@link com.liferay.portlet.polls.model.impl.PollsChoiceModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link com.liferay.portlet.polls.model.impl.PollsChoiceImpl}. 034 * </p> 035 * 036 * @author Brian Wing Shun Chan 037 * @see PollsChoice 038 * @see com.liferay.portlet.polls.model.impl.PollsChoiceImpl 039 * @see com.liferay.portlet.polls.model.impl.PollsChoiceModelImpl 040 * @generated 041 */ 042 public interface PollsChoiceModel extends BaseModel<PollsChoice> { 043 /* 044 * NOTE FOR DEVELOPERS: 045 * 046 * Never modify or reference this interface directly. All methods that expect a polls choice model instance should use the {@link PollsChoice} interface instead. 047 */ 048 049 /** 050 * Gets the primary key of this polls choice. 051 * 052 * @return the primary key of this polls choice 053 */ 054 public long getPrimaryKey(); 055 056 /** 057 * Sets the primary key of this polls choice 058 * 059 * @param primaryKey the primary key of this polls choice 060 */ 061 public void setPrimaryKey(long primaryKey); 062 063 /** 064 * Gets the uuid of this polls choice. 065 * 066 * @return the uuid of this polls choice 067 */ 068 @AutoEscape 069 public String getUuid(); 070 071 /** 072 * Sets the uuid of this polls choice. 073 * 074 * @param uuid the uuid of this polls choice 075 */ 076 public void setUuid(String uuid); 077 078 /** 079 * Gets the choice ID of this polls choice. 080 * 081 * @return the choice ID of this polls choice 082 */ 083 public long getChoiceId(); 084 085 /** 086 * Sets the choice ID of this polls choice. 087 * 088 * @param choiceId the choice ID of this polls choice 089 */ 090 public void setChoiceId(long choiceId); 091 092 /** 093 * Gets the question ID of this polls choice. 094 * 095 * @return the question ID of this polls choice 096 */ 097 public long getQuestionId(); 098 099 /** 100 * Sets the question ID of this polls choice. 101 * 102 * @param questionId the question ID of this polls choice 103 */ 104 public void setQuestionId(long questionId); 105 106 /** 107 * Gets the name of this polls choice. 108 * 109 * @return the name of this polls choice 110 */ 111 @AutoEscape 112 public String getName(); 113 114 /** 115 * Sets the name of this polls choice. 116 * 117 * @param name the name of this polls choice 118 */ 119 public void setName(String name); 120 121 /** 122 * Gets the description of this polls choice. 123 * 124 * @return the description of this polls choice 125 */ 126 public String getDescription(); 127 128 /** 129 * Gets the localized description of this polls choice. Uses the default language if no localization exists for the requested language. 130 * 131 * @param locale the locale to get the localized description for 132 * @return the localized description of this polls choice 133 */ 134 public String getDescription(Locale locale); 135 136 /** 137 * Gets the localized description of this polls choice, optionally using the default language if no localization exists for the requested language. 138 * 139 * @param locale the local to get the localized description for 140 * @param useDefault whether to use the default language if no localization exists for the requested language 141 * @return the localized description of this polls choice. If <code>useDefault</code> is <code>false</code> and no localization exists for the requested language, an empty string will be returned. 142 */ 143 public String getDescription(Locale locale, boolean useDefault); 144 145 /** 146 * Gets the localized description of this polls choice. Uses the default language if no localization exists for the requested language. 147 * 148 * @param languageId the id of the language to get the localized description for 149 * @return the localized description of this polls choice 150 */ 151 public String getDescription(String languageId); 152 153 /** 154 * Gets the localized description of this polls choice, optionally using the default language if no localization exists for the requested language. 155 * 156 * @param languageId the id of the language to get the localized description for 157 * @param useDefault whether to use the default language if no localization exists for the requested language 158 * @return the localized description of this polls choice 159 */ 160 public String getDescription(String languageId, boolean useDefault); 161 162 /** 163 * Gets a map of the locales and localized description of this polls choice. 164 * 165 * @return the locales and localized description 166 */ 167 public Map<Locale, String> getDescriptionMap(); 168 169 /** 170 * Sets the description of this polls choice. 171 * 172 * @param description the description of this polls choice 173 */ 174 public void setDescription(String description); 175 176 /** 177 * Sets the localized description of this polls choice. 178 * 179 * @param locale the locale to set the localized description for 180 * @param description the localized description of this polls choice 181 */ 182 public void setDescription(Locale locale, String description); 183 184 /** 185 * Sets the localized descriptions of this polls choice from the map of locales and localized descriptions. 186 * 187 * @param descriptionMap the locales and localized descriptions of this polls choice 188 */ 189 public void setDescriptionMap(Map<Locale, String> descriptionMap); 190 191 public boolean isNew(); 192 193 public void setNew(boolean n); 194 195 public boolean isCachedModel(); 196 197 public void setCachedModel(boolean cachedModel); 198 199 public boolean isEscapedModel(); 200 201 public void setEscapedModel(boolean escapedModel); 202 203 public Serializable getPrimaryKeyObj(); 204 205 public void setPrimaryKeyObj(Serializable primaryKeyObj); 206 207 public ExpandoBridge getExpandoBridge(); 208 209 public void setExpandoBridgeAttributes(ServiceContext serviceContext); 210 211 public Object clone(); 212 213 public int compareTo(PollsChoice pollsChoice); 214 215 public int hashCode(); 216 217 public CacheModel<PollsChoice> toCacheModel(); 218 219 public PollsChoice toEscapedModel(); 220 221 public String toString(); 222 223 public String toXmlString(); 224 }