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