001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 013 */ 014 015 package com.liferay.portlet.wiki.service.persistence; 016 017 import com.liferay.portal.kernel.exception.SystemException; 018 import com.liferay.portal.service.persistence.BasePersistence; 019 020 import com.liferay.portlet.wiki.model.WikiPageResource; 021 022 /** 023 * The persistence interface for the wiki page resource service. 024 * 025 * <p> 026 * Caching information and settings can be found in <code>portal.properties</code> 027 * </p> 028 * 029 * @author Brian Wing Shun Chan 030 * @see WikiPageResourcePersistenceImpl 031 * @see WikiPageResourceUtil 032 * @generated 033 */ 034 public interface WikiPageResourcePersistence extends BasePersistence<WikiPageResource> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify or reference this interface directly. Always use {@link WikiPageResourceUtil} to access the wiki page resource persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 039 */ 040 041 /** 042 * Caches the wiki page resource in the entity cache if it is enabled. 043 * 044 * @param wikiPageResource the wiki page resource to cache 045 */ 046 public void cacheResult( 047 com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource); 048 049 /** 050 * Caches the wiki page resources in the entity cache if it is enabled. 051 * 052 * @param wikiPageResources the wiki page resources to cache 053 */ 054 public void cacheResult( 055 java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> wikiPageResources); 056 057 /** 058 * Creates a new wiki page resource with the primary key. Does not add the wiki page resource to the database. 059 * 060 * @param resourcePrimKey the primary key for the new wiki page resource 061 * @return the new wiki page resource 062 */ 063 public com.liferay.portlet.wiki.model.WikiPageResource create( 064 long resourcePrimKey); 065 066 /** 067 * Removes the wiki page resource with the primary key from the database. Also notifies the appropriate model listeners. 068 * 069 * @param resourcePrimKey the primary key of the wiki page resource to remove 070 * @return the wiki page resource that was removed 071 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a wiki page resource with the primary key could not be found 072 * @throws SystemException if a system exception occurred 073 */ 074 public com.liferay.portlet.wiki.model.WikiPageResource remove( 075 long resourcePrimKey) 076 throws com.liferay.portal.kernel.exception.SystemException, 077 com.liferay.portlet.wiki.NoSuchPageResourceException; 078 079 public com.liferay.portlet.wiki.model.WikiPageResource updateImpl( 080 com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource, 081 boolean merge) 082 throws com.liferay.portal.kernel.exception.SystemException; 083 084 /** 085 * Finds the wiki page resource with the primary key or throws a {@link com.liferay.portlet.wiki.NoSuchPageResourceException} if it could not be found. 086 * 087 * @param resourcePrimKey the primary key of the wiki page resource to find 088 * @return the wiki page resource 089 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a wiki page resource with the primary key could not be found 090 * @throws SystemException if a system exception occurred 091 */ 092 public com.liferay.portlet.wiki.model.WikiPageResource findByPrimaryKey( 093 long resourcePrimKey) 094 throws com.liferay.portal.kernel.exception.SystemException, 095 com.liferay.portlet.wiki.NoSuchPageResourceException; 096 097 /** 098 * Finds the wiki page resource with the primary key or returns <code>null</code> if it could not be found. 099 * 100 * @param resourcePrimKey the primary key of the wiki page resource to find 101 * @return the wiki page resource, or <code>null</code> if a wiki page resource with the primary key could not be found 102 * @throws SystemException if a system exception occurred 103 */ 104 public com.liferay.portlet.wiki.model.WikiPageResource fetchByPrimaryKey( 105 long resourcePrimKey) 106 throws com.liferay.portal.kernel.exception.SystemException; 107 108 /** 109 * Finds all the wiki page resources where uuid = ?. 110 * 111 * @param uuid the uuid to search with 112 * @return the matching wiki page resources 113 * @throws SystemException if a system exception occurred 114 */ 115 public java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findByUuid( 116 java.lang.String uuid) 117 throws com.liferay.portal.kernel.exception.SystemException; 118 119 /** 120 * Finds a range of all the wiki page resources where uuid = ?. 121 * 122 * <p> 123 * 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. 124 * </p> 125 * 126 * @param uuid the uuid to search with 127 * @param start the lower bound of the range of wiki page resources to return 128 * @param end the upper bound of the range of wiki page resources to return (not inclusive) 129 * @return the range of matching wiki page resources 130 * @throws SystemException if a system exception occurred 131 */ 132 public java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findByUuid( 133 java.lang.String uuid, int start, int end) 134 throws com.liferay.portal.kernel.exception.SystemException; 135 136 /** 137 * Finds an ordered range of all the wiki page resources where uuid = ?. 138 * 139 * <p> 140 * 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. 141 * </p> 142 * 143 * @param uuid the uuid to search with 144 * @param start the lower bound of the range of wiki page resources to return 145 * @param end the upper bound of the range of wiki page resources to return (not inclusive) 146 * @param orderByComparator the comparator to order the results by 147 * @return the ordered range of matching wiki page resources 148 * @throws SystemException if a system exception occurred 149 */ 150 public java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findByUuid( 151 java.lang.String uuid, int start, int end, 152 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 153 throws com.liferay.portal.kernel.exception.SystemException; 154 155 /** 156 * Finds the first wiki page resource in the ordered set where uuid = ?. 157 * 158 * <p> 159 * 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. 160 * </p> 161 * 162 * @param uuid the uuid to search with 163 * @param orderByComparator the comparator to order the set by 164 * @return the first matching wiki page resource 165 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a matching wiki page resource could not be found 166 * @throws SystemException if a system exception occurred 167 */ 168 public com.liferay.portlet.wiki.model.WikiPageResource findByUuid_First( 169 java.lang.String uuid, 170 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 171 throws com.liferay.portal.kernel.exception.SystemException, 172 com.liferay.portlet.wiki.NoSuchPageResourceException; 173 174 /** 175 * Finds the last wiki page resource in the ordered set where uuid = ?. 176 * 177 * <p> 178 * 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. 179 * </p> 180 * 181 * @param uuid the uuid to search with 182 * @param orderByComparator the comparator to order the set by 183 * @return the last matching wiki page resource 184 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a matching wiki page resource could not be found 185 * @throws SystemException if a system exception occurred 186 */ 187 public com.liferay.portlet.wiki.model.WikiPageResource findByUuid_Last( 188 java.lang.String uuid, 189 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 190 throws com.liferay.portal.kernel.exception.SystemException, 191 com.liferay.portlet.wiki.NoSuchPageResourceException; 192 193 /** 194 * Finds the wiki page resources before and after the current wiki page resource in the ordered set where uuid = ?. 195 * 196 * <p> 197 * 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. 198 * </p> 199 * 200 * @param resourcePrimKey the primary key of the current wiki page resource 201 * @param uuid the uuid to search with 202 * @param orderByComparator the comparator to order the set by 203 * @return the previous, current, and next wiki page resource 204 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a wiki page resource with the primary key could not be found 205 * @throws SystemException if a system exception occurred 206 */ 207 public com.liferay.portlet.wiki.model.WikiPageResource[] findByUuid_PrevAndNext( 208 long resourcePrimKey, java.lang.String uuid, 209 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 210 throws com.liferay.portal.kernel.exception.SystemException, 211 com.liferay.portlet.wiki.NoSuchPageResourceException; 212 213 /** 214 * Finds the wiki page resource where nodeId = ? and title = ? or throws a {@link com.liferay.portlet.wiki.NoSuchPageResourceException} if it could not be found. 215 * 216 * @param nodeId the node ID to search with 217 * @param title the title to search with 218 * @return the matching wiki page resource 219 * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a matching wiki page resource could not be found 220 * @throws SystemException if a system exception occurred 221 */ 222 public com.liferay.portlet.wiki.model.WikiPageResource findByN_T( 223 long nodeId, java.lang.String title) 224 throws com.liferay.portal.kernel.exception.SystemException, 225 com.liferay.portlet.wiki.NoSuchPageResourceException; 226 227 /** 228 * Finds the wiki page resource where nodeId = ? and title = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 229 * 230 * @param nodeId the node ID to search with 231 * @param title the title to search with 232 * @return the matching wiki page resource, or <code>null</code> if a matching wiki page resource could not be found 233 * @throws SystemException if a system exception occurred 234 */ 235 public com.liferay.portlet.wiki.model.WikiPageResource fetchByN_T( 236 long nodeId, java.lang.String title) 237 throws com.liferay.portal.kernel.exception.SystemException; 238 239 /** 240 * Finds the wiki page resource where nodeId = ? and title = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 241 * 242 * @param nodeId the node ID to search with 243 * @param title the title to search with 244 * @return the matching wiki page resource, or <code>null</code> if a matching wiki page resource could not be found 245 * @throws SystemException if a system exception occurred 246 */ 247 public com.liferay.portlet.wiki.model.WikiPageResource fetchByN_T( 248 long nodeId, java.lang.String title, boolean retrieveFromCache) 249 throws com.liferay.portal.kernel.exception.SystemException; 250 251 /** 252 * Finds all the wiki page resources. 253 * 254 * @return the wiki page resources 255 * @throws SystemException if a system exception occurred 256 */ 257 public java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll() 258 throws com.liferay.portal.kernel.exception.SystemException; 259 260 /** 261 * Finds a range of all the wiki page resources. 262 * 263 * <p> 264 * 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. 265 * </p> 266 * 267 * @param start the lower bound of the range of wiki page resources to return 268 * @param end the upper bound of the range of wiki page resources to return (not inclusive) 269 * @return the range of wiki page resources 270 * @throws SystemException if a system exception occurred 271 */ 272 public java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll( 273 int start, int end) 274 throws com.liferay.portal.kernel.exception.SystemException; 275 276 /** 277 * Finds an ordered range of all the wiki page resources. 278 * 279 * <p> 280 * 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. 281 * </p> 282 * 283 * @param start the lower bound of the range of wiki page resources to return 284 * @param end the upper bound of the range of wiki page resources to return (not inclusive) 285 * @param orderByComparator the comparator to order the results by 286 * @return the ordered range of wiki page resources 287 * @throws SystemException if a system exception occurred 288 */ 289 public java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll( 290 int start, int end, 291 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 292 throws com.liferay.portal.kernel.exception.SystemException; 293 294 /** 295 * Removes all the wiki page resources where uuid = ? from the database. 296 * 297 * @param uuid the uuid to search with 298 * @throws SystemException if a system exception occurred 299 */ 300 public void removeByUuid(java.lang.String uuid) 301 throws com.liferay.portal.kernel.exception.SystemException; 302 303 /** 304 * Removes the wiki page resource where nodeId = ? and title = ? from the database. 305 * 306 * @param nodeId the node ID to search with 307 * @param title the title to search with 308 * @throws SystemException if a system exception occurred 309 */ 310 public void removeByN_T(long nodeId, java.lang.String title) 311 throws com.liferay.portal.kernel.exception.SystemException, 312 com.liferay.portlet.wiki.NoSuchPageResourceException; 313 314 /** 315 * Removes all the wiki page resources from the database. 316 * 317 * @throws SystemException if a system exception occurred 318 */ 319 public void removeAll() 320 throws com.liferay.portal.kernel.exception.SystemException; 321 322 /** 323 * Counts all the wiki page resources where uuid = ?. 324 * 325 * @param uuid the uuid to search with 326 * @return the number of matching wiki page resources 327 * @throws SystemException if a system exception occurred 328 */ 329 public int countByUuid(java.lang.String uuid) 330 throws com.liferay.portal.kernel.exception.SystemException; 331 332 /** 333 * Counts all the wiki page resources where nodeId = ? and title = ?. 334 * 335 * @param nodeId the node ID to search with 336 * @param title the title to search with 337 * @return the number of matching wiki page resources 338 * @throws SystemException if a system exception occurred 339 */ 340 public int countByN_T(long nodeId, java.lang.String title) 341 throws com.liferay.portal.kernel.exception.SystemException; 342 343 /** 344 * Counts all the wiki page resources. 345 * 346 * @return the number of wiki page resources 347 * @throws SystemException if a system exception occurred 348 */ 349 public int countAll() 350 throws com.liferay.portal.kernel.exception.SystemException; 351 352 public WikiPageResource remove(WikiPageResource wikiPageResource) 353 throws SystemException; 354 }