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.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 * <p> 154 * 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. 155 * </p> 156 * 157 * @param tableId the table ID 158 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 159 * @return the first matching expando row 160 * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found 161 * @throws SystemException if a system exception occurred 162 */ 163 public com.liferay.portlet.expando.model.ExpandoRow findByTableId_First( 164 long tableId, 165 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 166 throws com.liferay.portal.kernel.exception.SystemException, 167 com.liferay.portlet.expando.NoSuchRowException; 168 169 /** 170 * Returns the last expando row in the ordered set where tableId = ?. 171 * 172 * <p> 173 * 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. 174 * </p> 175 * 176 * @param tableId the table ID 177 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 178 * @return the last matching expando row 179 * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found 180 * @throws SystemException if a system exception occurred 181 */ 182 public com.liferay.portlet.expando.model.ExpandoRow findByTableId_Last( 183 long tableId, 184 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 185 throws com.liferay.portal.kernel.exception.SystemException, 186 com.liferay.portlet.expando.NoSuchRowException; 187 188 /** 189 * Returns the expando rows before and after the current expando row in the ordered set where tableId = ?. 190 * 191 * <p> 192 * 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. 193 * </p> 194 * 195 * @param rowId the primary key of the current expando row 196 * @param tableId the table ID 197 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 198 * @return the previous, current, and next expando row 199 * @throws com.liferay.portlet.expando.NoSuchRowException if a expando row with the primary key could not be found 200 * @throws SystemException if a system exception occurred 201 */ 202 public com.liferay.portlet.expando.model.ExpandoRow[] findByTableId_PrevAndNext( 203 long rowId, long tableId, 204 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 205 throws com.liferay.portal.kernel.exception.SystemException, 206 com.liferay.portlet.expando.NoSuchRowException; 207 208 /** 209 * Returns the expando row where tableId = ? and classPK = ? or throws a {@link com.liferay.portlet.expando.NoSuchRowException} if it could not be found. 210 * 211 * @param tableId the table ID 212 * @param classPK the class p k 213 * @return the matching expando row 214 * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found 215 * @throws SystemException if a system exception occurred 216 */ 217 public com.liferay.portlet.expando.model.ExpandoRow findByT_C( 218 long tableId, long classPK) 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 returns <code>null</code> if it could not be found. Uses the finder cache. 224 * 225 * @param tableId the table ID 226 * @param classPK the class p k 227 * @return the matching expando row, or <code>null</code> if a matching expando row could not be found 228 * @throws SystemException if a system exception occurred 229 */ 230 public com.liferay.portlet.expando.model.ExpandoRow fetchByT_C( 231 long tableId, long classPK) 232 throws com.liferay.portal.kernel.exception.SystemException; 233 234 /** 235 * Returns the expando row where tableId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 236 * 237 * @param tableId the table ID 238 * @param classPK the class p k 239 * @param retrieveFromCache whether to use the finder cache 240 * @return the matching expando row, or <code>null</code> if a matching expando row could not be found 241 * @throws SystemException if a system exception occurred 242 */ 243 public com.liferay.portlet.expando.model.ExpandoRow fetchByT_C( 244 long tableId, long classPK, boolean retrieveFromCache) 245 throws com.liferay.portal.kernel.exception.SystemException; 246 247 /** 248 * Returns all the expando rows. 249 * 250 * @return the expando rows 251 * @throws SystemException if a system exception occurred 252 */ 253 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findAll() 254 throws com.liferay.portal.kernel.exception.SystemException; 255 256 /** 257 * Returns a range of all the expando rows. 258 * 259 * <p> 260 * 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. 261 * </p> 262 * 263 * @param start the lower bound of the range of expando rows 264 * @param end the upper bound of the range of expando rows (not inclusive) 265 * @return the range of expando rows 266 * @throws SystemException if a system exception occurred 267 */ 268 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findAll( 269 int start, int end) 270 throws com.liferay.portal.kernel.exception.SystemException; 271 272 /** 273 * Returns an ordered range of all the expando rows. 274 * 275 * <p> 276 * 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. 277 * </p> 278 * 279 * @param start the lower bound of the range of expando rows 280 * @param end the upper bound of the range of expando rows (not inclusive) 281 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 282 * @return the ordered range of expando rows 283 * @throws SystemException if a system exception occurred 284 */ 285 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findAll( 286 int start, int end, 287 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 288 throws com.liferay.portal.kernel.exception.SystemException; 289 290 /** 291 * Removes all the expando rows where tableId = ? from the database. 292 * 293 * @param tableId the table ID 294 * @throws SystemException if a system exception occurred 295 */ 296 public void removeByTableId(long tableId) 297 throws com.liferay.portal.kernel.exception.SystemException; 298 299 /** 300 * Removes the expando row where tableId = ? and classPK = ? from the database. 301 * 302 * @param tableId the table ID 303 * @param classPK the class p k 304 * @throws SystemException if a system exception occurred 305 */ 306 public void removeByT_C(long tableId, long classPK) 307 throws com.liferay.portal.kernel.exception.SystemException, 308 com.liferay.portlet.expando.NoSuchRowException; 309 310 /** 311 * Removes all the expando rows from the database. 312 * 313 * @throws SystemException if a system exception occurred 314 */ 315 public void removeAll() 316 throws com.liferay.portal.kernel.exception.SystemException; 317 318 /** 319 * Returns the number of expando rows where tableId = ?. 320 * 321 * @param tableId the table ID 322 * @return the number of matching expando rows 323 * @throws SystemException if a system exception occurred 324 */ 325 public int countByTableId(long tableId) 326 throws com.liferay.portal.kernel.exception.SystemException; 327 328 /** 329 * Returns the number of expando rows where tableId = ? and classPK = ?. 330 * 331 * @param tableId the table ID 332 * @param classPK the class p k 333 * @return the number of matching expando rows 334 * @throws SystemException if a system exception occurred 335 */ 336 public int countByT_C(long tableId, long classPK) 337 throws com.liferay.portal.kernel.exception.SystemException; 338 339 /** 340 * Returns the number of expando rows. 341 * 342 * @return the number of expando rows 343 * @throws SystemException if a system exception occurred 344 */ 345 public int countAll() 346 throws com.liferay.portal.kernel.exception.SystemException; 347 }