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 Website. This utility wraps 024 * {@link com.liferay.portal.service.impl.WebsiteLocalServiceImpl} 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 WebsiteLocalService 032 * @see com.liferay.portal.service.base.WebsiteLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.WebsiteLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class WebsiteLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.WebsiteLocalServiceImpl} 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 * @throws PortalException 062 */ 063 public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( 064 com.liferay.portal.kernel.model.PersistedModel persistedModel) 065 throws com.liferay.portal.kernel.exception.PortalException { 066 return getService().deletePersistedModel(persistedModel); 067 } 068 069 public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( 070 java.io.Serializable primaryKeyObj) 071 throws com.liferay.portal.kernel.exception.PortalException { 072 return getService().getPersistedModel(primaryKeyObj); 073 } 074 075 /** 076 * Adds the website to the database. Also notifies the appropriate model listeners. 077 * 078 * @param website the website 079 * @return the website that was added 080 */ 081 public static com.liferay.portal.kernel.model.Website addWebsite( 082 com.liferay.portal.kernel.model.Website website) { 083 return getService().addWebsite(website); 084 } 085 086 public static com.liferay.portal.kernel.model.Website addWebsite( 087 long userId, java.lang.String className, long classPK, 088 java.lang.String url, long typeId, boolean primary, 089 ServiceContext serviceContext) 090 throws com.liferay.portal.kernel.exception.PortalException { 091 return getService() 092 .addWebsite(userId, className, classPK, url, typeId, 093 primary, serviceContext); 094 } 095 096 /** 097 * Creates a new website with the primary key. Does not add the website to the database. 098 * 099 * @param websiteId the primary key for the new website 100 * @return the new website 101 */ 102 public static com.liferay.portal.kernel.model.Website createWebsite( 103 long websiteId) { 104 return getService().createWebsite(websiteId); 105 } 106 107 /** 108 * Deletes the website from the database. Also notifies the appropriate model listeners. 109 * 110 * @param website the website 111 * @return the website that was removed 112 */ 113 public static com.liferay.portal.kernel.model.Website deleteWebsite( 114 com.liferay.portal.kernel.model.Website website) { 115 return getService().deleteWebsite(website); 116 } 117 118 /** 119 * Deletes the website with the primary key from the database. Also notifies the appropriate model listeners. 120 * 121 * @param websiteId the primary key of the website 122 * @return the website that was removed 123 * @throws PortalException if a website with the primary key could not be found 124 */ 125 public static com.liferay.portal.kernel.model.Website deleteWebsite( 126 long websiteId) 127 throws com.liferay.portal.kernel.exception.PortalException { 128 return getService().deleteWebsite(websiteId); 129 } 130 131 public static com.liferay.portal.kernel.model.Website fetchWebsite( 132 long websiteId) { 133 return getService().fetchWebsite(websiteId); 134 } 135 136 /** 137 * Returns the website with the matching UUID and company. 138 * 139 * @param uuid the website's UUID 140 * @param companyId the primary key of the company 141 * @return the matching website, or <code>null</code> if a matching website could not be found 142 */ 143 public static com.liferay.portal.kernel.model.Website fetchWebsiteByUuidAndCompanyId( 144 java.lang.String uuid, long companyId) { 145 return getService().fetchWebsiteByUuidAndCompanyId(uuid, companyId); 146 } 147 148 /** 149 * Returns the website with the primary key. 150 * 151 * @param websiteId the primary key of the website 152 * @return the website 153 * @throws PortalException if a website with the primary key could not be found 154 */ 155 public static com.liferay.portal.kernel.model.Website getWebsite( 156 long websiteId) 157 throws com.liferay.portal.kernel.exception.PortalException { 158 return getService().getWebsite(websiteId); 159 } 160 161 /** 162 * Returns the website with the matching UUID and company. 163 * 164 * @param uuid the website's UUID 165 * @param companyId the primary key of the company 166 * @return the matching website 167 * @throws PortalException if a matching website could not be found 168 */ 169 public static com.liferay.portal.kernel.model.Website getWebsiteByUuidAndCompanyId( 170 java.lang.String uuid, long companyId) 171 throws com.liferay.portal.kernel.exception.PortalException { 172 return getService().getWebsiteByUuidAndCompanyId(uuid, companyId); 173 } 174 175 /** 176 * Updates the website in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 177 * 178 * @param website the website 179 * @return the website that was updated 180 */ 181 public static com.liferay.portal.kernel.model.Website updateWebsite( 182 com.liferay.portal.kernel.model.Website website) { 183 return getService().updateWebsite(website); 184 } 185 186 public static com.liferay.portal.kernel.model.Website updateWebsite( 187 long websiteId, java.lang.String url, long typeId, boolean primary) 188 throws com.liferay.portal.kernel.exception.PortalException { 189 return getService().updateWebsite(websiteId, url, typeId, primary); 190 } 191 192 /** 193 * Returns the number of websites. 194 * 195 * @return the number of websites 196 */ 197 public static int getWebsitesCount() { 198 return getService().getWebsitesCount(); 199 } 200 201 /** 202 * Returns the OSGi service identifier. 203 * 204 * @return the OSGi service identifier 205 */ 206 public static java.lang.String getOSGiServiceIdentifier() { 207 return getService().getOSGiServiceIdentifier(); 208 } 209 210 /** 211 * Performs a dynamic query on the database and returns the matching rows. 212 * 213 * @param dynamicQuery the dynamic query 214 * @return the matching rows 215 */ 216 public static <T> java.util.List<T> dynamicQuery( 217 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 218 return getService().dynamicQuery(dynamicQuery); 219 } 220 221 /** 222 * Performs a dynamic query on the database and returns a range of the matching rows. 223 * 224 * <p> 225 * 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.WebsiteModelImpl}. 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. 226 * </p> 227 * 228 * @param dynamicQuery the dynamic query 229 * @param start the lower bound of the range of model instances 230 * @param end the upper bound of the range of model instances (not inclusive) 231 * @return the range of matching rows 232 */ 233 public static <T> java.util.List<T> dynamicQuery( 234 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 235 int end) { 236 return getService().dynamicQuery(dynamicQuery, start, end); 237 } 238 239 /** 240 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 241 * 242 * <p> 243 * 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.WebsiteModelImpl}. 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. 244 * </p> 245 * 246 * @param dynamicQuery the dynamic query 247 * @param start the lower bound of the range of model instances 248 * @param end the upper bound of the range of model instances (not inclusive) 249 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 250 * @return the ordered range of matching rows 251 */ 252 public static <T> java.util.List<T> dynamicQuery( 253 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 254 int end, 255 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 256 return getService() 257 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 258 } 259 260 public static java.util.List<com.liferay.portal.kernel.model.Website> getWebsites() { 261 return getService().getWebsites(); 262 } 263 264 /** 265 * Returns a range of all the websites. 266 * 267 * <p> 268 * 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.WebsiteModelImpl}. 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. 269 * </p> 270 * 271 * @param start the lower bound of the range of websites 272 * @param end the upper bound of the range of websites (not inclusive) 273 * @return the range of websites 274 */ 275 public static java.util.List<com.liferay.portal.kernel.model.Website> getWebsites( 276 int start, int end) { 277 return getService().getWebsites(start, end); 278 } 279 280 public static java.util.List<com.liferay.portal.kernel.model.Website> getWebsites( 281 long companyId, java.lang.String className, long classPK) { 282 return getService().getWebsites(companyId, className, classPK); 283 } 284 285 /** 286 * Returns the number of rows matching the dynamic query. 287 * 288 * @param dynamicQuery the dynamic query 289 * @return the number of rows matching the dynamic query 290 */ 291 public static long dynamicQueryCount( 292 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 293 return getService().dynamicQueryCount(dynamicQuery); 294 } 295 296 /** 297 * Returns the number of rows matching the dynamic query. 298 * 299 * @param dynamicQuery the dynamic query 300 * @param projection the projection to apply to the query 301 * @return the number of rows matching the dynamic query 302 */ 303 public static long dynamicQueryCount( 304 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 305 com.liferay.portal.kernel.dao.orm.Projection projection) { 306 return getService().dynamicQueryCount(dynamicQuery, projection); 307 } 308 309 public static void deleteWebsites(long companyId, 310 java.lang.String className, long classPK) { 311 getService().deleteWebsites(companyId, className, classPK); 312 } 313 314 public static WebsiteLocalService getService() { 315 if (_service == null) { 316 _service = (WebsiteLocalService)PortalBeanLocatorUtil.locate(WebsiteLocalService.class.getName()); 317 318 ReferenceRegistry.registerReference(WebsiteLocalServiceUtil.class, 319 "_service"); 320 } 321 322 return _service; 323 } 324 325 private static WebsiteLocalService _service; 326 }