001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 013 */ 014 015 package com.liferay.portal.service; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.util.MethodCache; 019 import com.liferay.portal.kernel.util.ReferenceRegistry; 020 021 /** 022 * The utility for the layout set prototype local service. This utility wraps {@link com.liferay.portal.service.impl.LayoutSetPrototypeLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server. 023 * 024 * <p> 025 * 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. 026 * </p> 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 * @throws PortalException if a layout set prototype with the primary key could not be found 070 * @throws SystemException if a system exception occurred 071 */ 072 public static void deleteLayoutSetPrototype(long layoutSetPrototypeId) 073 throws com.liferay.portal.kernel.exception.PortalException, 074 com.liferay.portal.kernel.exception.SystemException { 075 getService().deleteLayoutSetPrototype(layoutSetPrototypeId); 076 } 077 078 /** 079 * Deletes the layout set prototype from the database. Also notifies the appropriate model listeners. 080 * 081 * @param layoutSetPrototype the layout set prototype 082 * @throws PortalException 083 * @throws SystemException if a system exception occurred 084 */ 085 public static void deleteLayoutSetPrototype( 086 com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype) 087 throws com.liferay.portal.kernel.exception.PortalException, 088 com.liferay.portal.kernel.exception.SystemException { 089 getService().deleteLayoutSetPrototype(layoutSetPrototype); 090 } 091 092 /** 093 * Performs a dynamic query on the database and returns the matching rows. 094 * 095 * @param dynamicQuery the dynamic query 096 * @return the matching rows 097 * @throws SystemException if a system exception occurred 098 */ 099 @SuppressWarnings("rawtypes") 100 public static java.util.List dynamicQuery( 101 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 102 throws com.liferay.portal.kernel.exception.SystemException { 103 return getService().dynamicQuery(dynamicQuery); 104 } 105 106 /** 107 * Performs a dynamic query on the database and returns a range of the matching rows. 108 * 109 * <p> 110 * 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. 111 * </p> 112 * 113 * @param dynamicQuery the dynamic query 114 * @param start the lower bound of the range of model instances 115 * @param end the upper bound of the range of model instances (not inclusive) 116 * @return the range of matching rows 117 * @throws SystemException if a system exception occurred 118 */ 119 @SuppressWarnings("rawtypes") 120 public static java.util.List dynamicQuery( 121 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 122 int end) throws com.liferay.portal.kernel.exception.SystemException { 123 return getService().dynamicQuery(dynamicQuery, start, end); 124 } 125 126 /** 127 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 128 * 129 * <p> 130 * 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. 131 * </p> 132 * 133 * @param dynamicQuery the dynamic query 134 * @param start the lower bound of the range of model instances 135 * @param end the upper bound of the range of model instances (not inclusive) 136 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 137 * @return the ordered range of matching rows 138 * @throws SystemException if a system exception occurred 139 */ 140 @SuppressWarnings("rawtypes") 141 public static java.util.List dynamicQuery( 142 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 143 int end, 144 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 145 throws com.liferay.portal.kernel.exception.SystemException { 146 return getService() 147 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 148 } 149 150 /** 151 * Returns the number of rows that match the dynamic query. 152 * 153 * @param dynamicQuery the dynamic query 154 * @return the number of rows that match the dynamic query 155 * @throws SystemException if a system exception occurred 156 */ 157 public static long dynamicQueryCount( 158 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 159 throws com.liferay.portal.kernel.exception.SystemException { 160 return getService().dynamicQueryCount(dynamicQuery); 161 } 162 163 /** 164 * Returns the layout set prototype with the primary key. 165 * 166 * @param layoutSetPrototypeId the primary key of the layout set prototype 167 * @return the layout set prototype 168 * @throws PortalException if a layout set prototype with the primary key could not be found 169 * @throws SystemException if a system exception occurred 170 */ 171 public static com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototype( 172 long layoutSetPrototypeId) 173 throws com.liferay.portal.kernel.exception.PortalException, 174 com.liferay.portal.kernel.exception.SystemException { 175 return getService().getLayoutSetPrototype(layoutSetPrototypeId); 176 } 177 178 public static com.liferay.portal.model.PersistedModel getPersistedModel( 179 java.io.Serializable primaryKeyObj) 180 throws com.liferay.portal.kernel.exception.PortalException, 181 com.liferay.portal.kernel.exception.SystemException { 182 return getService().getPersistedModel(primaryKeyObj); 183 } 184 185 /** 186 * Returns a range of all the layout set prototypes. 187 * 188 * <p> 189 * 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. 190 * </p> 191 * 192 * @param start the lower bound of the range of layout set prototypes 193 * @param end the upper bound of the range of layout set prototypes (not inclusive) 194 * @return the range of layout set prototypes 195 * @throws SystemException if a system exception occurred 196 */ 197 public static java.util.List<com.liferay.portal.model.LayoutSetPrototype> getLayoutSetPrototypes( 198 int start, int end) 199 throws com.liferay.portal.kernel.exception.SystemException { 200 return getService().getLayoutSetPrototypes(start, end); 201 } 202 203 /** 204 * Returns the number of layout set prototypes. 205 * 206 * @return the number of layout set prototypes 207 * @throws SystemException if a system exception occurred 208 */ 209 public static int getLayoutSetPrototypesCount() 210 throws com.liferay.portal.kernel.exception.SystemException { 211 return getService().getLayoutSetPrototypesCount(); 212 } 213 214 /** 215 * Updates the layout set prototype in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 216 * 217 * @param layoutSetPrototype the layout set prototype 218 * @return the layout set prototype that was updated 219 * @throws SystemException if a system exception occurred 220 */ 221 public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype( 222 com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype) 223 throws com.liferay.portal.kernel.exception.SystemException { 224 return getService().updateLayoutSetPrototype(layoutSetPrototype); 225 } 226 227 /** 228 * Updates the layout set prototype in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 229 * 230 * @param layoutSetPrototype the layout set prototype 231 * @param merge whether to merge the layout set 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. 232 * @return the layout set prototype that was updated 233 * @throws SystemException if a system exception occurred 234 */ 235 public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype( 236 com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype, 237 boolean merge) 238 throws com.liferay.portal.kernel.exception.SystemException { 239 return getService().updateLayoutSetPrototype(layoutSetPrototype, merge); 240 } 241 242 /** 243 * Returns the Spring bean ID for this bean. 244 * 245 * @return the Spring bean ID for this bean 246 */ 247 public static java.lang.String getBeanIdentifier() { 248 return getService().getBeanIdentifier(); 249 } 250 251 /** 252 * Sets the Spring bean ID for this bean. 253 * 254 * @param beanIdentifier the Spring bean ID for this bean 255 */ 256 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 257 getService().setBeanIdentifier(beanIdentifier); 258 } 259 260 public static com.liferay.portal.model.LayoutSetPrototype addLayoutSetPrototype( 261 long userId, long companyId, 262 java.util.Map<java.util.Locale, java.lang.String> nameMap, 263 java.lang.String description, boolean active) 264 throws com.liferay.portal.kernel.exception.PortalException, 265 com.liferay.portal.kernel.exception.SystemException { 266 return getService() 267 .addLayoutSetPrototype(userId, companyId, nameMap, 268 description, active); 269 } 270 271 public static java.util.List<com.liferay.portal.model.LayoutSetPrototype> search( 272 long companyId, java.lang.Boolean active, int start, int end, 273 com.liferay.portal.kernel.util.OrderByComparator obc) 274 throws com.liferay.portal.kernel.exception.SystemException { 275 return getService().search(companyId, active, start, end, obc); 276 } 277 278 public static int searchCount(long companyId, java.lang.Boolean active) 279 throws com.liferay.portal.kernel.exception.SystemException { 280 return getService().searchCount(companyId, active); 281 } 282 283 public static com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype( 284 long layoutSetPrototypeId, 285 java.util.Map<java.util.Locale, java.lang.String> nameMap, 286 java.lang.String description, boolean active) 287 throws com.liferay.portal.kernel.exception.PortalException, 288 com.liferay.portal.kernel.exception.SystemException { 289 return getService() 290 .updateLayoutSetPrototype(layoutSetPrototypeId, nameMap, 291 description, active); 292 } 293 294 public static LayoutSetPrototypeLocalService getService() { 295 if (_service == null) { 296 _service = (LayoutSetPrototypeLocalService)PortalBeanLocatorUtil.locate(LayoutSetPrototypeLocalService.class.getName()); 297 298 ReferenceRegistry.registerReference(LayoutSetPrototypeLocalServiceUtil.class, 299 "_service"); 300 MethodCache.remove(LayoutSetPrototypeLocalService.class); 301 } 302 303 return _service; 304 } 305 306 public void setService(LayoutSetPrototypeLocalService service) { 307 MethodCache.remove(LayoutSetPrototypeLocalService.class); 308 309 _service = service; 310 311 ReferenceRegistry.registerReference(LayoutSetPrototypeLocalServiceUtil.class, 312 "_service"); 313 MethodCache.remove(LayoutSetPrototypeLocalService.class); 314 } 315 316 private static LayoutSetPrototypeLocalService _service; 317 }