/**
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.ese.ils.beta.service.persistence;
import com.ese.ils.beta.model.Favorite;
import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.ReferenceRegistry;
import com.liferay.portal.service.ServiceContext;
import java.util.List;
/**
* The persistence utility for the favorite service. This utility wraps {@link FavoritePersistenceImpl} 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.
*
* <p>
* Caching information and settings can be found in <code>portal.properties</code>
* </p>
*
* @author edik
* @see FavoritePersistence
* @see FavoritePersistenceImpl
* @generated
*/
public class FavoriteUtil {
/*
* NOTE FOR DEVELOPERS:
*
* Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
*/
/**
* @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
*/
public static void clearCache() {
getPersistence().clearCache();
}
/**
* @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
*/
public static void clearCache(Favorite favorite) {
getPersistence().clearCache(favorite);
}
/**
* @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
*/
public long countWithDynamicQuery(DynamicQuery dynamicQuery)
throws SystemException {
return getPersistence().countWithDynamicQuery(dynamicQuery);
}
/**
* @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
*/
public static List<Favorite> findWithDynamicQuery(DynamicQuery dynamicQuery)
throws SystemException {
return getPersistence().findWithDynamicQuery(dynamicQuery);
}
/**
* @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
*/
public static List<Favorite> findWithDynamicQuery(
DynamicQuery dynamicQuery, int start, int end)
throws SystemException {
return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
}
/**
* @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
*/
public static List<Favorite> findWithDynamicQuery(
DynamicQuery dynamicQuery, int start, int end,
OrderByComparator orderByComparator) throws SystemException {
return getPersistence()
.findWithDynamicQuery(dynamicQuery, start, end,
orderByComparator);
}
/**
* @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
*/
public static Favorite update(Favorite favorite, boolean merge)
throws SystemException {
return getPersistence().update(favorite, merge);
}
/**
* @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
*/
public static Favorite update(Favorite favorite, boolean merge,
ServiceContext serviceContext) throws SystemException {
return getPersistence().update(favorite, merge, serviceContext);
}
/**
* Caches the favorite in the entity cache if it is enabled.
*
* @param favorite the favorite
*/
public static void cacheResult(com.ese.ils.beta.model.Favorite favorite) {
getPersistence().cacheResult(favorite);
}
/**
* Caches the favorites in the entity cache if it is enabled.
*
* @param favorites the favorites
*/
public static void cacheResult(
java.util.List<com.ese.ils.beta.model.Favorite> favorites) {
getPersistence().cacheResult(favorites);
}
/**
* Creates a new favorite with the primary key. Does not add the favorite to the database.
*
* @param favoriteId the primary key for the new favorite
* @return the new favorite
*/
public static com.ese.ils.beta.model.Favorite create(long favoriteId) {
return getPersistence().create(favoriteId);
}
/**
* Removes the favorite with the primary key from the database. Also notifies the appropriate model listeners.
*
* @param favoriteId the primary key of the favorite
* @return the favorite that was removed
* @throws com.ese.ils.beta.NoSuchFavoriteException if a favorite with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite remove(long favoriteId)
throws com.ese.ils.beta.NoSuchFavoriteException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence().remove(favoriteId);
}
public static com.ese.ils.beta.model.Favorite updateImpl(
com.ese.ils.beta.model.Favorite favorite, boolean merge)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().updateImpl(favorite, merge);
}
/**
* Returns the favorite with the primary key or throws a {@link com.ese.ils.beta.NoSuchFavoriteException} if it could not be found.
*
* @param favoriteId the primary key of the favorite
* @return the favorite
* @throws com.ese.ils.beta.NoSuchFavoriteException if a favorite with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite findByPrimaryKey(
long favoriteId)
throws com.ese.ils.beta.NoSuchFavoriteException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByPrimaryKey(favoriteId);
}
/**
* Returns the favorite with the primary key or returns <code>null</code> if it could not be found.
*
* @param favoriteId the primary key of the favorite
* @return the favorite, or <code>null</code> if a favorite with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite fetchByPrimaryKey(
long favoriteId)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().fetchByPrimaryKey(favoriteId);
}
/**
* Returns all the favorites where userId = ?.
*
* @param userId the user ID
* @return the matching favorites
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Favorite> findByByUser(
long userId) throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByByUser(userId);
}
/**
* Returns a range of all the favorites where userId = ?.
*
* <p>
* 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.
* </p>
*
* @param userId the user ID
* @param start the lower bound of the range of favorites
* @param end the upper bound of the range of favorites (not inclusive)
* @return the range of matching favorites
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Favorite> findByByUser(
long userId, int start, int end)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByByUser(userId, start, end);
}
/**
* Returns an ordered range of all the favorites where userId = ?.
*
* <p>
* 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.
* </p>
*
* @param userId the user ID
* @param start the lower bound of the range of favorites
* @param end the upper bound of the range of favorites (not inclusive)
* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
* @return the ordered range of matching favorites
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Favorite> findByByUser(
long userId, int start, int end,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.findByByUser(userId, start, end, orderByComparator);
}
/**
* Returns the first favorite in the ordered set where userId = ?.
*
* @param userId the user ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching favorite
* @throws com.ese.ils.beta.NoSuchFavoriteException if a matching favorite could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite findByByUser_First(
long userId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.ese.ils.beta.NoSuchFavoriteException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByByUser_First(userId, orderByComparator);
}
/**
* Returns the first favorite in the ordered set where userId = ?.
*
* @param userId the user ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching favorite, or <code>null</code> if a matching favorite could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite fetchByByUser_First(
long userId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().fetchByByUser_First(userId, orderByComparator);
}
/**
* Returns the last favorite in the ordered set where userId = ?.
*
* @param userId the user ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the last matching favorite
* @throws com.ese.ils.beta.NoSuchFavoriteException if a matching favorite could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite findByByUser_Last(
long userId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.ese.ils.beta.NoSuchFavoriteException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByByUser_Last(userId, orderByComparator);
}
/**
* Returns the last favorite in the ordered set where userId = ?.
*
* @param userId the user ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the last matching favorite, or <code>null</code> if a matching favorite could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite fetchByByUser_Last(
long userId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().fetchByByUser_Last(userId, orderByComparator);
}
/**
* Returns the favorites before and after the current favorite in the ordered set where userId = ?.
*
* @param favoriteId the primary key of the current favorite
* @param userId the user ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next favorite
* @throws com.ese.ils.beta.NoSuchFavoriteException if a favorite with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite[] findByByUser_PrevAndNext(
long favoriteId, long userId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.ese.ils.beta.NoSuchFavoriteException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.findByByUser_PrevAndNext(favoriteId, userId,
orderByComparator);
}
/**
* Returns all the favorites where slideId = ?.
*
* @param slideId the slide ID
* @return the matching favorites
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Favorite> findByBySlide(
long slideId)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByBySlide(slideId);
}
/**
* Returns a range of all the favorites where slideId = ?.
*
* <p>
* 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.
* </p>
*
* @param slideId the slide ID
* @param start the lower bound of the range of favorites
* @param end the upper bound of the range of favorites (not inclusive)
* @return the range of matching favorites
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Favorite> findByBySlide(
long slideId, int start, int end)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByBySlide(slideId, start, end);
}
/**
* Returns an ordered range of all the favorites where slideId = ?.
*
* <p>
* 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.
* </p>
*
* @param slideId the slide ID
* @param start the lower bound of the range of favorites
* @param end the upper bound of the range of favorites (not inclusive)
* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
* @return the ordered range of matching favorites
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Favorite> findByBySlide(
long slideId, int start, int end,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.findByBySlide(slideId, start, end, orderByComparator);
}
/**
* Returns the first favorite in the ordered set where slideId = ?.
*
* @param slideId the slide ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching favorite
* @throws com.ese.ils.beta.NoSuchFavoriteException if a matching favorite could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite findByBySlide_First(
long slideId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.ese.ils.beta.NoSuchFavoriteException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByBySlide_First(slideId, orderByComparator);
}
/**
* Returns the first favorite in the ordered set where slideId = ?.
*
* @param slideId the slide ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching favorite, or <code>null</code> if a matching favorite could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite fetchByBySlide_First(
long slideId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().fetchByBySlide_First(slideId, orderByComparator);
}
/**
* Returns the last favorite in the ordered set where slideId = ?.
*
* @param slideId the slide ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the last matching favorite
* @throws com.ese.ils.beta.NoSuchFavoriteException if a matching favorite could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite findByBySlide_Last(
long slideId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.ese.ils.beta.NoSuchFavoriteException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByBySlide_Last(slideId, orderByComparator);
}
/**
* Returns the last favorite in the ordered set where slideId = ?.
*
* @param slideId the slide ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the last matching favorite, or <code>null</code> if a matching favorite could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite fetchByBySlide_Last(
long slideId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().fetchByBySlide_Last(slideId, orderByComparator);
}
/**
* Returns the favorites before and after the current favorite in the ordered set where slideId = ?.
*
* @param favoriteId the primary key of the current favorite
* @param slideId the slide ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next favorite
* @throws com.ese.ils.beta.NoSuchFavoriteException if a favorite with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite[] findByBySlide_PrevAndNext(
long favoriteId, long slideId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.ese.ils.beta.NoSuchFavoriteException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.findByBySlide_PrevAndNext(favoriteId, slideId,
orderByComparator);
}
/**
* Returns all the favorites where userId = ? and moduleId = ?.
*
* @param userId the user ID
* @param moduleId the module ID
* @return the matching favorites
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Favorite> findByUserModule(
long userId, long moduleId)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByUserModule(userId, moduleId);
}
/**
* Returns a range of all the favorites where userId = ? and moduleId = ?.
*
* <p>
* 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.
* </p>
*
* @param userId the user ID
* @param moduleId the module ID
* @param start the lower bound of the range of favorites
* @param end the upper bound of the range of favorites (not inclusive)
* @return the range of matching favorites
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Favorite> findByUserModule(
long userId, long moduleId, int start, int end)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByUserModule(userId, moduleId, start, end);
}
/**
* Returns an ordered range of all the favorites where userId = ? and moduleId = ?.
*
* <p>
* 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.
* </p>
*
* @param userId the user ID
* @param moduleId the module ID
* @param start the lower bound of the range of favorites
* @param end the upper bound of the range of favorites (not inclusive)
* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
* @return the ordered range of matching favorites
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Favorite> findByUserModule(
long userId, long moduleId, int start, int end,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.findByUserModule(userId, moduleId, start, end,
orderByComparator);
}
/**
* Returns the first favorite in the ordered set where userId = ? and moduleId = ?.
*
* @param userId the user ID
* @param moduleId the module ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching favorite
* @throws com.ese.ils.beta.NoSuchFavoriteException if a matching favorite could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite findByUserModule_First(
long userId, long moduleId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.ese.ils.beta.NoSuchFavoriteException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.findByUserModule_First(userId, moduleId, orderByComparator);
}
/**
* Returns the first favorite in the ordered set where userId = ? and moduleId = ?.
*
* @param userId the user ID
* @param moduleId the module ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching favorite, or <code>null</code> if a matching favorite could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite fetchByUserModule_First(
long userId, long moduleId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.fetchByUserModule_First(userId, moduleId, orderByComparator);
}
/**
* Returns the last favorite in the ordered set where userId = ? and moduleId = ?.
*
* @param userId the user ID
* @param moduleId the module ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the last matching favorite
* @throws com.ese.ils.beta.NoSuchFavoriteException if a matching favorite could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite findByUserModule_Last(
long userId, long moduleId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.ese.ils.beta.NoSuchFavoriteException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.findByUserModule_Last(userId, moduleId, orderByComparator);
}
/**
* Returns the last favorite in the ordered set where userId = ? and moduleId = ?.
*
* @param userId the user ID
* @param moduleId the module ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the last matching favorite, or <code>null</code> if a matching favorite could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite fetchByUserModule_Last(
long userId, long moduleId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.fetchByUserModule_Last(userId, moduleId, orderByComparator);
}
/**
* Returns the favorites before and after the current favorite in the ordered set where userId = ? and moduleId = ?.
*
* @param favoriteId the primary key of the current favorite
* @param userId the user ID
* @param moduleId the module ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next favorite
* @throws com.ese.ils.beta.NoSuchFavoriteException if a favorite with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite[] findByUserModule_PrevAndNext(
long favoriteId, long userId, long moduleId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.ese.ils.beta.NoSuchFavoriteException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.findByUserModule_PrevAndNext(favoriteId, userId, moduleId,
orderByComparator);
}
/**
* Returns all the favorites where userId = ? and slideId = ?.
*
* @param userId the user ID
* @param slideId the slide ID
* @return the matching favorites
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Favorite> findByUserAndSlide(
long userId, long slideId)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByUserAndSlide(userId, slideId);
}
/**
* Returns a range of all the favorites where userId = ? and slideId = ?.
*
* <p>
* 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.
* </p>
*
* @param userId the user ID
* @param slideId the slide ID
* @param start the lower bound of the range of favorites
* @param end the upper bound of the range of favorites (not inclusive)
* @return the range of matching favorites
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Favorite> findByUserAndSlide(
long userId, long slideId, int start, int end)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByUserAndSlide(userId, slideId, start, end);
}
/**
* Returns an ordered range of all the favorites where userId = ? and slideId = ?.
*
* <p>
* 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.
* </p>
*
* @param userId the user ID
* @param slideId the slide ID
* @param start the lower bound of the range of favorites
* @param end the upper bound of the range of favorites (not inclusive)
* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
* @return the ordered range of matching favorites
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Favorite> findByUserAndSlide(
long userId, long slideId, int start, int end,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.findByUserAndSlide(userId, slideId, start, end,
orderByComparator);
}
/**
* Returns the first favorite in the ordered set where userId = ? and slideId = ?.
*
* @param userId the user ID
* @param slideId the slide ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching favorite
* @throws com.ese.ils.beta.NoSuchFavoriteException if a matching favorite could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite findByUserAndSlide_First(
long userId, long slideId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.ese.ils.beta.NoSuchFavoriteException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.findByUserAndSlide_First(userId, slideId, orderByComparator);
}
/**
* Returns the first favorite in the ordered set where userId = ? and slideId = ?.
*
* @param userId the user ID
* @param slideId the slide ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching favorite, or <code>null</code> if a matching favorite could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite fetchByUserAndSlide_First(
long userId, long slideId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.fetchByUserAndSlide_First(userId, slideId, orderByComparator);
}
/**
* Returns the last favorite in the ordered set where userId = ? and slideId = ?.
*
* @param userId the user ID
* @param slideId the slide ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the last matching favorite
* @throws com.ese.ils.beta.NoSuchFavoriteException if a matching favorite could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite findByUserAndSlide_Last(
long userId, long slideId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.ese.ils.beta.NoSuchFavoriteException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.findByUserAndSlide_Last(userId, slideId, orderByComparator);
}
/**
* Returns the last favorite in the ordered set where userId = ? and slideId = ?.
*
* @param userId the user ID
* @param slideId the slide ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the last matching favorite, or <code>null</code> if a matching favorite could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite fetchByUserAndSlide_Last(
long userId, long slideId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.fetchByUserAndSlide_Last(userId, slideId, orderByComparator);
}
/**
* Returns the favorites before and after the current favorite in the ordered set where userId = ? and slideId = ?.
*
* @param favoriteId the primary key of the current favorite
* @param userId the user ID
* @param slideId the slide ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next favorite
* @throws com.ese.ils.beta.NoSuchFavoriteException if a favorite with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Favorite[] findByUserAndSlide_PrevAndNext(
long favoriteId, long userId, long slideId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.ese.ils.beta.NoSuchFavoriteException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.findByUserAndSlide_PrevAndNext(favoriteId, userId, slideId,
orderByComparator);
}
/**
* Returns all the favorites.
*
* @return the favorites
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Favorite> findAll()
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findAll();
}
/**
* Returns a range of all the favorites.
*
* <p>
* 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.
* </p>
*
* @param start the lower bound of the range of favorites
* @param end the upper bound of the range of favorites (not inclusive)
* @return the range of favorites
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Favorite> findAll(
int start, int end)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findAll(start, end);
}
/**
* Returns an ordered range of all the favorites.
*
* <p>
* 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.
* </p>
*
* @param start the lower bound of the range of favorites
* @param end the upper bound of the range of favorites (not inclusive)
* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
* @return the ordered range of favorites
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Favorite> findAll(
int start, int end,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findAll(start, end, orderByComparator);
}
/**
* Removes all the favorites where userId = ? from the database.
*
* @param userId the user ID
* @throws SystemException if a system exception occurred
*/
public static void removeByByUser(long userId)
throws com.liferay.portal.kernel.exception.SystemException {
getPersistence().removeByByUser(userId);
}
/**
* Removes all the favorites where slideId = ? from the database.
*
* @param slideId the slide ID
* @throws SystemException if a system exception occurred
*/
public static void removeByBySlide(long slideId)
throws com.liferay.portal.kernel.exception.SystemException {
getPersistence().removeByBySlide(slideId);
}
/**
* Removes all the favorites where userId = ? and moduleId = ? from the database.
*
* @param userId the user ID
* @param moduleId the module ID
* @throws SystemException if a system exception occurred
*/
public static void removeByUserModule(long userId, long moduleId)
throws com.liferay.portal.kernel.exception.SystemException {
getPersistence().removeByUserModule(userId, moduleId);
}
/**
* Removes all the favorites where userId = ? and slideId = ? from the database.
*
* @param userId the user ID
* @param slideId the slide ID
* @throws SystemException if a system exception occurred
*/
public static void removeByUserAndSlide(long userId, long slideId)
throws com.liferay.portal.kernel.exception.SystemException {
getPersistence().removeByUserAndSlide(userId, slideId);
}
/**
* Removes all the favorites from the database.
*
* @throws SystemException if a system exception occurred
*/
public static void removeAll()
throws com.liferay.portal.kernel.exception.SystemException {
getPersistence().removeAll();
}
/**
* Returns the number of favorites where userId = ?.
*
* @param userId the user ID
* @return the number of matching favorites
* @throws SystemException if a system exception occurred
*/
public static int countByByUser(long userId)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().countByByUser(userId);
}
/**
* Returns the number of favorites where slideId = ?.
*
* @param slideId the slide ID
* @return the number of matching favorites
* @throws SystemException if a system exception occurred
*/
public static int countByBySlide(long slideId)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().countByBySlide(slideId);
}
/**
* Returns the number of favorites where userId = ? and moduleId = ?.
*
* @param userId the user ID
* @param moduleId the module ID
* @return the number of matching favorites
* @throws SystemException if a system exception occurred
*/
public static int countByUserModule(long userId, long moduleId)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().countByUserModule(userId, moduleId);
}
/**
* Returns the number of favorites where userId = ? and slideId = ?.
*
* @param userId the user ID
* @param slideId the slide ID
* @return the number of matching favorites
* @throws SystemException if a system exception occurred
*/
public static int countByUserAndSlide(long userId, long slideId)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().countByUserAndSlide(userId, slideId);
}
/**
* Returns the number of favorites.
*
* @return the number of favorites
* @throws SystemException if a system exception occurred
*/
public static int countAll()
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().countAll();
}
public static FavoritePersistence getPersistence() {
if (_persistence == null) {
_persistence = (FavoritePersistence)PortletBeanLocatorUtil.locate(com.ese.ils.beta.service.ClpSerializer.getServletContextName(),
FavoritePersistence.class.getName());
ReferenceRegistry.registerReference(FavoriteUtil.class,
"_persistence");
}
return _persistence;
}
/**
* @deprecated
*/
public void setPersistence(FavoritePersistence persistence) {
}
private static FavoritePersistence _persistence;
}