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