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 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 199 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 200 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext); 201 202 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 203 public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); 204 205 /** 206 * Returns the OSGi service identifier. 207 * 208 * @return the OSGi service identifier 209 */ 210 public java.lang.String getOSGiServiceIdentifier(); 211 212 @Override 213 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 214 public com.liferay.portal.model.PersistedModel getPersistedModel( 215 java.io.Serializable primaryKeyObj) throws PortalException; 216 217 /** 218 * Returns the website with the primary key. 219 * 220 * @param websiteId the primary key of the website 221 * @return the website 222 * @throws PortalException if a website with the primary key could not be found 223 */ 224 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 225 public com.liferay.portal.model.Website getWebsite(long websiteId) 226 throws PortalException; 227 228 /** 229 * Returns the website with the matching UUID and company. 230 * 231 * @param uuid the website's UUID 232 * @param companyId the primary key of the company 233 * @return the matching website 234 * @throws PortalException if a matching website could not be found 235 */ 236 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 237 public com.liferay.portal.model.Website getWebsiteByUuidAndCompanyId( 238 java.lang.String uuid, long companyId) throws PortalException; 239 240 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 241 public java.util.List<com.liferay.portal.model.Website> getWebsites(); 242 243 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 244 public java.util.List<com.liferay.portal.model.Website> getWebsites( 245 long companyId, java.lang.String className, long classPK); 246 247 /** 248 * Returns a range of all the websites. 249 * 250 * <p> 251 * 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. 252 * </p> 253 * 254 * @param start the lower bound of the range of websites 255 * @param end the upper bound of the range of websites (not inclusive) 256 * @return the range of websites 257 */ 258 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 259 public java.util.List<com.liferay.portal.model.Website> getWebsites( 260 int start, int end); 261 262 /** 263 * Returns the number of websites. 264 * 265 * @return the number of websites 266 */ 267 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 268 public int getWebsitesCount(); 269 270 /** 271 * Updates the website in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 272 * 273 * @param website the website 274 * @return the website that was updated 275 */ 276 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 277 public com.liferay.portal.model.Website updateWebsite( 278 com.liferay.portal.model.Website website); 279 280 public com.liferay.portal.model.Website updateWebsite(long websiteId, 281 java.lang.String url, long typeId, boolean primary) 282 throws PortalException; 283 }