001 /** 002 * Copyright (c) 2000-2012 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.documentlibrary.service.persistence; 016 017 import com.liferay.portal.service.persistence.BasePersistence; 018 019 import com.liferay.portlet.documentlibrary.model.DLSync; 020 021 /** 022 * The persistence interface for the d l sync service. 023 * 024 * <p> 025 * Caching information and settings can be found in <code>portal.properties</code> 026 * </p> 027 * 028 * @author Brian Wing Shun Chan 029 * @see DLSyncPersistenceImpl 030 * @see DLSyncUtil 031 * @generated 032 */ 033 public interface DLSyncPersistence extends BasePersistence<DLSync> { 034 /* 035 * NOTE FOR DEVELOPERS: 036 * 037 * Never modify or reference this interface directly. Always use {@link DLSyncUtil} to access the d l sync persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 038 */ 039 040 /** 041 * Returns the d l sync where fileId = ? or throws a {@link com.liferay.portlet.documentlibrary.NoSuchSyncException} if it could not be found. 042 * 043 * @param fileId the file ID 044 * @return the matching d l sync 045 * @throws com.liferay.portlet.documentlibrary.NoSuchSyncException if a matching d l sync could not be found 046 * @throws SystemException if a system exception occurred 047 */ 048 public com.liferay.portlet.documentlibrary.model.DLSync findByFileId( 049 long fileId) 050 throws com.liferay.portal.kernel.exception.SystemException, 051 com.liferay.portlet.documentlibrary.NoSuchSyncException; 052 053 /** 054 * Returns the d l sync where fileId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 055 * 056 * @param fileId the file ID 057 * @return the matching d l sync, or <code>null</code> if a matching d l sync could not be found 058 * @throws SystemException if a system exception occurred 059 */ 060 public com.liferay.portlet.documentlibrary.model.DLSync fetchByFileId( 061 long fileId) throws com.liferay.portal.kernel.exception.SystemException; 062 063 /** 064 * Returns the d l sync where fileId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 065 * 066 * @param fileId the file ID 067 * @param retrieveFromCache whether to use the finder cache 068 * @return the matching d l sync, or <code>null</code> if a matching d l sync could not be found 069 * @throws SystemException if a system exception occurred 070 */ 071 public com.liferay.portlet.documentlibrary.model.DLSync fetchByFileId( 072 long fileId, boolean retrieveFromCache) 073 throws com.liferay.portal.kernel.exception.SystemException; 074 075 /** 076 * Removes the d l sync where fileId = ? from the database. 077 * 078 * @param fileId the file ID 079 * @return the d l sync that was removed 080 * @throws SystemException if a system exception occurred 081 */ 082 public com.liferay.portlet.documentlibrary.model.DLSync removeByFileId( 083 long fileId) 084 throws com.liferay.portal.kernel.exception.SystemException, 085 com.liferay.portlet.documentlibrary.NoSuchSyncException; 086 087 /** 088 * Returns the number of d l syncs where fileId = ?. 089 * 090 * @param fileId the file ID 091 * @return the number of matching d l syncs 092 * @throws SystemException if a system exception occurred 093 */ 094 public int countByFileId(long fileId) 095 throws com.liferay.portal.kernel.exception.SystemException; 096 097 /** 098 * Returns all the d l syncs where companyId = ? and modifiedDate ≥ ? and repositoryId = ?. 099 * 100 * @param companyId the company ID 101 * @param modifiedDate the modified date 102 * @param repositoryId the repository ID 103 * @return the matching d l syncs 104 * @throws SystemException if a system exception occurred 105 */ 106 public java.util.List<com.liferay.portlet.documentlibrary.model.DLSync> findByC_M_R( 107 long companyId, java.util.Date modifiedDate, long repositoryId) 108 throws com.liferay.portal.kernel.exception.SystemException; 109 110 /** 111 * Returns a range of all the d l syncs where companyId = ? and modifiedDate ≥ ? and repositoryId = ?. 112 * 113 * <p> 114 * 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.documentlibrary.model.impl.DLSyncModelImpl}. 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. 115 * </p> 116 * 117 * @param companyId the company ID 118 * @param modifiedDate the modified date 119 * @param repositoryId the repository ID 120 * @param start the lower bound of the range of d l syncs 121 * @param end the upper bound of the range of d l syncs (not inclusive) 122 * @return the range of matching d l syncs 123 * @throws SystemException if a system exception occurred 124 */ 125 public java.util.List<com.liferay.portlet.documentlibrary.model.DLSync> findByC_M_R( 126 long companyId, java.util.Date modifiedDate, long repositoryId, 127 int start, int end) 128 throws com.liferay.portal.kernel.exception.SystemException; 129 130 /** 131 * Returns an ordered range of all the d l syncs where companyId = ? and modifiedDate ≥ ? and repositoryId = ?. 132 * 133 * <p> 134 * 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.documentlibrary.model.impl.DLSyncModelImpl}. 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. 135 * </p> 136 * 137 * @param companyId the company ID 138 * @param modifiedDate the modified date 139 * @param repositoryId the repository ID 140 * @param start the lower bound of the range of d l syncs 141 * @param end the upper bound of the range of d l syncs (not inclusive) 142 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 143 * @return the ordered range of matching d l syncs 144 * @throws SystemException if a system exception occurred 145 */ 146 public java.util.List<com.liferay.portlet.documentlibrary.model.DLSync> findByC_M_R( 147 long companyId, java.util.Date modifiedDate, long repositoryId, 148 int start, int end, 149 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 150 throws com.liferay.portal.kernel.exception.SystemException; 151 152 /** 153 * Returns the first d l sync in the ordered set where companyId = ? and modifiedDate ≥ ? and repositoryId = ?. 154 * 155 * @param companyId the company ID 156 * @param modifiedDate the modified date 157 * @param repositoryId the repository ID 158 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 159 * @return the first matching d l sync 160 * @throws com.liferay.portlet.documentlibrary.NoSuchSyncException if a matching d l sync could not be found 161 * @throws SystemException if a system exception occurred 162 */ 163 public com.liferay.portlet.documentlibrary.model.DLSync findByC_M_R_First( 164 long companyId, java.util.Date modifiedDate, long repositoryId, 165 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 166 throws com.liferay.portal.kernel.exception.SystemException, 167 com.liferay.portlet.documentlibrary.NoSuchSyncException; 168 169 /** 170 * Returns the first d l sync in the ordered set where companyId = ? and modifiedDate ≥ ? and repositoryId = ?. 171 * 172 * @param companyId the company ID 173 * @param modifiedDate the modified date 174 * @param repositoryId the repository ID 175 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 176 * @return the first matching d l sync, or <code>null</code> if a matching d l sync could not be found 177 * @throws SystemException if a system exception occurred 178 */ 179 public com.liferay.portlet.documentlibrary.model.DLSync fetchByC_M_R_First( 180 long companyId, java.util.Date modifiedDate, long repositoryId, 181 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 182 throws com.liferay.portal.kernel.exception.SystemException; 183 184 /** 185 * Returns the last d l sync in the ordered set where companyId = ? and modifiedDate ≥ ? and repositoryId = ?. 186 * 187 * @param companyId the company ID 188 * @param modifiedDate the modified date 189 * @param repositoryId the repository ID 190 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 191 * @return the last matching d l sync 192 * @throws com.liferay.portlet.documentlibrary.NoSuchSyncException if a matching d l sync could not be found 193 * @throws SystemException if a system exception occurred 194 */ 195 public com.liferay.portlet.documentlibrary.model.DLSync findByC_M_R_Last( 196 long companyId, java.util.Date modifiedDate, long repositoryId, 197 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 198 throws com.liferay.portal.kernel.exception.SystemException, 199 com.liferay.portlet.documentlibrary.NoSuchSyncException; 200 201 /** 202 * Returns the last d l sync in the ordered set where companyId = ? and modifiedDate ≥ ? and repositoryId = ?. 203 * 204 * @param companyId the company ID 205 * @param modifiedDate the modified date 206 * @param repositoryId the repository ID 207 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 208 * @return the last matching d l sync, or <code>null</code> if a matching d l sync could not be found 209 * @throws SystemException if a system exception occurred 210 */ 211 public com.liferay.portlet.documentlibrary.model.DLSync fetchByC_M_R_Last( 212 long companyId, java.util.Date modifiedDate, long repositoryId, 213 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 214 throws com.liferay.portal.kernel.exception.SystemException; 215 216 /** 217 * Returns the d l syncs before and after the current d l sync in the ordered set where companyId = ? and modifiedDate ≥ ? and repositoryId = ?. 218 * 219 * @param syncId the primary key of the current d l sync 220 * @param companyId the company ID 221 * @param modifiedDate the modified date 222 * @param repositoryId the repository ID 223 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 224 * @return the previous, current, and next d l sync 225 * @throws com.liferay.portlet.documentlibrary.NoSuchSyncException if a d l sync with the primary key could not be found 226 * @throws SystemException if a system exception occurred 227 */ 228 public com.liferay.portlet.documentlibrary.model.DLSync[] findByC_M_R_PrevAndNext( 229 long syncId, long companyId, java.util.Date modifiedDate, 230 long repositoryId, 231 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 232 throws com.liferay.portal.kernel.exception.SystemException, 233 com.liferay.portlet.documentlibrary.NoSuchSyncException; 234 235 /** 236 * Removes all the d l syncs where companyId = ? and modifiedDate ≥ ? and repositoryId = ? from the database. 237 * 238 * @param companyId the company ID 239 * @param modifiedDate the modified date 240 * @param repositoryId the repository ID 241 * @throws SystemException if a system exception occurred 242 */ 243 public void removeByC_M_R(long companyId, java.util.Date modifiedDate, 244 long repositoryId) 245 throws com.liferay.portal.kernel.exception.SystemException; 246 247 /** 248 * Returns the number of d l syncs where companyId = ? and modifiedDate ≥ ? and repositoryId = ?. 249 * 250 * @param companyId the company ID 251 * @param modifiedDate the modified date 252 * @param repositoryId the repository ID 253 * @return the number of matching d l syncs 254 * @throws SystemException if a system exception occurred 255 */ 256 public int countByC_M_R(long companyId, java.util.Date modifiedDate, 257 long repositoryId) 258 throws com.liferay.portal.kernel.exception.SystemException; 259 260 /** 261 * Caches the d l sync in the entity cache if it is enabled. 262 * 263 * @param dlSync the d l sync 264 */ 265 public void cacheResult( 266 com.liferay.portlet.documentlibrary.model.DLSync dlSync); 267 268 /** 269 * Caches the d l syncs in the entity cache if it is enabled. 270 * 271 * @param dlSyncs the d l syncs 272 */ 273 public void cacheResult( 274 java.util.List<com.liferay.portlet.documentlibrary.model.DLSync> dlSyncs); 275 276 /** 277 * Creates a new d l sync with the primary key. Does not add the d l sync to the database. 278 * 279 * @param syncId the primary key for the new d l sync 280 * @return the new d l sync 281 */ 282 public com.liferay.portlet.documentlibrary.model.DLSync create(long syncId); 283 284 /** 285 * Removes the d l sync with the primary key from the database. Also notifies the appropriate model listeners. 286 * 287 * @param syncId the primary key of the d l sync 288 * @return the d l sync that was removed 289 * @throws com.liferay.portlet.documentlibrary.NoSuchSyncException if a d l sync with the primary key could not be found 290 * @throws SystemException if a system exception occurred 291 */ 292 public com.liferay.portlet.documentlibrary.model.DLSync remove(long syncId) 293 throws com.liferay.portal.kernel.exception.SystemException, 294 com.liferay.portlet.documentlibrary.NoSuchSyncException; 295 296 public com.liferay.portlet.documentlibrary.model.DLSync updateImpl( 297 com.liferay.portlet.documentlibrary.model.DLSync dlSync) 298 throws com.liferay.portal.kernel.exception.SystemException; 299 300 /** 301 * Returns the d l sync with the primary key or throws a {@link com.liferay.portlet.documentlibrary.NoSuchSyncException} if it could not be found. 302 * 303 * @param syncId the primary key of the d l sync 304 * @return the d l sync 305 * @throws com.liferay.portlet.documentlibrary.NoSuchSyncException if a d l sync with the primary key could not be found 306 * @throws SystemException if a system exception occurred 307 */ 308 public com.liferay.portlet.documentlibrary.model.DLSync findByPrimaryKey( 309 long syncId) 310 throws com.liferay.portal.kernel.exception.SystemException, 311 com.liferay.portlet.documentlibrary.NoSuchSyncException; 312 313 /** 314 * Returns the d l sync with the primary key or returns <code>null</code> if it could not be found. 315 * 316 * @param syncId the primary key of the d l sync 317 * @return the d l sync, or <code>null</code> if a d l sync with the primary key could not be found 318 * @throws SystemException if a system exception occurred 319 */ 320 public com.liferay.portlet.documentlibrary.model.DLSync fetchByPrimaryKey( 321 long syncId) throws com.liferay.portal.kernel.exception.SystemException; 322 323 /** 324 * Returns all the d l syncs. 325 * 326 * @return the d l syncs 327 * @throws SystemException if a system exception occurred 328 */ 329 public java.util.List<com.liferay.portlet.documentlibrary.model.DLSync> findAll() 330 throws com.liferay.portal.kernel.exception.SystemException; 331 332 /** 333 * Returns a range of all the d l syncs. 334 * 335 * <p> 336 * 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.documentlibrary.model.impl.DLSyncModelImpl}. 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. 337 * </p> 338 * 339 * @param start the lower bound of the range of d l syncs 340 * @param end the upper bound of the range of d l syncs (not inclusive) 341 * @return the range of d l syncs 342 * @throws SystemException if a system exception occurred 343 */ 344 public java.util.List<com.liferay.portlet.documentlibrary.model.DLSync> findAll( 345 int start, int end) 346 throws com.liferay.portal.kernel.exception.SystemException; 347 348 /** 349 * Returns an ordered range of all the d l syncs. 350 * 351 * <p> 352 * 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.documentlibrary.model.impl.DLSyncModelImpl}. 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. 353 * </p> 354 * 355 * @param start the lower bound of the range of d l syncs 356 * @param end the upper bound of the range of d l syncs (not inclusive) 357 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 358 * @return the ordered range of d l syncs 359 * @throws SystemException if a system exception occurred 360 */ 361 public java.util.List<com.liferay.portlet.documentlibrary.model.DLSync> findAll( 362 int start, int end, 363 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 364 throws com.liferay.portal.kernel.exception.SystemException; 365 366 /** 367 * Removes all the d l syncs from the database. 368 * 369 * @throws SystemException if a system exception occurred 370 */ 371 public void removeAll() 372 throws com.liferay.portal.kernel.exception.SystemException; 373 374 /** 375 * Returns the number of d l syncs. 376 * 377 * @return the number of d l syncs 378 * @throws SystemException if a system exception occurred 379 */ 380 public int countAll() 381 throws com.liferay.portal.kernel.exception.SystemException; 382 }