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            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
224                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) {
225                    return getService().getExportActionableDynamicQuery(portletDataContext);
226            }
227    
228            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
229                    return getService().getIndexableActionableDynamicQuery();
230            }
231    
232            /**
233            * Returns the OSGi service identifier.
234            *
235            * @return the OSGi service identifier
236            */
237            public static java.lang.String getOSGiServiceIdentifier() {
238                    return getService().getOSGiServiceIdentifier();
239            }
240    
241            public static com.liferay.portal.model.PersistedModel getPersistedModel(
242                    java.io.Serializable primaryKeyObj)
243                    throws com.liferay.portal.kernel.exception.PortalException {
244                    return getService().getPersistedModel(primaryKeyObj);
245            }
246    
247            /**
248            * Returns the website with the primary key.
249            *
250            * @param websiteId the primary key of the website
251            * @return the website
252            * @throws PortalException if a website with the primary key could not be found
253            */
254            public static com.liferay.portal.model.Website getWebsite(long websiteId)
255                    throws com.liferay.portal.kernel.exception.PortalException {
256                    return getService().getWebsite(websiteId);
257            }
258    
259            /**
260            * Returns the website with the matching UUID and company.
261            *
262            * @param uuid the website's UUID
263            * @param companyId the primary key of the company
264            * @return the matching website
265            * @throws PortalException if a matching website could not be found
266            */
267            public static com.liferay.portal.model.Website getWebsiteByUuidAndCompanyId(
268                    java.lang.String uuid, long companyId)
269                    throws com.liferay.portal.kernel.exception.PortalException {
270                    return getService().getWebsiteByUuidAndCompanyId(uuid, companyId);
271            }
272    
273            public static java.util.List<com.liferay.portal.model.Website> getWebsites() {
274                    return getService().getWebsites();
275            }
276    
277            public static java.util.List<com.liferay.portal.model.Website> getWebsites(
278                    long companyId, java.lang.String className, long classPK) {
279                    return getService().getWebsites(companyId, className, classPK);
280            }
281    
282            /**
283            * Returns a range of all the websites.
284            *
285            * <p>
286            * 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.
287            * </p>
288            *
289            * @param start the lower bound of the range of websites
290            * @param end the upper bound of the range of websites (not inclusive)
291            * @return the range of websites
292            */
293            public static java.util.List<com.liferay.portal.model.Website> getWebsites(
294                    int start, int end) {
295                    return getService().getWebsites(start, end);
296            }
297    
298            /**
299            * Returns the number of websites.
300            *
301            * @return the number of websites
302            */
303            public static int getWebsitesCount() {
304                    return getService().getWebsitesCount();
305            }
306    
307            /**
308            * Updates the website in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
309            *
310            * @param website the website
311            * @return the website that was updated
312            */
313            public static com.liferay.portal.model.Website updateWebsite(
314                    com.liferay.portal.model.Website website) {
315                    return getService().updateWebsite(website);
316            }
317    
318            public static com.liferay.portal.model.Website updateWebsite(
319                    long websiteId, java.lang.String url, long typeId, boolean primary)
320                    throws com.liferay.portal.kernel.exception.PortalException {
321                    return getService().updateWebsite(websiteId, url, typeId, primary);
322            }
323    
324            public static WebsiteLocalService getService() {
325                    if (_service == null) {
326                            _service = (WebsiteLocalService)PortalBeanLocatorUtil.locate(WebsiteLocalService.class.getName());
327    
328                            ReferenceRegistry.registerReference(WebsiteLocalServiceUtil.class,
329                                    "_service");
330                    }
331    
332                    return _service;
333            }
334    
335            private static WebsiteLocalService _service;
336    }