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