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