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.portlet.journal.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.util.ReferenceRegistry; 021 022 /** 023 * Provides the local service utility for JournalArticleImage. This utility wraps 024 * {@link com.liferay.portlet.journal.service.impl.JournalArticleImageLocalServiceImpl} and is the 025 * primary access point for service operations in application layer code running 026 * on the local server. Methods of this service will not have security checks 027 * based on the propagated JAAS credentials because this service can only be 028 * accessed from within the same VM. 029 * 030 * @author Brian Wing Shun Chan 031 * @see JournalArticleImageLocalService 032 * @see com.liferay.portlet.journal.service.base.JournalArticleImageLocalServiceBaseImpl 033 * @see com.liferay.portlet.journal.service.impl.JournalArticleImageLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class JournalArticleImageLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.journal.service.impl.JournalArticleImageLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 public static void addArticleImageId(long articleImageId, long groupId, 044 java.lang.String articleId, double version, 045 java.lang.String elInstanceId, java.lang.String elName, 046 java.lang.String languageId) 047 throws com.liferay.portal.kernel.exception.PortalException { 048 getService() 049 .addArticleImageId(articleImageId, groupId, articleId, version, 050 elInstanceId, elName, languageId); 051 } 052 053 /** 054 * Adds the journal article image to the database. Also notifies the appropriate model listeners. 055 * 056 * @param journalArticleImage the journal article image 057 * @return the journal article image that was added 058 */ 059 public static com.liferay.portlet.journal.model.JournalArticleImage addJournalArticleImage( 060 com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage) { 061 return getService().addJournalArticleImage(journalArticleImage); 062 } 063 064 /** 065 * Creates a new journal article image with the primary key. Does not add the journal article image to the database. 066 * 067 * @param articleImageId the primary key for the new journal article image 068 * @return the new journal article image 069 */ 070 public static com.liferay.portlet.journal.model.JournalArticleImage createJournalArticleImage( 071 long articleImageId) { 072 return getService().createJournalArticleImage(articleImageId); 073 } 074 075 public static void deleteArticleImage( 076 com.liferay.portlet.journal.model.JournalArticleImage articleImage) { 077 getService().deleteArticleImage(articleImage); 078 } 079 080 public static void deleteArticleImage(long articleImageId) { 081 getService().deleteArticleImage(articleImageId); 082 } 083 084 public static void deleteArticleImage(long groupId, 085 java.lang.String articleId, double version, 086 java.lang.String elInstanceId, java.lang.String elName, 087 java.lang.String languageId) { 088 getService() 089 .deleteArticleImage(groupId, articleId, version, elInstanceId, 090 elName, languageId); 091 } 092 093 public static void deleteImages(long groupId, java.lang.String articleId, 094 double version) { 095 getService().deleteImages(groupId, articleId, version); 096 } 097 098 /** 099 * Deletes the journal article image with the primary key from the database. Also notifies the appropriate model listeners. 100 * 101 * @param articleImageId the primary key of the journal article image 102 * @return the journal article image that was removed 103 * @throws PortalException if a journal article image with the primary key could not be found 104 */ 105 public static com.liferay.portlet.journal.model.JournalArticleImage deleteJournalArticleImage( 106 long articleImageId) 107 throws com.liferay.portal.kernel.exception.PortalException { 108 return getService().deleteJournalArticleImage(articleImageId); 109 } 110 111 /** 112 * Deletes the journal article image from the database. Also notifies the appropriate model listeners. 113 * 114 * @param journalArticleImage the journal article image 115 * @return the journal article image that was removed 116 */ 117 public static com.liferay.portlet.journal.model.JournalArticleImage deleteJournalArticleImage( 118 com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage) { 119 return getService().deleteJournalArticleImage(journalArticleImage); 120 } 121 122 /** 123 * @throws PortalException 124 */ 125 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 126 com.liferay.portal.model.PersistedModel persistedModel) 127 throws com.liferay.portal.kernel.exception.PortalException { 128 return getService().deletePersistedModel(persistedModel); 129 } 130 131 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 132 return getService().dynamicQuery(); 133 } 134 135 /** 136 * Performs a dynamic query on the database and returns the matching rows. 137 * 138 * @param dynamicQuery the dynamic query 139 * @return the matching rows 140 */ 141 public static <T> java.util.List<T> dynamicQuery( 142 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 143 return getService().dynamicQuery(dynamicQuery); 144 } 145 146 /** 147 * Performs a dynamic query on the database and returns a range of the matching rows. 148 * 149 * <p> 150 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalArticleImageModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 151 * </p> 152 * 153 * @param dynamicQuery the dynamic query 154 * @param start the lower bound of the range of model instances 155 * @param end the upper bound of the range of model instances (not inclusive) 156 * @return the range of matching rows 157 */ 158 public static <T> java.util.List<T> dynamicQuery( 159 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 160 int end) { 161 return getService().dynamicQuery(dynamicQuery, start, end); 162 } 163 164 /** 165 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 166 * 167 * <p> 168 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalArticleImageModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 169 * </p> 170 * 171 * @param dynamicQuery the dynamic query 172 * @param start the lower bound of the range of model instances 173 * @param end the upper bound of the range of model instances (not inclusive) 174 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 175 * @return the ordered range of matching rows 176 */ 177 public static <T> java.util.List<T> dynamicQuery( 178 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 179 int end, 180 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 181 return getService() 182 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 183 } 184 185 /** 186 * Returns the number of rows matching the dynamic query. 187 * 188 * @param dynamicQuery the dynamic query 189 * @return the number of rows matching the dynamic query 190 */ 191 public static long dynamicQueryCount( 192 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 193 return getService().dynamicQueryCount(dynamicQuery); 194 } 195 196 /** 197 * Returns the number of rows matching the dynamic query. 198 * 199 * @param dynamicQuery the dynamic query 200 * @param projection the projection to apply to the query 201 * @return the number of rows matching the dynamic query 202 */ 203 public static long dynamicQueryCount( 204 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 205 com.liferay.portal.kernel.dao.orm.Projection projection) { 206 return getService().dynamicQueryCount(dynamicQuery, projection); 207 } 208 209 public static com.liferay.portlet.journal.model.JournalArticleImage fetchJournalArticleImage( 210 long articleImageId) { 211 return getService().fetchJournalArticleImage(articleImageId); 212 } 213 214 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 215 return getService().getActionableDynamicQuery(); 216 } 217 218 public static com.liferay.portlet.journal.model.JournalArticleImage getArticleImage( 219 long articleImageId) 220 throws com.liferay.portal.kernel.exception.PortalException { 221 return getService().getArticleImage(articleImageId); 222 } 223 224 public static long getArticleImageId(long groupId, 225 java.lang.String articleId, double version, 226 java.lang.String elInstanceId, java.lang.String elName, 227 java.lang.String languageId) { 228 return getService() 229 .getArticleImageId(groupId, articleId, version, 230 elInstanceId, elName, languageId); 231 } 232 233 public static long getArticleImageId(long groupId, 234 java.lang.String articleId, double version, 235 java.lang.String elInstanceId, java.lang.String elName, 236 java.lang.String languageId, boolean tempImage) { 237 return getService() 238 .getArticleImageId(groupId, articleId, version, 239 elInstanceId, elName, languageId, tempImage); 240 } 241 242 public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> getArticleImages( 243 long groupId) { 244 return getService().getArticleImages(groupId); 245 } 246 247 public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> getArticleImages( 248 long groupId, java.lang.String articleId, double version) { 249 return getService().getArticleImages(groupId, articleId, version); 250 } 251 252 public static int getArticleImagesCount(long groupId) { 253 return getService().getArticleImagesCount(groupId); 254 } 255 256 /** 257 * Returns the Spring bean ID for this bean. 258 * 259 * @return the Spring bean ID for this bean 260 */ 261 public static java.lang.String getBeanIdentifier() { 262 return getService().getBeanIdentifier(); 263 } 264 265 /** 266 * Returns the journal article image with the primary key. 267 * 268 * @param articleImageId the primary key of the journal article image 269 * @return the journal article image 270 * @throws PortalException if a journal article image with the primary key could not be found 271 */ 272 public static com.liferay.portlet.journal.model.JournalArticleImage getJournalArticleImage( 273 long articleImageId) 274 throws com.liferay.portal.kernel.exception.PortalException { 275 return getService().getJournalArticleImage(articleImageId); 276 } 277 278 /** 279 * Returns a range of all the journal article images. 280 * 281 * <p> 282 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalArticleImageModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 283 * </p> 284 * 285 * @param start the lower bound of the range of journal article images 286 * @param end the upper bound of the range of journal article images (not inclusive) 287 * @return the range of journal article images 288 */ 289 public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> getJournalArticleImages( 290 int start, int end) { 291 return getService().getJournalArticleImages(start, end); 292 } 293 294 /** 295 * Returns the number of journal article images. 296 * 297 * @return the number of journal article images 298 */ 299 public static int getJournalArticleImagesCount() { 300 return getService().getJournalArticleImagesCount(); 301 } 302 303 public static com.liferay.portal.model.PersistedModel getPersistedModel( 304 java.io.Serializable primaryKeyObj) 305 throws com.liferay.portal.kernel.exception.PortalException { 306 return getService().getPersistedModel(primaryKeyObj); 307 } 308 309 /** 310 * Sets the Spring bean ID for this bean. 311 * 312 * @param beanIdentifier the Spring bean ID for this bean 313 */ 314 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 315 getService().setBeanIdentifier(beanIdentifier); 316 } 317 318 /** 319 * Updates the journal article image in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 320 * 321 * @param journalArticleImage the journal article image 322 * @return the journal article image that was updated 323 */ 324 public static com.liferay.portlet.journal.model.JournalArticleImage updateJournalArticleImage( 325 com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage) { 326 return getService().updateJournalArticleImage(journalArticleImage); 327 } 328 329 public static JournalArticleImageLocalService getService() { 330 if (_service == null) { 331 _service = (JournalArticleImageLocalService)PortalBeanLocatorUtil.locate(JournalArticleImageLocalService.class.getName()); 332 333 ReferenceRegistry.registerReference(JournalArticleImageLocalServiceUtil.class, 334 "_service"); 335 } 336 337 return _service; 338 } 339 340 /** 341 * @deprecated As of 6.2.0 342 */ 343 @Deprecated 344 public void setService(JournalArticleImageLocalService service) { 345 } 346 347 private static JournalArticleImageLocalService _service; 348 }