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.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    import com.liferay.portal.model.SystemEventConstants;
026    
027    /**
028     * Provides the local service interface for Website. Methods of this
029     * service will not have security checks based on the propagated JAAS
030     * credentials because this service can only be accessed from within the same
031     * VM.
032     *
033     * @author Brian Wing Shun Chan
034     * @see WebsiteLocalServiceUtil
035     * @see com.liferay.portal.service.base.WebsiteLocalServiceBaseImpl
036     * @see com.liferay.portal.service.impl.WebsiteLocalServiceImpl
037     * @generated
038     */
039    @ProviderType
040    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
041            PortalException.class, SystemException.class})
042    public interface WebsiteLocalService extends BaseLocalService,
043            PersistedModelLocalService {
044            /*
045             * NOTE FOR DEVELOPERS:
046             *
047             * Never modify or reference this interface directly. Always use {@link WebsiteLocalServiceUtil} to access the website local service. Add custom service methods to {@link com.liferay.portal.service.impl.WebsiteLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
048             */
049    
050            /**
051            * @deprecated As of 6.2.0, replaced by {@link #addWebsite(long, String,
052            long, String, int, boolean, ServiceContext)}
053            */
054            @java.lang.Deprecated
055            public com.liferay.portal.model.Website addWebsite(long userId,
056                    java.lang.String className, long classPK, java.lang.String url,
057                    long typeId, boolean primary) throws PortalException;
058    
059            public com.liferay.portal.model.Website addWebsite(long userId,
060                    java.lang.String className, long classPK, java.lang.String url,
061                    long typeId, boolean primary,
062                    com.liferay.portal.service.ServiceContext serviceContext)
063                    throws PortalException;
064    
065            /**
066            * Adds the website to the database. Also notifies the appropriate model listeners.
067            *
068            * @param website the website
069            * @return the website that was added
070            */
071            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
072            public com.liferay.portal.model.Website addWebsite(
073                    com.liferay.portal.model.Website website);
074    
075            /**
076            * Creates a new website with the primary key. Does not add the website to the database.
077            *
078            * @param websiteId the primary key for the new website
079            * @return the new website
080            */
081            public com.liferay.portal.model.Website createWebsite(long websiteId);
082    
083            /**
084            * @throws PortalException
085            */
086            @Override
087            public com.liferay.portal.model.PersistedModel deletePersistedModel(
088                    com.liferay.portal.model.PersistedModel persistedModel)
089                    throws PortalException;
090    
091            /**
092            * Deletes the website from the database. Also notifies the appropriate model listeners.
093            *
094            * @param website the website
095            * @return the website that was removed
096            */
097            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
098            @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
099            public com.liferay.portal.model.Website deleteWebsite(
100                    com.liferay.portal.model.Website website);
101    
102            /**
103            * Deletes the website with the primary key from the database. Also notifies the appropriate model listeners.
104            *
105            * @param websiteId the primary key of the website
106            * @return the website that was removed
107            * @throws PortalException if a website with the primary key could not be found
108            */
109            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
110            public com.liferay.portal.model.Website deleteWebsite(long websiteId)
111                    throws PortalException;
112    
113            public void deleteWebsites(long companyId, java.lang.String className,
114                    long classPK);
115    
116            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
117    
118            /**
119            * Performs a dynamic query on the database and returns the matching rows.
120            *
121            * @param dynamicQuery the dynamic query
122            * @return the matching rows
123            */
124            public <T> java.util.List<T> dynamicQuery(
125                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
126    
127            /**
128            * Performs a dynamic query on the database and returns a range of the matching rows.
129            *
130            * <p>
131            * 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.
132            * </p>
133            *
134            * @param dynamicQuery the dynamic query
135            * @param start the lower bound of the range of model instances
136            * @param end the upper bound of the range of model instances (not inclusive)
137            * @return the range of matching rows
138            */
139            public <T> java.util.List<T> dynamicQuery(
140                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141                    int end);
142    
143            /**
144            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
145            *
146            * <p>
147            * 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.
148            * </p>
149            *
150            * @param dynamicQuery the dynamic query
151            * @param start the lower bound of the range of model instances
152            * @param end the upper bound of the range of model instances (not inclusive)
153            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
154            * @return the ordered range of matching rows
155            */
156            public <T> java.util.List<T> dynamicQuery(
157                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
158                    int end,
159                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
160    
161            /**
162            * Returns the number of rows matching the dynamic query.
163            *
164            * @param dynamicQuery the dynamic query
165            * @return the number of rows matching the dynamic query
166            */
167            public long dynamicQueryCount(
168                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
169    
170            /**
171            * Returns the number of rows matching the dynamic query.
172            *
173            * @param dynamicQuery the dynamic query
174            * @param projection the projection to apply to the query
175            * @return the number of rows matching the dynamic query
176            */
177            public long dynamicQueryCount(
178                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
179                    com.liferay.portal.kernel.dao.orm.Projection projection);
180    
181            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182            public com.liferay.portal.model.Website fetchWebsite(long websiteId);
183    
184            /**
185            * Returns the website with the matching UUID and company.
186            *
187            * @param uuid the website's UUID
188            * @param companyId the primary key of the company
189            * @return the matching website, or <code>null</code> if a matching website could not be found
190            */
191            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
192            public com.liferay.portal.model.Website fetchWebsiteByUuidAndCompanyId(
193                    java.lang.String uuid, long companyId);
194    
195            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
197    
198            /**
199            * Returns the Spring bean ID for this bean.
200            *
201            * @return the Spring bean ID for this bean
202            */
203            public java.lang.String getBeanIdentifier();
204    
205            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
206            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
207                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
208    
209            @Override
210            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211            public com.liferay.portal.model.PersistedModel getPersistedModel(
212                    java.io.Serializable primaryKeyObj) throws PortalException;
213    
214            /**
215            * Returns the website with the primary key.
216            *
217            * @param websiteId the primary key of the website
218            * @return the website
219            * @throws PortalException if a website with the primary key could not be found
220            */
221            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222            public com.liferay.portal.model.Website getWebsite(long websiteId)
223                    throws PortalException;
224    
225            /**
226            * Returns the website with the matching UUID and company.
227            *
228            * @param uuid the website's UUID
229            * @param companyId the primary key of the company
230            * @return the matching website
231            * @throws PortalException if a matching website could not be found
232            */
233            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234            public com.liferay.portal.model.Website getWebsiteByUuidAndCompanyId(
235                    java.lang.String uuid, long companyId) throws PortalException;
236    
237            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238            public java.util.List<com.liferay.portal.model.Website> getWebsites();
239    
240            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
241            public java.util.List<com.liferay.portal.model.Website> getWebsites(
242                    long companyId, java.lang.String className, long classPK);
243    
244            /**
245            * Returns a range of all the websites.
246            *
247            * <p>
248            * 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.
249            * </p>
250            *
251            * @param start the lower bound of the range of websites
252            * @param end the upper bound of the range of websites (not inclusive)
253            * @return the range of websites
254            */
255            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
256            public java.util.List<com.liferay.portal.model.Website> getWebsites(
257                    int start, int end);
258    
259            /**
260            * Returns the number of websites.
261            *
262            * @return the number of websites
263            */
264            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265            public int getWebsitesCount();
266    
267            /**
268            * Sets the Spring bean ID for this bean.
269            *
270            * @param beanIdentifier the Spring bean ID for this bean
271            */
272            public void setBeanIdentifier(java.lang.String beanIdentifier);
273    
274            /**
275            * Updates the website in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
276            *
277            * @param website the website
278            * @return the website that was updated
279            */
280            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
281            public com.liferay.portal.model.Website updateWebsite(
282                    com.liferay.portal.model.Website website);
283    
284            public com.liferay.portal.model.Website updateWebsite(long websiteId,
285                    java.lang.String url, long typeId, boolean primary)
286                    throws PortalException;
287    }