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 public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 249 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) { 250 return getService().getExportActionableDynamicQuery(portletDataContext); 251 } 252 253 /** 254 * Returns the layout prototype with the primary key. 255 * 256 * @param layoutPrototypeId the primary key of the layout prototype 257 * @return the layout prototype 258 * @throws PortalException if a layout prototype with the primary key could not be found 259 */ 260 public static com.liferay.portal.model.LayoutPrototype getLayoutPrototype( 261 long layoutPrototypeId) 262 throws com.liferay.portal.kernel.exception.PortalException { 263 return getService().getLayoutPrototype(layoutPrototypeId); 264 } 265 266 /** 267 * @deprecated As of 6.2.0, replaced by {@link 268 #getLayoutPrototypeByUuidAndCompanyId(String, long)} 269 */ 270 @Deprecated 271 public static com.liferay.portal.model.LayoutPrototype getLayoutPrototypeByUuid( 272 java.lang.String uuid) 273 throws com.liferay.portal.kernel.exception.PortalException { 274 return getService().getLayoutPrototypeByUuid(uuid); 275 } 276 277 /** 278 * Returns the layout prototype with the matching UUID and company. 279 * 280 * @param uuid the layout prototype's UUID 281 * @param companyId the primary key of the company 282 * @return the matching layout prototype 283 * @throws PortalException if a matching layout prototype could not be found 284 */ 285 public static com.liferay.portal.model.LayoutPrototype getLayoutPrototypeByUuidAndCompanyId( 286 java.lang.String uuid, long companyId) 287 throws com.liferay.portal.kernel.exception.PortalException { 288 return getService().getLayoutPrototypeByUuidAndCompanyId(uuid, companyId); 289 } 290 291 /** 292 * Returns a range of all the layout prototypes. 293 * 294 * <p> 295 * 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. 296 * </p> 297 * 298 * @param start the lower bound of the range of layout prototypes 299 * @param end the upper bound of the range of layout prototypes (not inclusive) 300 * @return the range of layout prototypes 301 */ 302 public static java.util.List<com.liferay.portal.model.LayoutPrototype> getLayoutPrototypes( 303 int start, int end) { 304 return getService().getLayoutPrototypes(start, end); 305 } 306 307 /** 308 * Returns the number of layout prototypes. 309 * 310 * @return the number of layout prototypes 311 */ 312 public static int getLayoutPrototypesCount() { 313 return getService().getLayoutPrototypesCount(); 314 } 315 316 /** 317 * Returns the OSGi service identifier. 318 * 319 * @return the OSGi service identifier 320 */ 321 public static java.lang.String getOSGiServiceIdentifier() { 322 return getService().getOSGiServiceIdentifier(); 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 * Updates the layout prototype in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 343 * 344 * @param layoutPrototype the layout prototype 345 * @return the layout prototype that was updated 346 */ 347 public static com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 348 com.liferay.portal.model.LayoutPrototype layoutPrototype) { 349 return getService().updateLayoutPrototype(layoutPrototype); 350 } 351 352 /** 353 * @deprecated As of 6.2.0, replaced by {@link #updateLayoutPrototype(long, 354 Map, String, boolean, ServiceContext)} 355 */ 356 @Deprecated 357 public static com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 358 long layoutPrototypeId, 359 java.util.Map<java.util.Locale, java.lang.String> nameMap, 360 java.lang.String description, boolean active) 361 throws com.liferay.portal.kernel.exception.PortalException { 362 return getService() 363 .updateLayoutPrototype(layoutPrototypeId, nameMap, 364 description, active); 365 } 366 367 /** 368 * @deprecated As of 7.0.0, replaced by {@link #updateLayoutPrototype(long, 369 Map, Map, boolean, ServiceContext)} 370 */ 371 @Deprecated 372 public static com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 373 long layoutPrototypeId, 374 java.util.Map<java.util.Locale, java.lang.String> nameMap, 375 java.lang.String description, boolean active, 376 com.liferay.portal.service.ServiceContext serviceContext) 377 throws com.liferay.portal.kernel.exception.PortalException { 378 return getService() 379 .updateLayoutPrototype(layoutPrototypeId, nameMap, 380 description, active, serviceContext); 381 } 382 383 public static com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 384 long layoutPrototypeId, 385 java.util.Map<java.util.Locale, java.lang.String> nameMap, 386 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 387 boolean active, com.liferay.portal.service.ServiceContext serviceContext) 388 throws com.liferay.portal.kernel.exception.PortalException { 389 return getService() 390 .updateLayoutPrototype(layoutPrototypeId, nameMap, 391 descriptionMap, active, serviceContext); 392 } 393 394 public static LayoutPrototypeLocalService getService() { 395 if (_service == null) { 396 _service = (LayoutPrototypeLocalService)PortalBeanLocatorUtil.locate(LayoutPrototypeLocalService.class.getName()); 397 398 ReferenceRegistry.registerReference(LayoutPrototypeLocalServiceUtil.class, 399 "_service"); 400 } 401 402 return _service; 403 } 404 405 /** 406 * @deprecated As of 6.2.0 407 */ 408 @Deprecated 409 public void setService(LayoutPrototypeLocalService service) { 410 } 411 412 private static LayoutPrototypeLocalService _service; 413 }