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 * The utility for the layout prototype local service. This utility wraps {@link com.liferay.portal.service.impl.LayoutPrototypeLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server. 022 * 023 * <p> 024 * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. 025 * </p> 026 * 027 * @author Brian Wing Shun Chan 028 * @see LayoutPrototypeLocalService 029 * @see com.liferay.portal.service.base.LayoutPrototypeLocalServiceBaseImpl 030 * @see com.liferay.portal.service.impl.LayoutPrototypeLocalServiceImpl 031 * @generated 032 */ 033 public class LayoutPrototypeLocalServiceUtil { 034 /* 035 * NOTE FOR DEVELOPERS: 036 * 037 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutPrototypeLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 038 */ 039 040 /** 041 * Adds the layout prototype to the database. Also notifies the appropriate model listeners. 042 * 043 * @param layoutPrototype the layout prototype 044 * @return the layout prototype that was added 045 * @throws SystemException if a system exception occurred 046 */ 047 public static com.liferay.portal.model.LayoutPrototype addLayoutPrototype( 048 com.liferay.portal.model.LayoutPrototype layoutPrototype) 049 throws com.liferay.portal.kernel.exception.SystemException { 050 return getService().addLayoutPrototype(layoutPrototype); 051 } 052 053 /** 054 * Creates a new layout prototype with the primary key. Does not add the layout prototype to the database. 055 * 056 * @param layoutPrototypeId the primary key for the new layout prototype 057 * @return the new layout prototype 058 */ 059 public static com.liferay.portal.model.LayoutPrototype createLayoutPrototype( 060 long layoutPrototypeId) { 061 return getService().createLayoutPrototype(layoutPrototypeId); 062 } 063 064 /** 065 * Deletes the layout prototype with the primary key from the database. Also notifies the appropriate model listeners. 066 * 067 * @param layoutPrototypeId the primary key of the layout prototype 068 * @return the layout prototype that was removed 069 * @throws PortalException if a layout prototype with the primary key could not be found 070 * @throws SystemException if a system exception occurred 071 */ 072 public static com.liferay.portal.model.LayoutPrototype deleteLayoutPrototype( 073 long layoutPrototypeId) 074 throws com.liferay.portal.kernel.exception.PortalException, 075 com.liferay.portal.kernel.exception.SystemException { 076 return getService().deleteLayoutPrototype(layoutPrototypeId); 077 } 078 079 /** 080 * Deletes the layout prototype from the database. Also notifies the appropriate model listeners. 081 * 082 * @param layoutPrototype the layout prototype 083 * @return the layout prototype that was removed 084 * @throws PortalException 085 * @throws SystemException if a system exception occurred 086 */ 087 public static com.liferay.portal.model.LayoutPrototype deleteLayoutPrototype( 088 com.liferay.portal.model.LayoutPrototype layoutPrototype) 089 throws com.liferay.portal.kernel.exception.PortalException, 090 com.liferay.portal.kernel.exception.SystemException { 091 return getService().deleteLayoutPrototype(layoutPrototype); 092 } 093 094 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 095 return getService().dynamicQuery(); 096 } 097 098 /** 099 * Performs a dynamic query on the database and returns the matching rows. 100 * 101 * @param dynamicQuery the dynamic query 102 * @return the matching rows 103 * @throws SystemException if a system exception occurred 104 */ 105 @SuppressWarnings("rawtypes") 106 public static java.util.List dynamicQuery( 107 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 108 throws com.liferay.portal.kernel.exception.SystemException { 109 return getService().dynamicQuery(dynamicQuery); 110 } 111 112 /** 113 * Performs a dynamic query on the database and returns a range of the matching rows. 114 * 115 * <p> 116 * 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. 117 * </p> 118 * 119 * @param dynamicQuery the dynamic query 120 * @param start the lower bound of the range of model instances 121 * @param end the upper bound of the range of model instances (not inclusive) 122 * @return the range of matching rows 123 * @throws SystemException if a system exception occurred 124 */ 125 @SuppressWarnings("rawtypes") 126 public static java.util.List dynamicQuery( 127 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 128 int end) throws com.liferay.portal.kernel.exception.SystemException { 129 return getService().dynamicQuery(dynamicQuery, start, end); 130 } 131 132 /** 133 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 134 * 135 * <p> 136 * 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. 137 * </p> 138 * 139 * @param dynamicQuery the dynamic query 140 * @param start the lower bound of the range of model instances 141 * @param end the upper bound of the range of model instances (not inclusive) 142 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 143 * @return the ordered range of matching rows 144 * @throws SystemException if a system exception occurred 145 */ 146 @SuppressWarnings("rawtypes") 147 public static java.util.List dynamicQuery( 148 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 149 int end, 150 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 151 throws com.liferay.portal.kernel.exception.SystemException { 152 return getService() 153 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 154 } 155 156 /** 157 * Returns the number of rows that match the dynamic query. 158 * 159 * @param dynamicQuery the dynamic query 160 * @return the number of rows that match the dynamic query 161 * @throws SystemException if a system exception occurred 162 */ 163 public static long dynamicQueryCount( 164 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 165 throws com.liferay.portal.kernel.exception.SystemException { 166 return getService().dynamicQueryCount(dynamicQuery); 167 } 168 169 public static com.liferay.portal.model.LayoutPrototype fetchLayoutPrototype( 170 long layoutPrototypeId) 171 throws com.liferay.portal.kernel.exception.SystemException { 172 return getService().fetchLayoutPrototype(layoutPrototypeId); 173 } 174 175 /** 176 * Returns the layout prototype with the primary key. 177 * 178 * @param layoutPrototypeId the primary key of the layout prototype 179 * @return the layout prototype 180 * @throws PortalException if a layout prototype with the primary key could not be found 181 * @throws SystemException if a system exception occurred 182 */ 183 public static com.liferay.portal.model.LayoutPrototype getLayoutPrototype( 184 long layoutPrototypeId) 185 throws com.liferay.portal.kernel.exception.PortalException, 186 com.liferay.portal.kernel.exception.SystemException { 187 return getService().getLayoutPrototype(layoutPrototypeId); 188 } 189 190 public static com.liferay.portal.model.PersistedModel getPersistedModel( 191 java.io.Serializable primaryKeyObj) 192 throws com.liferay.portal.kernel.exception.PortalException, 193 com.liferay.portal.kernel.exception.SystemException { 194 return getService().getPersistedModel(primaryKeyObj); 195 } 196 197 /** 198 * Returns a range of all the layout prototypes. 199 * 200 * <p> 201 * 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. 202 * </p> 203 * 204 * @param start the lower bound of the range of layout prototypes 205 * @param end the upper bound of the range of layout prototypes (not inclusive) 206 * @return the range of layout prototypes 207 * @throws SystemException if a system exception occurred 208 */ 209 public static java.util.List<com.liferay.portal.model.LayoutPrototype> getLayoutPrototypes( 210 int start, int end) 211 throws com.liferay.portal.kernel.exception.SystemException { 212 return getService().getLayoutPrototypes(start, end); 213 } 214 215 /** 216 * Returns the number of layout prototypes. 217 * 218 * @return the number of layout prototypes 219 * @throws SystemException if a system exception occurred 220 */ 221 public static int getLayoutPrototypesCount() 222 throws com.liferay.portal.kernel.exception.SystemException { 223 return getService().getLayoutPrototypesCount(); 224 } 225 226 /** 227 * Updates the layout prototype in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 228 * 229 * @param layoutPrototype the layout prototype 230 * @return the layout prototype that was updated 231 * @throws SystemException if a system exception occurred 232 */ 233 public static com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 234 com.liferay.portal.model.LayoutPrototype layoutPrototype) 235 throws com.liferay.portal.kernel.exception.SystemException { 236 return getService().updateLayoutPrototype(layoutPrototype); 237 } 238 239 /** 240 * Updates the layout prototype in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 241 * 242 * @param layoutPrototype the layout prototype 243 * @param merge whether to merge the layout prototype with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation. 244 * @return the layout prototype that was updated 245 * @throws SystemException if a system exception occurred 246 */ 247 public static com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 248 com.liferay.portal.model.LayoutPrototype layoutPrototype, boolean merge) 249 throws com.liferay.portal.kernel.exception.SystemException { 250 return getService().updateLayoutPrototype(layoutPrototype, merge); 251 } 252 253 /** 254 * Returns the Spring bean ID for this bean. 255 * 256 * @return the Spring bean ID for this bean 257 */ 258 public static java.lang.String getBeanIdentifier() { 259 return getService().getBeanIdentifier(); 260 } 261 262 /** 263 * Sets the Spring bean ID for this bean. 264 * 265 * @param beanIdentifier the Spring bean ID for this bean 266 */ 267 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 268 getService().setBeanIdentifier(beanIdentifier); 269 } 270 271 public static com.liferay.portal.model.LayoutPrototype addLayoutPrototype( 272 long userId, long companyId, 273 java.util.Map<java.util.Locale, java.lang.String> nameMap, 274 java.lang.String description, boolean active) 275 throws com.liferay.portal.kernel.exception.PortalException, 276 com.liferay.portal.kernel.exception.SystemException { 277 return getService() 278 .addLayoutPrototype(userId, companyId, nameMap, description, 279 active); 280 } 281 282 public static com.liferay.portal.model.LayoutPrototype getLayoutPrototypeByUuid( 283 java.lang.String uuid) 284 throws com.liferay.portal.kernel.exception.PortalException, 285 com.liferay.portal.kernel.exception.SystemException { 286 return getService().getLayoutPrototypeByUuid(uuid); 287 } 288 289 public static java.util.List<com.liferay.portal.model.LayoutPrototype> search( 290 long companyId, java.lang.Boolean active, int start, int end, 291 com.liferay.portal.kernel.util.OrderByComparator obc) 292 throws com.liferay.portal.kernel.exception.SystemException { 293 return getService().search(companyId, active, start, end, obc); 294 } 295 296 public static int searchCount(long companyId, java.lang.Boolean active) 297 throws com.liferay.portal.kernel.exception.SystemException { 298 return getService().searchCount(companyId, active); 299 } 300 301 public static com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 302 long layoutPrototypeId, 303 java.util.Map<java.util.Locale, java.lang.String> nameMap, 304 java.lang.String description, boolean active) 305 throws com.liferay.portal.kernel.exception.PortalException, 306 com.liferay.portal.kernel.exception.SystemException { 307 return getService() 308 .updateLayoutPrototype(layoutPrototypeId, nameMap, 309 description, active); 310 } 311 312 public static LayoutPrototypeLocalService getService() { 313 if (_service == null) { 314 _service = (LayoutPrototypeLocalService)PortalBeanLocatorUtil.locate(LayoutPrototypeLocalService.class.getName()); 315 316 ReferenceRegistry.registerReference(LayoutPrototypeLocalServiceUtil.class, 317 "_service"); 318 } 319 320 return _service; 321 } 322 323 /** 324 * @deprecated 325 */ 326 public void setService(LayoutPrototypeLocalService service) { 327 } 328 329 private static LayoutPrototypeLocalService _service; 330 }