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.portlet.wiki.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 WikiPageResource. This utility wraps 024 * {@link com.liferay.portlet.wiki.service.impl.WikiPageResourceLocalServiceImpl} 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 WikiPageResourceLocalService 032 * @see com.liferay.portlet.wiki.service.base.WikiPageResourceLocalServiceBaseImpl 033 * @see com.liferay.portlet.wiki.service.impl.WikiPageResourceLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class WikiPageResourceLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.wiki.service.impl.WikiPageResourceLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 public static com.liferay.portlet.wiki.model.WikiPageResource addPageResource( 044 long nodeId, java.lang.String title) { 045 return getService().addPageResource(nodeId, title); 046 } 047 048 /** 049 * Adds the wiki page resource to the database. Also notifies the appropriate model listeners. 050 * 051 * @param wikiPageResource the wiki page resource 052 * @return the wiki page resource that was added 053 */ 054 public static com.liferay.portlet.wiki.model.WikiPageResource addWikiPageResource( 055 com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource) { 056 return getService().addWikiPageResource(wikiPageResource); 057 } 058 059 /** 060 * Creates a new wiki page resource with the primary key. Does not add the wiki page resource to the database. 061 * 062 * @param resourcePrimKey the primary key for the new wiki page resource 063 * @return the new wiki page resource 064 */ 065 public static com.liferay.portlet.wiki.model.WikiPageResource createWikiPageResource( 066 long resourcePrimKey) { 067 return getService().createWikiPageResource(resourcePrimKey); 068 } 069 070 public static void deletePageResource(long nodeId, java.lang.String title) 071 throws com.liferay.portal.kernel.exception.PortalException { 072 getService().deletePageResource(nodeId, title); 073 } 074 075 /** 076 * @throws PortalException 077 */ 078 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 079 com.liferay.portal.model.PersistedModel persistedModel) 080 throws com.liferay.portal.kernel.exception.PortalException { 081 return getService().deletePersistedModel(persistedModel); 082 } 083 084 /** 085 * Deletes the wiki page resource with the primary key from the database. Also notifies the appropriate model listeners. 086 * 087 * @param resourcePrimKey the primary key of the wiki page resource 088 * @return the wiki page resource that was removed 089 * @throws PortalException if a wiki page resource with the primary key could not be found 090 */ 091 public static com.liferay.portlet.wiki.model.WikiPageResource deleteWikiPageResource( 092 long resourcePrimKey) 093 throws com.liferay.portal.kernel.exception.PortalException { 094 return getService().deleteWikiPageResource(resourcePrimKey); 095 } 096 097 /** 098 * Deletes the wiki page resource from the database. Also notifies the appropriate model listeners. 099 * 100 * @param wikiPageResource the wiki page resource 101 * @return the wiki page resource that was removed 102 */ 103 public static com.liferay.portlet.wiki.model.WikiPageResource deleteWikiPageResource( 104 com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource) { 105 return getService().deleteWikiPageResource(wikiPageResource); 106 } 107 108 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 109 return getService().dynamicQuery(); 110 } 111 112 /** 113 * Performs a dynamic query on the database and returns the matching rows. 114 * 115 * @param dynamicQuery the dynamic query 116 * @return the matching rows 117 */ 118 public static <T> java.util.List<T> dynamicQuery( 119 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 120 return getService().dynamicQuery(dynamicQuery); 121 } 122 123 /** 124 * Performs a dynamic query on the database and returns a range of the matching rows. 125 * 126 * <p> 127 * 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.portlet.wiki.model.impl.WikiPageResourceModelImpl}. 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. 128 * </p> 129 * 130 * @param dynamicQuery the dynamic query 131 * @param start the lower bound of the range of model instances 132 * @param end the upper bound of the range of model instances (not inclusive) 133 * @return the range of matching rows 134 */ 135 public static <T> java.util.List<T> dynamicQuery( 136 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 137 int end) { 138 return getService().dynamicQuery(dynamicQuery, start, end); 139 } 140 141 /** 142 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 143 * 144 * <p> 145 * 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.portlet.wiki.model.impl.WikiPageResourceModelImpl}. 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. 146 * </p> 147 * 148 * @param dynamicQuery the dynamic query 149 * @param start the lower bound of the range of model instances 150 * @param end the upper bound of the range of model instances (not inclusive) 151 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 152 * @return the ordered range of matching rows 153 */ 154 public static <T> java.util.List<T> dynamicQuery( 155 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 156 int end, 157 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 158 return getService() 159 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 160 } 161 162 /** 163 * Returns the number of rows matching the dynamic query. 164 * 165 * @param dynamicQuery the dynamic query 166 * @return the number of rows matching the dynamic query 167 */ 168 public static long dynamicQueryCount( 169 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 170 return getService().dynamicQueryCount(dynamicQuery); 171 } 172 173 /** 174 * Returns the number of rows matching the dynamic query. 175 * 176 * @param dynamicQuery the dynamic query 177 * @param projection the projection to apply to the query 178 * @return the number of rows matching the dynamic query 179 */ 180 public static long dynamicQueryCount( 181 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 182 com.liferay.portal.kernel.dao.orm.Projection projection) { 183 return getService().dynamicQueryCount(dynamicQuery, projection); 184 } 185 186 public static com.liferay.portlet.wiki.model.WikiPageResource fetchPageResource( 187 long nodeId, java.lang.String title) { 188 return getService().fetchPageResource(nodeId, title); 189 } 190 191 public static com.liferay.portlet.wiki.model.WikiPageResource fetchPageResource( 192 java.lang.String uuid) { 193 return getService().fetchPageResource(uuid); 194 } 195 196 public static com.liferay.portlet.wiki.model.WikiPageResource fetchWikiPageResource( 197 long resourcePrimKey) { 198 return getService().fetchWikiPageResource(resourcePrimKey); 199 } 200 201 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 202 return getService().getActionableDynamicQuery(); 203 } 204 205 /** 206 * Returns the Spring bean ID for this bean. 207 * 208 * @return the Spring bean ID for this bean 209 */ 210 public static java.lang.String getBeanIdentifier() { 211 return getService().getBeanIdentifier(); 212 } 213 214 public static com.liferay.portlet.wiki.model.WikiPageResource getPageResource( 215 long nodeId, java.lang.String title) 216 throws com.liferay.portal.kernel.exception.PortalException { 217 return getService().getPageResource(nodeId, title); 218 } 219 220 public static com.liferay.portlet.wiki.model.WikiPageResource getPageResource( 221 long pageResourcePrimKey) 222 throws com.liferay.portal.kernel.exception.PortalException { 223 return getService().getPageResource(pageResourcePrimKey); 224 } 225 226 public static long getPageResourcePrimKey(long nodeId, 227 java.lang.String title) { 228 return getService().getPageResourcePrimKey(nodeId, title); 229 } 230 231 public static com.liferay.portal.model.PersistedModel getPersistedModel( 232 java.io.Serializable primaryKeyObj) 233 throws com.liferay.portal.kernel.exception.PortalException { 234 return getService().getPersistedModel(primaryKeyObj); 235 } 236 237 /** 238 * Returns the wiki page resource with the primary key. 239 * 240 * @param resourcePrimKey the primary key of the wiki page resource 241 * @return the wiki page resource 242 * @throws PortalException if a wiki page resource with the primary key could not be found 243 */ 244 public static com.liferay.portlet.wiki.model.WikiPageResource getWikiPageResource( 245 long resourcePrimKey) 246 throws com.liferay.portal.kernel.exception.PortalException { 247 return getService().getWikiPageResource(resourcePrimKey); 248 } 249 250 /** 251 * Returns a range of all the wiki page resources. 252 * 253 * <p> 254 * 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.portlet.wiki.model.impl.WikiPageResourceModelImpl}. 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. 255 * </p> 256 * 257 * @param start the lower bound of the range of wiki page resources 258 * @param end the upper bound of the range of wiki page resources (not inclusive) 259 * @return the range of wiki page resources 260 */ 261 public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> getWikiPageResources( 262 int start, int end) { 263 return getService().getWikiPageResources(start, end); 264 } 265 266 /** 267 * Returns the number of wiki page resources. 268 * 269 * @return the number of wiki page resources 270 */ 271 public static int getWikiPageResourcesCount() { 272 return getService().getWikiPageResourcesCount(); 273 } 274 275 /** 276 * Sets the Spring bean ID for this bean. 277 * 278 * @param beanIdentifier the Spring bean ID for this bean 279 */ 280 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 281 getService().setBeanIdentifier(beanIdentifier); 282 } 283 284 /** 285 * Updates the wiki page resource in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 286 * 287 * @param wikiPageResource the wiki page resource 288 * @return the wiki page resource that was updated 289 */ 290 public static com.liferay.portlet.wiki.model.WikiPageResource updateWikiPageResource( 291 com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource) { 292 return getService().updateWikiPageResource(wikiPageResource); 293 } 294 295 public static WikiPageResourceLocalService getService() { 296 if (_service == null) { 297 _service = (WikiPageResourceLocalService)PortalBeanLocatorUtil.locate(WikiPageResourceLocalService.class.getName()); 298 299 ReferenceRegistry.registerReference(WikiPageResourceLocalServiceUtil.class, 300 "_service"); 301 } 302 303 return _service; 304 } 305 306 /** 307 * @deprecated As of 6.2.0 308 */ 309 @Deprecated 310 public void setService(WikiPageResourceLocalService service) { 311 } 312 313 private static WikiPageResourceLocalService _service; 314 }