001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 013 */ 014 015 package com.liferay.portlet.expando.service.persistence; 016 017 import com.liferay.portal.kernel.exception.SystemException; 018 import com.liferay.portal.service.persistence.BasePersistence; 019 020 import com.liferay.portlet.expando.model.ExpandoRow; 021 022 /** 023 * The persistence interface for the expando row service. 024 * 025 * <p> 026 * Caching information and settings can be found in <code>portal.properties</code> 027 * </p> 028 * 029 * @author Brian Wing Shun Chan 030 * @see ExpandoRowPersistenceImpl 031 * @see ExpandoRowUtil 032 * @generated 033 */ 034 public interface ExpandoRowPersistence extends BasePersistence<ExpandoRow> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * 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. 039 */ 040 041 /** 042 * Caches the expando row in the entity cache if it is enabled. 043 * 044 * @param expandoRow the expando row to cache 045 */ 046 public void cacheResult( 047 com.liferay.portlet.expando.model.ExpandoRow expandoRow); 048 049 /** 050 * Caches the expando rows in the entity cache if it is enabled. 051 * 052 * @param expandoRows the expando rows to cache 053 */ 054 public void cacheResult( 055 java.util.List<com.liferay.portlet.expando.model.ExpandoRow> expandoRows); 056 057 /** 058 * Creates a new expando row with the primary key. Does not add the expando row to the database. 059 * 060 * @param rowId the primary key for the new expando row 061 * @return the new expando row 062 */ 063 public com.liferay.portlet.expando.model.ExpandoRow create(long rowId); 064 065 /** 066 * Removes the expando row with the primary key from the database. Also notifies the appropriate model listeners. 067 * 068 * @param rowId the primary key of the expando row to remove 069 * @return the expando row that was removed 070 * @throws com.liferay.portlet.expando.NoSuchRowException if a expando row with the primary key could not be found 071 * @throws SystemException if a system exception occurred 072 */ 073 public com.liferay.portlet.expando.model.ExpandoRow remove(long rowId) 074 throws com.liferay.portal.kernel.exception.SystemException, 075 com.liferay.portlet.expando.NoSuchRowException; 076 077 public com.liferay.portlet.expando.model.ExpandoRow updateImpl( 078 com.liferay.portlet.expando.model.ExpandoRow expandoRow, boolean merge) 079 throws com.liferay.portal.kernel.exception.SystemException; 080 081 /** 082 * Finds the expando row with the primary key or throws a {@link com.liferay.portlet.expando.NoSuchRowException} if it could not be found. 083 * 084 * @param rowId the primary key of the expando row to find 085 * @return the expando row 086 * @throws com.liferay.portlet.expando.NoSuchRowException if a expando row with the primary key could not be found 087 * @throws SystemException if a system exception occurred 088 */ 089 public com.liferay.portlet.expando.model.ExpandoRow findByPrimaryKey( 090 long rowId) 091 throws com.liferay.portal.kernel.exception.SystemException, 092 com.liferay.portlet.expando.NoSuchRowException; 093 094 /** 095 * Finds the expando row with the primary key or returns <code>null</code> if it could not be found. 096 * 097 * @param rowId the primary key of the expando row to find 098 * @return the expando row, or <code>null</code> if a expando row with the primary key could not be found 099 * @throws SystemException if a system exception occurred 100 */ 101 public com.liferay.portlet.expando.model.ExpandoRow fetchByPrimaryKey( 102 long rowId) throws com.liferay.portal.kernel.exception.SystemException; 103 104 /** 105 * Finds all the expando rows where tableId = ?. 106 * 107 * @param tableId the table ID to search with 108 * @return the matching expando rows 109 * @throws SystemException if a system exception occurred 110 */ 111 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByTableId( 112 long tableId) 113 throws com.liferay.portal.kernel.exception.SystemException; 114 115 /** 116 * Finds a range of all the expando rows where tableId = ?. 117 * 118 * <p> 119 * 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. 120 * </p> 121 * 122 * @param tableId the table ID to search with 123 * @param start the lower bound of the range of expando rows to return 124 * @param end the upper bound of the range of expando rows to return (not inclusive) 125 * @return the range of matching expando rows 126 * @throws SystemException if a system exception occurred 127 */ 128 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByTableId( 129 long tableId, int start, int end) 130 throws com.liferay.portal.kernel.exception.SystemException; 131 132 /** 133 * Finds an ordered range of all the expando rows where tableId = ?. 134 * 135 * <p> 136 * 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. 137 * </p> 138 * 139 * @param tableId the table ID to search with 140 * @param start the lower bound of the range of expando rows to return 141 * @param end the upper bound of the range of expando rows to return (not inclusive) 142 * @param orderByComparator the comparator to order the results by 143 * @return the ordered range of matching expando rows 144 * @throws SystemException if a system exception occurred 145 */ 146 public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByTableId( 147 long tableId, int start, int end, 148 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 149 throws com.liferay.portal.kernel.exception.SystemException; 150 151 /** 152 * Finds the first expando row in the ordered set where tableId = ?. 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 tableId the table ID to search with 159 * @param orderByComparator the comparator to order the set by 160 * @return the first matching expando row 161 * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found 162 * @throws SystemException if a system exception occurred 163 */ 164 public com.liferay.portlet.expando.model.ExpandoRow findByTableId_First( 165 long tableId, 166 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 167 throws com.liferay.portal.kernel.exception.SystemException, 168 com.liferay.portlet.expando.NoSuchRowException; 169 170 /** 171 * Finds the last expando row in the ordered set where tableId = ?. 172 * 173 * <p> 174 * 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. 175 * </p> 176 * 177 * @param tableId the table ID to search with 178 * @param orderByComparator the comparator to order the set by 179 * @return the last matching expando row 180 * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found 181 * @throws SystemException if a system exception occurred 182 */ 183 public com.liferay.portlet.expando.model.ExpandoRow findByTableId_Last( 184 long tableId, 185 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 186 throws com.liferay.portal.kernel.exception.SystemException, 187 com.liferay.portlet.expando.NoSuchRowException; 188 189 /** 190 * Finds the expando rows before and after the current expando row in the ordered set where tableId = ?. 191 * 192 * <p> 193 * 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. 194 * </p> 195 * 196 * @param rowId the primary key of the current expando row 197 * @param tableId the table ID to search with 198 * @param orderByComparator the comparator to order the set by 199 * @return the previous, current, and next expando row 200 * @throws com.liferay.portlet.expando.NoSuchRowException if a expando row with the primary key could not be found 201 * @throws SystemException if a system exception occurred 202 */ 203 public com.liferay.portlet.expando.model.ExpandoRow[] findByTableId_PrevAndNext( 204 long rowId, long tableId, 205 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 206 throws com.liferay.portal.kernel.exception.SystemException, 207 com.liferay.portlet.expando.NoSuchRowException; 208 209 /** 210 * Finds the expando row where tableId = ? and classPK = ? or throws a {@link com.liferay.portlet.expando.NoSuchRowException} if it could not be found. 211 * 212 * @param tableId the table ID to search with 213 * @param classPK the class p k to search with 214 * @return the matching expando row 215 * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found 216 * @throws SystemException if a system exception occurred 217 */ 218 public com.liferay.portlet.expando.model.ExpandoRow findByT_C( 219 long tableId, long classPK) 220 throws com.liferay.portal.kernel.exception.SystemException, 221 com.liferay.portlet.expando.NoSuchRowException; 222 223 /** 224 * Finds the expando row where tableId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 225 * 226 * @param tableId the table ID to search with 227 * @param classPK the class p k to search with 228 * @return the matching expando row, or <code>null</code> 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 fetchByT_C( 232 long tableId, long classPK) 233 throws com.liferay.portal.kernel.exception.SystemException; 234 235 /** 236 * Finds the expando row where tableId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 237 * 238 * @param tableId the table ID to search with 239 * @param classPK the class p k to search with 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 * Finds 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 * Finds 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 to return 264 * @param end the upper bound of the range of expando rows to return (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 * Finds 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 to return 280 * @param end the upper bound of the range of expando rows to return (not inclusive) 281 * @param orderByComparator the comparator to order the results by 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 to search with 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 to search with 303 * @param classPK the class p k to search with 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 * Counts all the expando rows where tableId = ?. 320 * 321 * @param tableId the table ID to search with 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 * Counts all the expando rows where tableId = ? and classPK = ?. 330 * 331 * @param tableId the table ID to search with 332 * @param classPK the class p k to search with 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 * Counts all the 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 348 public ExpandoRow remove(ExpandoRow expandoRow) throws SystemException; 349 }