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