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