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