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.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.service.ServiceContext; 023 024 import com.liferay.portlet.expando.model.ExpandoRow; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the expando row service. This utility wraps {@link ExpandoRowPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 030 * 031 * <p> 032 * Caching information and settings can be found in <code>portal.properties</code> 033 * </p> 034 * 035 * @author Brian Wing Shun Chan 036 * @see ExpandoRowPersistence 037 * @see ExpandoRowPersistenceImpl 038 * @generated 039 */ 040 public class ExpandoRowUtil { 041 /* 042 * NOTE FOR DEVELOPERS: 043 * 044 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 045 */ 046 047 /** 048 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 049 */ 050 public static void clearCache() { 051 getPersistence().clearCache(); 052 } 053 054 /** 055 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 056 */ 057 public static void clearCache(ExpandoRow expandoRow) { 058 getPersistence().clearCache(expandoRow); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 063 */ 064 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<ExpandoRow> findWithDynamicQuery( 073 DynamicQuery dynamicQuery) throws SystemException { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<ExpandoRow> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) 082 throws SystemException { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<ExpandoRow> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator orderByComparator) throws SystemException { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 099 */ 100 public static ExpandoRow update(ExpandoRow expandoRow) 101 throws SystemException { 102 return getPersistence().update(expandoRow); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 107 */ 108 public static ExpandoRow update(ExpandoRow expandoRow, 109 ServiceContext serviceContext) throws SystemException { 110 return getPersistence().update(expandoRow, serviceContext); 111 } 112 113 /** 114 * Returns all the expando rows where tableId = ?. 115 * 116 * @param tableId the table ID 117 * @return the matching expando rows 118 * @throws SystemException if a system exception occurred 119 */ 120 public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByTableId( 121 long tableId) 122 throws com.liferay.portal.kernel.exception.SystemException { 123 return getPersistence().findByTableId(tableId); 124 } 125 126 /** 127 * Returns a range of all the expando rows where tableId = ?. 128 * 129 * <p> 130 * 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. 131 * </p> 132 * 133 * @param tableId the table ID 134 * @param start the lower bound of the range of expando rows 135 * @param end the upper bound of the range of expando rows (not inclusive) 136 * @return the range of matching expando rows 137 * @throws SystemException if a system exception occurred 138 */ 139 public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByTableId( 140 long tableId, int start, int end) 141 throws com.liferay.portal.kernel.exception.SystemException { 142 return getPersistence().findByTableId(tableId, start, end); 143 } 144 145 /** 146 * Returns an ordered range of all the expando rows where tableId = ?. 147 * 148 * <p> 149 * 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. 150 * </p> 151 * 152 * @param tableId the table ID 153 * @param start the lower bound of the range of expando rows 154 * @param end the upper bound of the range of expando rows (not inclusive) 155 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 156 * @return the ordered range of matching expando rows 157 * @throws SystemException if a system exception occurred 158 */ 159 public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByTableId( 160 long tableId, int start, int end, 161 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 162 throws com.liferay.portal.kernel.exception.SystemException { 163 return getPersistence() 164 .findByTableId(tableId, start, end, orderByComparator); 165 } 166 167 /** 168 * Returns the first expando row in the ordered set where tableId = ?. 169 * 170 * @param tableId the table ID 171 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 172 * @return the first 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 static com.liferay.portlet.expando.model.ExpandoRow findByTableId_First( 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 return getPersistence().findByTableId_First(tableId, orderByComparator); 182 } 183 184 /** 185 * Returns the first expando row in the ordered set where tableId = ?. 186 * 187 * @param tableId the table ID 188 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 189 * @return the first matching expando row, or <code>null</code> if a matching expando row could not be found 190 * @throws SystemException if a system exception occurred 191 */ 192 public static com.liferay.portlet.expando.model.ExpandoRow fetchByTableId_First( 193 long tableId, 194 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 195 throws com.liferay.portal.kernel.exception.SystemException { 196 return getPersistence().fetchByTableId_First(tableId, orderByComparator); 197 } 198 199 /** 200 * Returns the last expando row in the ordered set where tableId = ?. 201 * 202 * @param tableId the table ID 203 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 204 * @return the last matching expando row 205 * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found 206 * @throws SystemException if a system exception occurred 207 */ 208 public static com.liferay.portlet.expando.model.ExpandoRow findByTableId_Last( 209 long tableId, 210 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 211 throws com.liferay.portal.kernel.exception.SystemException, 212 com.liferay.portlet.expando.NoSuchRowException { 213 return getPersistence().findByTableId_Last(tableId, orderByComparator); 214 } 215 216 /** 217 * Returns the last expando row in the ordered set where tableId = ?. 218 * 219 * @param tableId the table ID 220 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 221 * @return the last 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 static com.liferay.portlet.expando.model.ExpandoRow fetchByTableId_Last( 225 long tableId, 226 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 227 throws com.liferay.portal.kernel.exception.SystemException { 228 return getPersistence().fetchByTableId_Last(tableId, orderByComparator); 229 } 230 231 /** 232 * Returns the expando rows before and after the current expando row in the ordered set where tableId = ?. 233 * 234 * @param rowId the primary key of the current expando row 235 * @param tableId the table ID 236 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 237 * @return the previous, current, and next expando row 238 * @throws com.liferay.portlet.expando.NoSuchRowException if a expando row with the primary key could not be found 239 * @throws SystemException if a system exception occurred 240 */ 241 public static com.liferay.portlet.expando.model.ExpandoRow[] findByTableId_PrevAndNext( 242 long rowId, long tableId, 243 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 244 throws com.liferay.portal.kernel.exception.SystemException, 245 com.liferay.portlet.expando.NoSuchRowException { 246 return getPersistence() 247 .findByTableId_PrevAndNext(rowId, tableId, orderByComparator); 248 } 249 250 /** 251 * Removes all the expando rows where tableId = ? from the database. 252 * 253 * @param tableId the table ID 254 * @throws SystemException if a system exception occurred 255 */ 256 public static void removeByTableId(long tableId) 257 throws com.liferay.portal.kernel.exception.SystemException { 258 getPersistence().removeByTableId(tableId); 259 } 260 261 /** 262 * Returns the number of expando rows where tableId = ?. 263 * 264 * @param tableId the table ID 265 * @return the number of matching expando rows 266 * @throws SystemException if a system exception occurred 267 */ 268 public static int countByTableId(long tableId) 269 throws com.liferay.portal.kernel.exception.SystemException { 270 return getPersistence().countByTableId(tableId); 271 } 272 273 /** 274 * Returns all the expando rows where classPK = ?. 275 * 276 * @param classPK the class p k 277 * @return the matching expando rows 278 * @throws SystemException if a system exception occurred 279 */ 280 public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByClassPK( 281 long classPK) 282 throws com.liferay.portal.kernel.exception.SystemException { 283 return getPersistence().findByClassPK(classPK); 284 } 285 286 /** 287 * Returns a range of all the expando rows where classPK = ?. 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. 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. 291 * </p> 292 * 293 * @param classPK the class p k 294 * @param start the lower bound of the range of expando rows 295 * @param end the upper bound of the range of expando rows (not inclusive) 296 * @return the range of matching expando rows 297 * @throws SystemException if a system exception occurred 298 */ 299 public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByClassPK( 300 long classPK, int start, int end) 301 throws com.liferay.portal.kernel.exception.SystemException { 302 return getPersistence().findByClassPK(classPK, start, end); 303 } 304 305 /** 306 * Returns an ordered range of all the expando rows where classPK = ?. 307 * 308 * <p> 309 * 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. 310 * </p> 311 * 312 * @param classPK the class p k 313 * @param start the lower bound of the range of expando rows 314 * @param end the upper bound of the range of expando rows (not inclusive) 315 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 316 * @return the ordered range of matching expando rows 317 * @throws SystemException if a system exception occurred 318 */ 319 public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByClassPK( 320 long classPK, int start, int end, 321 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 322 throws com.liferay.portal.kernel.exception.SystemException { 323 return getPersistence() 324 .findByClassPK(classPK, start, end, orderByComparator); 325 } 326 327 /** 328 * Returns the first expando row in the ordered set where classPK = ?. 329 * 330 * @param classPK the class p k 331 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 332 * @return the first matching expando row 333 * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found 334 * @throws SystemException if a system exception occurred 335 */ 336 public static com.liferay.portlet.expando.model.ExpandoRow findByClassPK_First( 337 long classPK, 338 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 339 throws com.liferay.portal.kernel.exception.SystemException, 340 com.liferay.portlet.expando.NoSuchRowException { 341 return getPersistence().findByClassPK_First(classPK, orderByComparator); 342 } 343 344 /** 345 * Returns the first expando row in the ordered set where classPK = ?. 346 * 347 * @param classPK the class p k 348 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 349 * @return the first matching expando row, or <code>null</code> if a matching expando row could not be found 350 * @throws SystemException if a system exception occurred 351 */ 352 public static com.liferay.portlet.expando.model.ExpandoRow fetchByClassPK_First( 353 long classPK, 354 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 355 throws com.liferay.portal.kernel.exception.SystemException { 356 return getPersistence().fetchByClassPK_First(classPK, orderByComparator); 357 } 358 359 /** 360 * Returns the last expando row in the ordered set where classPK = ?. 361 * 362 * @param classPK the class p k 363 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 364 * @return the last matching expando row 365 * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found 366 * @throws SystemException if a system exception occurred 367 */ 368 public static com.liferay.portlet.expando.model.ExpandoRow findByClassPK_Last( 369 long classPK, 370 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 371 throws com.liferay.portal.kernel.exception.SystemException, 372 com.liferay.portlet.expando.NoSuchRowException { 373 return getPersistence().findByClassPK_Last(classPK, orderByComparator); 374 } 375 376 /** 377 * Returns the last expando row in the ordered set where classPK = ?. 378 * 379 * @param classPK the class p k 380 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 381 * @return the last matching expando row, or <code>null</code> if a matching expando row could not be found 382 * @throws SystemException if a system exception occurred 383 */ 384 public static com.liferay.portlet.expando.model.ExpandoRow fetchByClassPK_Last( 385 long classPK, 386 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 387 throws com.liferay.portal.kernel.exception.SystemException { 388 return getPersistence().fetchByClassPK_Last(classPK, orderByComparator); 389 } 390 391 /** 392 * Returns the expando rows before and after the current expando row in the ordered set where classPK = ?. 393 * 394 * @param rowId the primary key of the current expando row 395 * @param classPK the class p k 396 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 397 * @return the previous, current, and next expando row 398 * @throws com.liferay.portlet.expando.NoSuchRowException if a expando row with the primary key could not be found 399 * @throws SystemException if a system exception occurred 400 */ 401 public static com.liferay.portlet.expando.model.ExpandoRow[] findByClassPK_PrevAndNext( 402 long rowId, long classPK, 403 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 404 throws com.liferay.portal.kernel.exception.SystemException, 405 com.liferay.portlet.expando.NoSuchRowException { 406 return getPersistence() 407 .findByClassPK_PrevAndNext(rowId, classPK, orderByComparator); 408 } 409 410 /** 411 * Removes all the expando rows where classPK = ? from the database. 412 * 413 * @param classPK the class p k 414 * @throws SystemException if a system exception occurred 415 */ 416 public static void removeByClassPK(long classPK) 417 throws com.liferay.portal.kernel.exception.SystemException { 418 getPersistence().removeByClassPK(classPK); 419 } 420 421 /** 422 * Returns the number of expando rows where classPK = ?. 423 * 424 * @param classPK the class p k 425 * @return the number of matching expando rows 426 * @throws SystemException if a system exception occurred 427 */ 428 public static int countByClassPK(long classPK) 429 throws com.liferay.portal.kernel.exception.SystemException { 430 return getPersistence().countByClassPK(classPK); 431 } 432 433 /** 434 * Returns the expando row where tableId = ? and classPK = ? or throws a {@link com.liferay.portlet.expando.NoSuchRowException} if it could not be found. 435 * 436 * @param tableId the table ID 437 * @param classPK the class p k 438 * @return the matching expando row 439 * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found 440 * @throws SystemException if a system exception occurred 441 */ 442 public static com.liferay.portlet.expando.model.ExpandoRow findByT_C( 443 long tableId, long classPK) 444 throws com.liferay.portal.kernel.exception.SystemException, 445 com.liferay.portlet.expando.NoSuchRowException { 446 return getPersistence().findByT_C(tableId, classPK); 447 } 448 449 /** 450 * Returns the expando row where tableId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 451 * 452 * @param tableId the table ID 453 * @param classPK the class p k 454 * @return the matching expando row, or <code>null</code> if a matching expando row could not be found 455 * @throws SystemException if a system exception occurred 456 */ 457 public static com.liferay.portlet.expando.model.ExpandoRow fetchByT_C( 458 long tableId, long classPK) 459 throws com.liferay.portal.kernel.exception.SystemException { 460 return getPersistence().fetchByT_C(tableId, classPK); 461 } 462 463 /** 464 * Returns the expando row where tableId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 465 * 466 * @param tableId the table ID 467 * @param classPK the class p k 468 * @param retrieveFromCache whether to use the finder cache 469 * @return the matching expando row, or <code>null</code> if a matching expando row could not be found 470 * @throws SystemException if a system exception occurred 471 */ 472 public static com.liferay.portlet.expando.model.ExpandoRow fetchByT_C( 473 long tableId, long classPK, boolean retrieveFromCache) 474 throws com.liferay.portal.kernel.exception.SystemException { 475 return getPersistence().fetchByT_C(tableId, classPK, retrieveFromCache); 476 } 477 478 /** 479 * Removes the expando row where tableId = ? and classPK = ? from the database. 480 * 481 * @param tableId the table ID 482 * @param classPK the class p k 483 * @return the expando row that was removed 484 * @throws SystemException if a system exception occurred 485 */ 486 public static com.liferay.portlet.expando.model.ExpandoRow removeByT_C( 487 long tableId, long classPK) 488 throws com.liferay.portal.kernel.exception.SystemException, 489 com.liferay.portlet.expando.NoSuchRowException { 490 return getPersistence().removeByT_C(tableId, classPK); 491 } 492 493 /** 494 * Returns the number of expando rows where tableId = ? and classPK = ?. 495 * 496 * @param tableId the table ID 497 * @param classPK the class p k 498 * @return the number of matching expando rows 499 * @throws SystemException if a system exception occurred 500 */ 501 public static int countByT_C(long tableId, long classPK) 502 throws com.liferay.portal.kernel.exception.SystemException { 503 return getPersistence().countByT_C(tableId, classPK); 504 } 505 506 /** 507 * Caches the expando row in the entity cache if it is enabled. 508 * 509 * @param expandoRow the expando row 510 */ 511 public static void cacheResult( 512 com.liferay.portlet.expando.model.ExpandoRow expandoRow) { 513 getPersistence().cacheResult(expandoRow); 514 } 515 516 /** 517 * Caches the expando rows in the entity cache if it is enabled. 518 * 519 * @param expandoRows the expando rows 520 */ 521 public static void cacheResult( 522 java.util.List<com.liferay.portlet.expando.model.ExpandoRow> expandoRows) { 523 getPersistence().cacheResult(expandoRows); 524 } 525 526 /** 527 * Creates a new expando row with the primary key. Does not add the expando row to the database. 528 * 529 * @param rowId the primary key for the new expando row 530 * @return the new expando row 531 */ 532 public static com.liferay.portlet.expando.model.ExpandoRow create( 533 long rowId) { 534 return getPersistence().create(rowId); 535 } 536 537 /** 538 * Removes the expando row with the primary key from the database. Also notifies the appropriate model listeners. 539 * 540 * @param rowId the primary key of the expando row 541 * @return the expando row that was removed 542 * @throws com.liferay.portlet.expando.NoSuchRowException if a expando row with the primary key could not be found 543 * @throws SystemException if a system exception occurred 544 */ 545 public static com.liferay.portlet.expando.model.ExpandoRow remove( 546 long rowId) 547 throws com.liferay.portal.kernel.exception.SystemException, 548 com.liferay.portlet.expando.NoSuchRowException { 549 return getPersistence().remove(rowId); 550 } 551 552 public static com.liferay.portlet.expando.model.ExpandoRow updateImpl( 553 com.liferay.portlet.expando.model.ExpandoRow expandoRow) 554 throws com.liferay.portal.kernel.exception.SystemException { 555 return getPersistence().updateImpl(expandoRow); 556 } 557 558 /** 559 * Returns the expando row with the primary key or throws a {@link com.liferay.portlet.expando.NoSuchRowException} if it could not be found. 560 * 561 * @param rowId the primary key of the expando row 562 * @return the expando row 563 * @throws com.liferay.portlet.expando.NoSuchRowException if a expando row with the primary key could not be found 564 * @throws SystemException if a system exception occurred 565 */ 566 public static com.liferay.portlet.expando.model.ExpandoRow findByPrimaryKey( 567 long rowId) 568 throws com.liferay.portal.kernel.exception.SystemException, 569 com.liferay.portlet.expando.NoSuchRowException { 570 return getPersistence().findByPrimaryKey(rowId); 571 } 572 573 /** 574 * Returns the expando row with the primary key or returns <code>null</code> if it could not be found. 575 * 576 * @param rowId the primary key of the expando row 577 * @return the expando row, or <code>null</code> if a expando row with the primary key could not be found 578 * @throws SystemException if a system exception occurred 579 */ 580 public static com.liferay.portlet.expando.model.ExpandoRow fetchByPrimaryKey( 581 long rowId) throws com.liferay.portal.kernel.exception.SystemException { 582 return getPersistence().fetchByPrimaryKey(rowId); 583 } 584 585 /** 586 * Returns all the expando rows. 587 * 588 * @return the expando rows 589 * @throws SystemException if a system exception occurred 590 */ 591 public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findAll() 592 throws com.liferay.portal.kernel.exception.SystemException { 593 return getPersistence().findAll(); 594 } 595 596 /** 597 * Returns a range of all the expando rows. 598 * 599 * <p> 600 * 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. 601 * </p> 602 * 603 * @param start the lower bound of the range of expando rows 604 * @param end the upper bound of the range of expando rows (not inclusive) 605 * @return the range of expando rows 606 * @throws SystemException if a system exception occurred 607 */ 608 public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findAll( 609 int start, int end) 610 throws com.liferay.portal.kernel.exception.SystemException { 611 return getPersistence().findAll(start, end); 612 } 613 614 /** 615 * Returns an ordered range of all the expando rows. 616 * 617 * <p> 618 * 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. 619 * </p> 620 * 621 * @param start the lower bound of the range of expando rows 622 * @param end the upper bound of the range of expando rows (not inclusive) 623 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 624 * @return the ordered range of expando rows 625 * @throws SystemException if a system exception occurred 626 */ 627 public static java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findAll( 628 int start, int end, 629 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 630 throws com.liferay.portal.kernel.exception.SystemException { 631 return getPersistence().findAll(start, end, orderByComparator); 632 } 633 634 /** 635 * Removes all the expando rows from the database. 636 * 637 * @throws SystemException if a system exception occurred 638 */ 639 public static void removeAll() 640 throws com.liferay.portal.kernel.exception.SystemException { 641 getPersistence().removeAll(); 642 } 643 644 /** 645 * Returns the number of expando rows. 646 * 647 * @return the number of expando rows 648 * @throws SystemException if a system exception occurred 649 */ 650 public static int countAll() 651 throws com.liferay.portal.kernel.exception.SystemException { 652 return getPersistence().countAll(); 653 } 654 655 public static ExpandoRowPersistence getPersistence() { 656 if (_persistence == null) { 657 _persistence = (ExpandoRowPersistence)PortalBeanLocatorUtil.locate(ExpandoRowPersistence.class.getName()); 658 659 ReferenceRegistry.registerReference(ExpandoRowUtil.class, 660 "_persistence"); 661 } 662 663 return _persistence; 664 } 665 666 /** 667 * @deprecated As of 6.2.0 668 */ 669 public void setPersistence(ExpandoRowPersistence persistence) { 670 } 671 672 private static ExpandoRowPersistence _persistence; 673 }