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.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 LayoutPrototype. This utility wraps 024 * {@link com.liferay.portal.service.impl.LayoutPrototypeLocalServiceImpl} 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 LayoutPrototypeLocalService 032 * @see com.liferay.portal.service.base.LayoutPrototypeLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.LayoutPrototypeLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class LayoutPrototypeLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutPrototypeLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the layout prototype to the database. Also notifies the appropriate model listeners. 046 * 047 * @param layoutPrototype the layout prototype 048 * @return the layout prototype that was added 049 */ 050 public static com.liferay.portal.model.LayoutPrototype addLayoutPrototype( 051 com.liferay.portal.model.LayoutPrototype layoutPrototype) { 052 return getService().addLayoutPrototype(layoutPrototype); 053 } 054 055 /** 056 * @deprecated As of 6.2.0, replaced by {@link #addLayoutPrototype(long, 057 long, Map, String, boolean, ServiceContext)} 058 */ 059 @Deprecated 060 public static com.liferay.portal.model.LayoutPrototype addLayoutPrototype( 061 long userId, long companyId, 062 java.util.Map<java.util.Locale, java.lang.String> nameMap, 063 java.lang.String description, boolean active) 064 throws com.liferay.portal.kernel.exception.PortalException { 065 return getService() 066 .addLayoutPrototype(userId, companyId, nameMap, description, 067 active); 068 } 069 070 /** 071 * @deprecated As of 7.0.0, replaced by {@link #addLayoutPrototype(long, 072 long, Map, Map, boolean, ServiceContext)} 073 */ 074 @Deprecated 075 public static com.liferay.portal.model.LayoutPrototype addLayoutPrototype( 076 long userId, long companyId, 077 java.util.Map<java.util.Locale, java.lang.String> nameMap, 078 java.lang.String description, boolean active, 079 com.liferay.portal.service.ServiceContext serviceContext) 080 throws com.liferay.portal.kernel.exception.PortalException { 081 return getService() 082 .addLayoutPrototype(userId, companyId, nameMap, description, 083 active, serviceContext); 084 } 085 086 public static com.liferay.portal.model.LayoutPrototype addLayoutPrototype( 087 long userId, long companyId, 088 java.util.Map<java.util.Locale, java.lang.String> nameMap, 089 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 090 boolean active, com.liferay.portal.service.ServiceContext serviceContext) 091 throws com.liferay.portal.kernel.exception.PortalException { 092 return getService() 093 .addLayoutPrototype(userId, companyId, nameMap, 094 descriptionMap, active, serviceContext); 095 } 096 097 /** 098 * Creates a new layout prototype with the primary key. Does not add the layout prototype to the database. 099 * 100 * @param layoutPrototypeId the primary key for the new layout prototype 101 * @return the new layout prototype 102 */ 103 public static com.liferay.portal.model.LayoutPrototype createLayoutPrototype( 104 long layoutPrototypeId) { 105 return getService().createLayoutPrototype(layoutPrototypeId); 106 } 107 108 /** 109 * Deletes the layout prototype from the database. Also notifies the appropriate model listeners. 110 * 111 * @param layoutPrototype the layout prototype 112 * @return the layout prototype that was removed 113 * @throws PortalException 114 */ 115 public static com.liferay.portal.model.LayoutPrototype deleteLayoutPrototype( 116 com.liferay.portal.model.LayoutPrototype layoutPrototype) 117 throws com.liferay.portal.kernel.exception.PortalException { 118 return getService().deleteLayoutPrototype(layoutPrototype); 119 } 120 121 /** 122 * Deletes the layout prototype with the primary key from the database. Also notifies the appropriate model listeners. 123 * 124 * @param layoutPrototypeId the primary key of the layout prototype 125 * @return the layout prototype that was removed 126 * @throws PortalException if a layout prototype with the primary key could not be found 127 */ 128 public static com.liferay.portal.model.LayoutPrototype deleteLayoutPrototype( 129 long layoutPrototypeId) 130 throws com.liferay.portal.kernel.exception.PortalException { 131 return getService().deleteLayoutPrototype(layoutPrototypeId); 132 } 133 134 public static void deleteNondefaultLayoutPrototypes(long companyId) 135 throws com.liferay.portal.kernel.exception.PortalException { 136 getService().deleteNondefaultLayoutPrototypes(companyId); 137 } 138 139 /** 140 * @throws PortalException 141 */ 142 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 143 com.liferay.portal.model.PersistedModel persistedModel) 144 throws com.liferay.portal.kernel.exception.PortalException { 145 return getService().deletePersistedModel(persistedModel); 146 } 147 148 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 149 return getService().dynamicQuery(); 150 } 151 152 /** 153 * Performs a dynamic query on the database and returns the matching rows. 154 * 155 * @param dynamicQuery the dynamic query 156 * @return the matching rows 157 */ 158 public static <T> java.util.List<T> dynamicQuery( 159 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 160 return getService().dynamicQuery(dynamicQuery); 161 } 162 163 /** 164 * Performs a dynamic query on the database and returns a range of the matching rows. 165 * 166 * <p> 167 * 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.portal.model.impl.LayoutPrototypeModelImpl}. 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. 168 * </p> 169 * 170 * @param dynamicQuery the dynamic query 171 * @param start the lower bound of the range of model instances 172 * @param end the upper bound of the range of model instances (not inclusive) 173 * @return the range of matching rows 174 */ 175 public static <T> java.util.List<T> dynamicQuery( 176 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 177 int end) { 178 return getService().dynamicQuery(dynamicQuery, start, end); 179 } 180 181 /** 182 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 183 * 184 * <p> 185 * 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.portal.model.impl.LayoutPrototypeModelImpl}. 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. 186 * </p> 187 * 188 * @param dynamicQuery the dynamic query 189 * @param start the lower bound of the range of model instances 190 * @param end the upper bound of the range of model instances (not inclusive) 191 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 192 * @return the ordered range of matching rows 193 */ 194 public static <T> java.util.List<T> dynamicQuery( 195 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 196 int end, 197 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 198 return getService() 199 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 200 } 201 202 /** 203 * Returns the number of rows matching the dynamic query. 204 * 205 * @param dynamicQuery the dynamic query 206 * @return the number of rows matching the dynamic query 207 */ 208 public static long dynamicQueryCount( 209 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 210 return getService().dynamicQueryCount(dynamicQuery); 211 } 212 213 /** 214 * Returns the number of rows matching the dynamic query. 215 * 216 * @param dynamicQuery the dynamic query 217 * @param projection the projection to apply to the query 218 * @return the number of rows matching the dynamic query 219 */ 220 public static long dynamicQueryCount( 221 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 222 com.liferay.portal.kernel.dao.orm.Projection projection) { 223 return getService().dynamicQueryCount(dynamicQuery, projection); 224 } 225 226 public static com.liferay.portal.model.LayoutPrototype fetchLayoutPrototype( 227 long layoutPrototypeId) { 228 return getService().fetchLayoutPrototype(layoutPrototypeId); 229 } 230 231 /** 232 * Returns the layout prototype with the matching UUID and company. 233 * 234 * @param uuid the layout prototype's UUID 235 * @param companyId the primary key of the company 236 * @return the matching layout prototype, or <code>null</code> if a matching layout prototype could not be found 237 */ 238 public static com.liferay.portal.model.LayoutPrototype fetchLayoutPrototypeByUuidAndCompanyId( 239 java.lang.String uuid, long companyId) { 240 return getService() 241 .fetchLayoutPrototypeByUuidAndCompanyId(uuid, companyId); 242 } 243 244 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 245 return getService().getActionableDynamicQuery(); 246 } 247 248 /** 249 * Returns the Spring bean ID for this bean. 250 * 251 * @return the Spring bean ID for this bean 252 */ 253 public static java.lang.String getBeanIdentifier() { 254 return getService().getBeanIdentifier(); 255 } 256 257 public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 258 com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) { 259 return getService().getExportActionableDynamicQuery(portletDataContext); 260 } 261 262 /** 263 * Returns the layout prototype with the primary key. 264 * 265 * @param layoutPrototypeId the primary key of the layout prototype 266 * @return the layout prototype 267 * @throws PortalException if a layout prototype with the primary key could not be found 268 */ 269 public static com.liferay.portal.model.LayoutPrototype getLayoutPrototype( 270 long layoutPrototypeId) 271 throws com.liferay.portal.kernel.exception.PortalException { 272 return getService().getLayoutPrototype(layoutPrototypeId); 273 } 274 275 /** 276 * @deprecated As of 6.2.0, replaced by {@link 277 #getLayoutPrototypeByUuidAndCompanyId(String, long)} 278 */ 279 @Deprecated 280 public static com.liferay.portal.model.LayoutPrototype getLayoutPrototypeByUuid( 281 java.lang.String uuid) 282 throws com.liferay.portal.kernel.exception.PortalException { 283 return getService().getLayoutPrototypeByUuid(uuid); 284 } 285 286 /** 287 * Returns the layout prototype with the matching UUID and company. 288 * 289 * @param uuid the layout prototype's UUID 290 * @param companyId the primary key of the company 291 * @return the matching layout prototype 292 * @throws PortalException if a matching layout prototype could not be found 293 */ 294 public static com.liferay.portal.model.LayoutPrototype getLayoutPrototypeByUuidAndCompanyId( 295 java.lang.String uuid, long companyId) 296 throws com.liferay.portal.kernel.exception.PortalException { 297 return getService().getLayoutPrototypeByUuidAndCompanyId(uuid, companyId); 298 } 299 300 /** 301 * Returns a range of all the layout prototypes. 302 * 303 * <p> 304 * 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.portal.model.impl.LayoutPrototypeModelImpl}. 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. 305 * </p> 306 * 307 * @param start the lower bound of the range of layout prototypes 308 * @param end the upper bound of the range of layout prototypes (not inclusive) 309 * @return the range of layout prototypes 310 */ 311 public static java.util.List<com.liferay.portal.model.LayoutPrototype> getLayoutPrototypes( 312 int start, int end) { 313 return getService().getLayoutPrototypes(start, end); 314 } 315 316 /** 317 * Returns the number of layout prototypes. 318 * 319 * @return the number of layout prototypes 320 */ 321 public static int getLayoutPrototypesCount() { 322 return getService().getLayoutPrototypesCount(); 323 } 324 325 public static com.liferay.portal.model.PersistedModel getPersistedModel( 326 java.io.Serializable primaryKeyObj) 327 throws com.liferay.portal.kernel.exception.PortalException { 328 return getService().getPersistedModel(primaryKeyObj); 329 } 330 331 public static java.util.List<com.liferay.portal.model.LayoutPrototype> search( 332 long companyId, java.lang.Boolean active, int start, int end, 333 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutPrototype> obc) { 334 return getService().search(companyId, active, start, end, obc); 335 } 336 337 public static int searchCount(long companyId, java.lang.Boolean active) { 338 return getService().searchCount(companyId, active); 339 } 340 341 /** 342 * Sets the Spring bean ID for this bean. 343 * 344 * @param beanIdentifier the Spring bean ID for this bean 345 */ 346 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 347 getService().setBeanIdentifier(beanIdentifier); 348 } 349 350 /** 351 * Updates the layout prototype in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 352 * 353 * @param layoutPrototype the layout prototype 354 * @return the layout prototype that was updated 355 */ 356 public static com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 357 com.liferay.portal.model.LayoutPrototype layoutPrototype) { 358 return getService().updateLayoutPrototype(layoutPrototype); 359 } 360 361 /** 362 * @deprecated As of 6.2.0, replaced by {@link #updateLayoutPrototype(long, 363 Map, String, boolean, ServiceContext)} 364 */ 365 @Deprecated 366 public static com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 367 long layoutPrototypeId, 368 java.util.Map<java.util.Locale, java.lang.String> nameMap, 369 java.lang.String description, boolean active) 370 throws com.liferay.portal.kernel.exception.PortalException { 371 return getService() 372 .updateLayoutPrototype(layoutPrototypeId, nameMap, 373 description, active); 374 } 375 376 /** 377 * @deprecated As of 7.0.0, replaced by {@link #updateLayoutPrototype(long, 378 Map, Map, boolean, ServiceContext)} 379 */ 380 @Deprecated 381 public static com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 382 long layoutPrototypeId, 383 java.util.Map<java.util.Locale, java.lang.String> nameMap, 384 java.lang.String description, boolean active, 385 com.liferay.portal.service.ServiceContext serviceContext) 386 throws com.liferay.portal.kernel.exception.PortalException { 387 return getService() 388 .updateLayoutPrototype(layoutPrototypeId, nameMap, 389 description, active, serviceContext); 390 } 391 392 public static com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 393 long layoutPrototypeId, 394 java.util.Map<java.util.Locale, java.lang.String> nameMap, 395 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 396 boolean active, com.liferay.portal.service.ServiceContext serviceContext) 397 throws com.liferay.portal.kernel.exception.PortalException { 398 return getService() 399 .updateLayoutPrototype(layoutPrototypeId, nameMap, 400 descriptionMap, active, serviceContext); 401 } 402 403 public static LayoutPrototypeLocalService getService() { 404 if (_service == null) { 405 _service = (LayoutPrototypeLocalService)PortalBeanLocatorUtil.locate(LayoutPrototypeLocalService.class.getName()); 406 407 ReferenceRegistry.registerReference(LayoutPrototypeLocalServiceUtil.class, 408 "_service"); 409 } 410 411 return _service; 412 } 413 414 /** 415 * @deprecated As of 6.2.0 416 */ 417 @Deprecated 418 public void setService(LayoutPrototypeLocalService service) { 419 } 420 421 private static LayoutPrototypeLocalService _service; 422 }