001 /** 002 * Copyright (c) 2000-2013 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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.util.ReferenceRegistry; 019 020 /** 021 * Provides the local service utility for LayoutSetPrototype. This utility wraps 022 * {@link com.liferay.portal.service.impl.LayoutSetPrototypeLocalServiceImpl} and is the 023 * primary access point for service operations in application layer code running 024 * on the local server. Methods of this service will not have security checks 025 * based on the propagated JAAS credentials because this service can only be 026 * accessed from within the same VM. 027 * 028 * @author Brian Wing Shun Chan 029 * @see LayoutSetPrototypeLocalService 030 * @see com.liferay.portal.service.base.LayoutSetPrototypeLocalServiceBaseImpl 031 * @see com.liferay.portal.service.impl.LayoutSetPrototypeLocalServiceImpl 032 * @generated 033 */ 034 public class LayoutSetPrototypeLocalServiceUtil { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutSetPrototypeLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 039 */ 040 041 /** 042 * Adds the layout set prototype to the database. Also notifies the appropriate model listeners. 043 * 044 * @param layoutSetPrototype the layout set prototype 045 * @return the layout set prototype that was added 046 * @throws SystemException if a system exception occurred 047 */ 048 public static com.liferay.portal.model.LayoutSetPrototype addLayoutSetPrototype( 049 com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype) 050 throws com.liferay.portal.kernel.exception.SystemException { 051 return getService().addLayoutSetPrototype(layoutSetPrototype); 052 } 053 054 /** 055 * Creates a new layout set prototype with the primary key. Does not add the layout set prototype to the database. 056 * 057 * @param layoutSetPrototypeId the primary key for the new layout set prototype 058 * @return the new layout set prototype 059 */ 060 public static com.liferay.portal.model.LayoutSetPrototype createLayoutSetPrototype( 061 long layoutSetPrototypeId) { 062 return getService().createLayoutSetPrototype(layoutSetPrototypeId); 063 } 064 065 /** 066 * Deletes the layout set prototype with the primary key from the database. Also notifies the appropriate model listeners. 067 * 068 * @param layoutSetPrototypeId the primary key of the layout set prototype 069 * @return the layout set prototype that was removed 070 * @throws PortalException if a layout set prototype with the primary key could not be found 071 * @throws SystemException if a system exception occurred 072 */ 073 public static com.liferay.portal.model.LayoutSetPrototype deleteLayoutSetPrototype( 074 long layoutSetPrototypeId) 075 throws com.liferay.portal.kernel.exception.PortalException, 076 com.liferay.portal.kernel.exception.SystemException { 077 return getService().deleteLayoutSetPrototype(layoutSetPrototypeId); 078 } 079 080 /** 081 * Deletes the layout set prototype from the database. Also notifies the appropriate model listeners. 082 * 083 * @param layoutSetPrototype the layout set prototype 084 * @return the layout set prototype that was removed 085 * @throws PortalException 086 * @throws SystemException if a system exception occurred 087 */ 088 public static com.liferay.portal.model.LayoutSetPrototype deleteLayoutSetPrototype( 089 com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype) 090 throws com.liferay.portal.kernel.exception.PortalException, 091 com.liferay.portal.kernel.exception.SystemException { 092 return getService().deleteLayoutSetPrototype(layoutSetPrototype); 093 } 094 095 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 096 return getService().dynamicQuery(); 097 } 098 099 /** 100 * Performs a dynamic query on the database and returns the matching rows. 101 * 102 * @param dynamicQuery the dynamic query 103 * @return the matching rows 104 * @throws SystemException if a system exception occurred 105 */ 106 @SuppressWarnings("rawtypes") 107 public static java.util.List dynamicQuery( 108 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 109 throws com.liferay.portal.kernel.exception.SystemException { 110 return getService().dynamicQuery(dynamicQuery); 111 } 112 113 /** 114 * Performs a dynamic query on the database and returns a range of the matching rows. 115 * 116 * <p> 117 * 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.LayoutSetPrototypeModelImpl}. 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. 118 * </p> 119 * 120 * @param dynamicQuery the dynamic query 121 * @param start the lower bound of the range of model instances 122 * @param end the upper bound of the range of model instances (not inclusive) 123 * @return the range of matching rows 124 * @throws SystemException if a system exception occurred 125 */ 126 @SuppressWarnings("rawtypes") 127 public static java.util.List dynamicQuery( 128 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 129 int end) throws com.liferay.portal.kernel.exception.SystemException { 130 return getService().dynamicQuery(dynamicQuery, start, end); 131 } 132 133 /** 134 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 135 * 136 * <p> 137 * 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.LayoutSetPrototypeModelImpl}. 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. 138 * </p> 139 * 140 * @param dynamicQuery the dynamic query 141 * @param start the lower bound of the range of model instances 142 * @param end the upper bound of the range of model instances (not inclusive) 143 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 144 * @return the ordered range of matching rows 145 * @throws SystemException if a system exception occurred 146 */ 147 @SuppressWarnings("rawtypes") 148 public static java.util.List dynamicQuery( 149 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 150 int end, 151 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 152 throws com.liferay.portal.kernel.exception.SystemException { 153 return getService() 154 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 155 } 156 157 /** 158 * Returns the number of rows that match the dynamic query. 159 * 160 * @param dynamicQuery the dynamic query 161 * @return the number of rows that match the dynamic query 162 * @throws SystemException if a system exception occurred 163 */ 164 public static long dynamicQueryCount( 165 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 166 throws com.liferay.portal.kernel.exception.SystemException { 167 return getService().dynamicQueryCount(dynamicQuery); 168 } 169 170 /** 171 * Returns the number of rows that match the dynamic query. 172 * 173 * @param dynamicQuery the dynamic query 174 * @param projection the projection to apply to the query 175 * @return the number of rows that match the dynamic query 176 * @throws SystemException if a system exception occurred 177 */ 178 public static long dynamicQueryCount( 179 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 180 com.liferay.portal.kernel.dao.orm.Projection projection) 181 throws com.liferay.portal.kernel.exception.SystemException { 182 return getService().dynamicQueryCount(dynamicQuery, projection); 183 } 184 185 public static com.liferay.portal.model.LayoutSetPrototype fetchLayoutSetPrototype( 186 long layoutSetPrototypeId) 187 throws com.liferay.portal.kernel.exception.SystemException { 188 return getService().fetchLayoutSetPrototype(layoutSetPrototypeId); 189 } 190 191 /** 192 * Returns the layout set prototype with the matching UUID and company. 193 * 194 * @param uuid the layout set prototype's UUID 195 * @param companyId the primary key of the company 196 * @return the matching layout set prototype, or <code>null</code> if a matching layout set prototype could not be found 197 * @throws SystemException if a system exception occurred 198 */ 199 public static com.liferay.portal.model.LayoutSetPrototype fetchLayoutSetPrototypeByUuidAndCompanyId( 200 java.lang.String uuid, long companyId) 201 throws com.liferay.portal.kernel.exception.SystemException { 202 return getService() 203 .fetchLayoutSetPrototypeByUuidAndCompanyId(uuid, companyId); 204 } 205 206 /** 207 * Returns the layout set prototype with the primary key. 208 * 209 * @param layoutSetPrototypeId the primary key of the layout set prototype 210 * @return the layout set prototype 211 * @throws PortalException if a layout set prototype with the primary key could not be found 212 * @throws SystemException if a system exception occurred 213 */ 214 public static com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototype( 215 long layoutSetPrototypeId) 216 throws com.liferay.portal.kernel.exception.PortalException, 217 com.liferay.portal.kernel.exception.SystemException { 218 return getService().getLayoutSetPrototype(layoutSetPrototypeId); 219 } 220 221 public static com.liferay.portal.model.PersistedModel getPersistedModel( 222 java.io.Serializable primaryKeyObj) 223 throws com.liferay.portal.kernel.exception.PortalException, 224 com.liferay.portal.kernel.exception.SystemException { 225 return getService().getPersistedModel(primaryKeyObj); 226 } 227 228 /** 229 * Returns the layout set prototype with the matching UUID and company. 230 * 231 * @param uuid the layout set prototype's UUID 232 * @param companyId the primary key of the company 233 * @return the matching layout set prototype 234 * @throws PortalException if a matching layout set prototype could not be found 235 * @throws SystemException if a system exception occurred 236 */ 237 public static com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototypeByUuidAndCompanyId( 238 java.lang.String uuid, long companyId) 239 throws com.liferay.portal.kernel.exception.PortalException, 240 com.liferay.portal.kernel.exception.SystemException { 241 return getService() 242 .getLayoutSetPrototypeByUuidAndCompanyId(uuid, companyId); 243 } 244 245 /** 246 * Returns a range of all the layout set prototypes. 247 * 248 * <p> 249 * 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.LayoutSetPrototypeModelImpl}. 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. 250 * </p> 251 * 252 * @param start the lower bound of the range of layout set prototypes 253 * @param end the upper bound of the range of layout set prototypes (not inclusive) 254 * @return the range of layout set prototypes 255 * @throws SystemException if a system exception occurred 256 */ 257 public static java.util.List<com.liferay.portal.model.LayoutSetPrototype> getLayoutSetPrototypes( 258 int start, int end) 259 throws com.liferay.portal.kernel.exception.SystemException { 260 return getService().getLayoutSetPrototypes(start, end); 261 } 262 263 /** 264 * Returns the number of layout set prototypes. 265 * 266 * @return the number of layout set prototypes 267 * @throws SystemException if a system exception occurred 268 */ 269 public static int getLayoutSetPrototypesCount() 270 throws com.liferay.portal.kernel.exception.SystemException { 271 return getService().getLayoutSetPrototypesCount(); 272 } 273 274 /** 275 * Updates the layout set prototype in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 276 * 277 * @param layoutSetPrototype the layout set prototype 278 * @return the layout set prototype that was updated 279 * @throws SystemException if a system exception occurred 280 */ 281 public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype( 282 com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype) 283 throws com.liferay.portal.kernel.exception.SystemException { 284 return getService().updateLayoutSetPrototype(layoutSetPrototype); 285 } 286 287 /** 288 * Returns the Spring bean ID for this bean. 289 * 290 * @return the Spring bean ID for this bean 291 */ 292 public static java.lang.String getBeanIdentifier() { 293 return getService().getBeanIdentifier(); 294 } 295 296 /** 297 * Sets the Spring bean ID for this bean. 298 * 299 * @param beanIdentifier the Spring bean ID for this bean 300 */ 301 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 302 getService().setBeanIdentifier(beanIdentifier); 303 } 304 305 public static com.liferay.portal.model.LayoutSetPrototype addLayoutSetPrototype( 306 long userId, long companyId, 307 java.util.Map<java.util.Locale, java.lang.String> nameMap, 308 java.lang.String description, boolean active, 309 boolean layoutsUpdateable, 310 com.liferay.portal.service.ServiceContext serviceContext) 311 throws com.liferay.portal.kernel.exception.PortalException, 312 com.liferay.portal.kernel.exception.SystemException { 313 return getService() 314 .addLayoutSetPrototype(userId, companyId, nameMap, 315 description, active, layoutsUpdateable, serviceContext); 316 } 317 318 public static void deleteNondefaultLayoutSetPrototypes(long companyId) 319 throws com.liferay.portal.kernel.exception.PortalException, 320 com.liferay.portal.kernel.exception.SystemException { 321 getService().deleteNondefaultLayoutSetPrototypes(companyId); 322 } 323 324 /** 325 * @deprecated As of 6.2.0, replaced by {@link 326 #getLayoutSetPrototypeByUuidAndCompanyId(String, long)} 327 */ 328 public static com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototypeByUuid( 329 java.lang.String uuid) 330 throws com.liferay.portal.kernel.exception.PortalException, 331 com.liferay.portal.kernel.exception.SystemException { 332 return getService().getLayoutSetPrototypeByUuid(uuid); 333 } 334 335 public static java.util.List<com.liferay.portal.model.LayoutSetPrototype> getLayoutSetPrototypes( 336 long companyId) 337 throws com.liferay.portal.kernel.exception.SystemException { 338 return getService().getLayoutSetPrototypes(companyId); 339 } 340 341 public static java.util.List<com.liferay.portal.model.LayoutSetPrototype> search( 342 long companyId, java.lang.Boolean active, int start, int end, 343 com.liferay.portal.kernel.util.OrderByComparator obc) 344 throws com.liferay.portal.kernel.exception.SystemException { 345 return getService().search(companyId, active, start, end, obc); 346 } 347 348 public static int searchCount(long companyId, java.lang.Boolean active) 349 throws com.liferay.portal.kernel.exception.SystemException { 350 return getService().searchCount(companyId, active); 351 } 352 353 public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype( 354 long layoutSetPrototypeId, 355 java.util.Map<java.util.Locale, java.lang.String> nameMap, 356 java.lang.String description, boolean active, 357 boolean layoutsUpdateable, 358 com.liferay.portal.service.ServiceContext serviceContext) 359 throws com.liferay.portal.kernel.exception.PortalException, 360 com.liferay.portal.kernel.exception.SystemException { 361 return getService() 362 .updateLayoutSetPrototype(layoutSetPrototypeId, nameMap, 363 description, active, layoutsUpdateable, serviceContext); 364 } 365 366 public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype( 367 long layoutSetPrototypeId, java.lang.String settings) 368 throws com.liferay.portal.kernel.exception.PortalException, 369 com.liferay.portal.kernel.exception.SystemException { 370 return getService() 371 .updateLayoutSetPrototype(layoutSetPrototypeId, settings); 372 } 373 374 public static LayoutSetPrototypeLocalService getService() { 375 if (_service == null) { 376 _service = (LayoutSetPrototypeLocalService)PortalBeanLocatorUtil.locate(LayoutSetPrototypeLocalService.class.getName()); 377 378 ReferenceRegistry.registerReference(LayoutSetPrototypeLocalServiceUtil.class, 379 "_service"); 380 } 381 382 return _service; 383 } 384 385 /** 386 * @deprecated As of 6.2.0 387 */ 388 public void setService(LayoutSetPrototypeLocalService service) { 389 } 390 391 private static LayoutSetPrototypeLocalService _service; 392 }