/** * 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.Question; 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 question service. This utility wraps {@link QuestionPersistenceImpl} 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 QuestionPersistence * @see QuestionPersistenceImpl * @generated */ public class QuestionUtil { /* * 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(Question question) { getPersistence().clearCache(question); } /** * @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<Question> findWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException { return getPersistence().findWithDynamicQuery(dynamicQuery); } /** * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) */ public static List<Question> 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<Question> 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 Question update(Question question, boolean merge) throws SystemException { return getPersistence().update(question, merge); } /** * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) */ public static Question update(Question question, boolean merge, ServiceContext serviceContext) throws SystemException { return getPersistence().update(question, merge, serviceContext); } /** * Caches the question in the entity cache if it is enabled. * * @param question the question */ public static void cacheResult(com.ese.ils.beta.model.Question question) { getPersistence().cacheResult(question); } /** * Caches the questions in the entity cache if it is enabled. * * @param questions the questions */ public static void cacheResult( java.util.List<com.ese.ils.beta.model.Question> questions) { getPersistence().cacheResult(questions); } /** * Creates a new question with the primary key. Does not add the question to the database. * * @param questionId the primary key for the new question * @return the new question */ public static com.ese.ils.beta.model.Question create(long questionId) { return getPersistence().create(questionId); } /** * Removes the question with the primary key from the database. Also notifies the appropriate model listeners. * * @param questionId the primary key of the question * @return the question that was removed * @throws com.ese.ils.beta.NoSuchQuestionException if a question with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question remove(long questionId) throws com.ese.ils.beta.NoSuchQuestionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().remove(questionId); } public static com.ese.ils.beta.model.Question updateImpl( com.ese.ils.beta.model.Question question, boolean merge) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().updateImpl(question, merge); } /** * Returns the question with the primary key or throws a {@link com.ese.ils.beta.NoSuchQuestionException} if it could not be found. * * @param questionId the primary key of the question * @return the question * @throws com.ese.ils.beta.NoSuchQuestionException if a question with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question findByPrimaryKey( long questionId) throws com.ese.ils.beta.NoSuchQuestionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByPrimaryKey(questionId); } /** * Returns the question with the primary key or returns <code>null</code> if it could not be found. * * @param questionId the primary key of the question * @return the question, or <code>null</code> if a question with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question fetchByPrimaryKey( long questionId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().fetchByPrimaryKey(questionId); } /** * Returns all the questions where userId = ?. * * @param userId the user ID * @return the matching questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> findByUser( long userId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByUser(userId); } /** * Returns a range of all the questions 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 questions * @param end the upper bound of the range of questions (not inclusive) * @return the range of matching questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> findByUser( long userId, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByUser(userId, start, end); } /** * Returns an ordered range of all the questions 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 questions * @param end the upper bound of the range of questions (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> findByUser( long userId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByUser(userId, start, end, orderByComparator); } /** * Returns the first question 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 question * @throws com.ese.ils.beta.NoSuchQuestionException if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question findByUser_First( long userId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ese.ils.beta.NoSuchQuestionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByUser_First(userId, orderByComparator); } /** * Returns the first question 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 question, or <code>null</code> if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question fetchByUser_First( long userId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().fetchByUser_First(userId, orderByComparator); } /** * Returns the last question 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 question * @throws com.ese.ils.beta.NoSuchQuestionException if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question findByUser_Last(long userId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ese.ils.beta.NoSuchQuestionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByUser_Last(userId, orderByComparator); } /** * Returns the last question 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 question, or <code>null</code> if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question fetchByUser_Last( long userId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().fetchByUser_Last(userId, orderByComparator); } /** * Returns the questions before and after the current question in the ordered set where userId = ?. * * @param questionId the primary key of the current question * @param userId the user ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the previous, current, and next question * @throws com.ese.ils.beta.NoSuchQuestionException if a question with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question[] findByUser_PrevAndNext( long questionId, long userId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ese.ils.beta.NoSuchQuestionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByUser_PrevAndNext(questionId, userId, orderByComparator); } /** * Returns all the questions where moduleId = ?. * * @param moduleId the module ID * @return the matching questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> findByModule( long moduleId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByModule(moduleId); } /** * Returns a range of all the questions where 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 moduleId the module ID * @param start the lower bound of the range of questions * @param end the upper bound of the range of questions (not inclusive) * @return the range of matching questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> findByModule( long moduleId, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByModule(moduleId, start, end); } /** * Returns an ordered range of all the questions where 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 moduleId the module ID * @param start the lower bound of the range of questions * @param end the upper bound of the range of questions (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> findByModule( long moduleId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByModule(moduleId, start, end, orderByComparator); } /** * Returns the first question in the ordered set where moduleId = ?. * * @param moduleId the module ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching question * @throws com.ese.ils.beta.NoSuchQuestionException if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question findByModule_First( long moduleId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ese.ils.beta.NoSuchQuestionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByModule_First(moduleId, orderByComparator); } /** * Returns the first question in the ordered set where moduleId = ?. * * @param moduleId the module ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching question, or <code>null</code> if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question fetchByModule_First( long moduleId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().fetchByModule_First(moduleId, orderByComparator); } /** * Returns the last question in the ordered set where moduleId = ?. * * @param moduleId the module ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching question * @throws com.ese.ils.beta.NoSuchQuestionException if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question findByModule_Last( long moduleId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ese.ils.beta.NoSuchQuestionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByModule_Last(moduleId, orderByComparator); } /** * Returns the last question in the ordered set where moduleId = ?. * * @param moduleId the module ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching question, or <code>null</code> if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question fetchByModule_Last( long moduleId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().fetchByModule_Last(moduleId, orderByComparator); } /** * Returns the questions before and after the current question in the ordered set where moduleId = ?. * * @param questionId the primary key of the current question * @param moduleId the module ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the previous, current, and next question * @throws com.ese.ils.beta.NoSuchQuestionException if a question with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question[] findByModule_PrevAndNext( long questionId, long moduleId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ese.ils.beta.NoSuchQuestionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByModule_PrevAndNext(questionId, moduleId, orderByComparator); } /** * Returns all the questions where slideId = ?. * * @param slideId the slide ID * @return the matching questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> findBySlide( long slideId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findBySlide(slideId); } /** * Returns a range of all the questions 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 questions * @param end the upper bound of the range of questions (not inclusive) * @return the range of matching questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> findBySlide( long slideId, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findBySlide(slideId, start, end); } /** * Returns an ordered range of all the questions 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 questions * @param end the upper bound of the range of questions (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> findBySlide( long slideId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findBySlide(slideId, start, end, orderByComparator); } /** * Returns the first question 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 question * @throws com.ese.ils.beta.NoSuchQuestionException if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question findBySlide_First( long slideId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ese.ils.beta.NoSuchQuestionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().findBySlide_First(slideId, orderByComparator); } /** * Returns the first question 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 question, or <code>null</code> if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question fetchBySlide_First( long slideId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().fetchBySlide_First(slideId, orderByComparator); } /** * Returns the last question 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 question * @throws com.ese.ils.beta.NoSuchQuestionException if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question findBySlide_Last( long slideId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ese.ils.beta.NoSuchQuestionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().findBySlide_Last(slideId, orderByComparator); } /** * Returns the last question 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 question, or <code>null</code> if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question fetchBySlide_Last( long slideId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().fetchBySlide_Last(slideId, orderByComparator); } /** * Returns the questions before and after the current question in the ordered set where slideId = ?. * * @param questionId the primary key of the current question * @param slideId the slide ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the previous, current, and next question * @throws com.ese.ils.beta.NoSuchQuestionException if a question with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question[] findBySlide_PrevAndNext( long questionId, long slideId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ese.ils.beta.NoSuchQuestionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findBySlide_PrevAndNext(questionId, slideId, orderByComparator); } /** * Returns all the questions where userId = ? and slideId = ?. * * @param userId the user ID * @param slideId the slide ID * @return the matching questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> findByUserAndSlide( long userId, long slideId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByUserAndSlide(userId, slideId); } /** * Returns a range of all the questions 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 questions * @param end the upper bound of the range of questions (not inclusive) * @return the range of matching questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> 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 questions 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 questions * @param end the upper bound of the range of questions (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> 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 question 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 question * @throws com.ese.ils.beta.NoSuchQuestionException if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question findByUserAndSlide_First( long userId, long slideId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ese.ils.beta.NoSuchQuestionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByUserAndSlide_First(userId, slideId, orderByComparator); } /** * Returns the first question 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 question, or <code>null</code> if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question 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 question 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 question * @throws com.ese.ils.beta.NoSuchQuestionException if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question findByUserAndSlide_Last( long userId, long slideId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ese.ils.beta.NoSuchQuestionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByUserAndSlide_Last(userId, slideId, orderByComparator); } /** * Returns the last question 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 question, or <code>null</code> if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question 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 questions before and after the current question in the ordered set where userId = ? and slideId = ?. * * @param questionId the primary key of the current question * @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 question * @throws com.ese.ils.beta.NoSuchQuestionException if a question with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question[] findByUserAndSlide_PrevAndNext( long questionId, long userId, long slideId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ese.ils.beta.NoSuchQuestionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByUserAndSlide_PrevAndNext(questionId, userId, slideId, orderByComparator); } /** * Returns all the questions where userId = ? and moduleId = ?. * * @param userId the user ID * @param moduleId the module ID * @return the matching questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> findByUserAndModule( long userId, long moduleId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByUserAndModule(userId, moduleId); } /** * Returns a range of all the questions 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 questions * @param end the upper bound of the range of questions (not inclusive) * @return the range of matching questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> findByUserAndModule( long userId, long moduleId, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByUserAndModule(userId, moduleId, start, end); } /** * Returns an ordered range of all the questions 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 questions * @param end the upper bound of the range of questions (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> findByUserAndModule( long userId, long moduleId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByUserAndModule(userId, moduleId, start, end, orderByComparator); } /** * Returns the first question 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 question * @throws com.ese.ils.beta.NoSuchQuestionException if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question findByUserAndModule_First( long userId, long moduleId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ese.ils.beta.NoSuchQuestionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByUserAndModule_First(userId, moduleId, orderByComparator); } /** * Returns the first question 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 question, or <code>null</code> if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question fetchByUserAndModule_First( long userId, long moduleId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByUserAndModule_First(userId, moduleId, orderByComparator); } /** * Returns the last question 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 question * @throws com.ese.ils.beta.NoSuchQuestionException if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question findByUserAndModule_Last( long userId, long moduleId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ese.ils.beta.NoSuchQuestionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByUserAndModule_Last(userId, moduleId, orderByComparator); } /** * Returns the last question 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 question, or <code>null</code> if a matching question could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question fetchByUserAndModule_Last( long userId, long moduleId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByUserAndModule_Last(userId, moduleId, orderByComparator); } /** * Returns the questions before and after the current question in the ordered set where userId = ? and moduleId = ?. * * @param questionId the primary key of the current question * @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 question * @throws com.ese.ils.beta.NoSuchQuestionException if a question with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.ese.ils.beta.model.Question[] findByUserAndModule_PrevAndNext( long questionId, long userId, long moduleId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ese.ils.beta.NoSuchQuestionException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByUserAndModule_PrevAndNext(questionId, userId, moduleId, orderByComparator); } /** * Returns all the questions. * * @return the questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> findAll() throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findAll(); } /** * Returns a range of all the questions. * * <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 questions * @param end the upper bound of the range of questions (not inclusive) * @return the range of questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> findAll( int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findAll(start, end); } /** * Returns an ordered range of all the questions. * * <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 questions * @param end the upper bound of the range of questions (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of questions * @throws SystemException if a system exception occurred */ public static java.util.List<com.ese.ils.beta.model.Question> 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 questions where userId = ? from the database. * * @param userId the user ID * @throws SystemException if a system exception occurred */ public static void removeByUser(long userId) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().removeByUser(userId); } /** * Removes all the questions where moduleId = ? from the database. * * @param moduleId the module ID * @throws SystemException if a system exception occurred */ public static void removeByModule(long moduleId) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().removeByModule(moduleId); } /** * Removes all the questions where slideId = ? from the database. * * @param slideId the slide ID * @throws SystemException if a system exception occurred */ public static void removeBySlide(long slideId) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().removeBySlide(slideId); } /** * Removes all the questions 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 questions 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 removeByUserAndModule(long userId, long moduleId) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().removeByUserAndModule(userId, moduleId); } /** * Removes all the questions 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 questions where userId = ?. * * @param userId the user ID * @return the number of matching questions * @throws SystemException if a system exception occurred */ public static int countByUser(long userId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().countByUser(userId); } /** * Returns the number of questions where moduleId = ?. * * @param moduleId the module ID * @return the number of matching questions * @throws SystemException if a system exception occurred */ public static int countByModule(long moduleId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().countByModule(moduleId); } /** * Returns the number of questions where slideId = ?. * * @param slideId the slide ID * @return the number of matching questions * @throws SystemException if a system exception occurred */ public static int countBySlide(long slideId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().countBySlide(slideId); } /** * Returns the number of questions where userId = ? and slideId = ?. * * @param userId the user ID * @param slideId the slide ID * @return the number of matching questions * @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 questions where userId = ? and moduleId = ?. * * @param userId the user ID * @param moduleId the module ID * @return the number of matching questions * @throws SystemException if a system exception occurred */ public static int countByUserAndModule(long userId, long moduleId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().countByUserAndModule(userId, moduleId); } /** * Returns the number of questions. * * @return the number of questions * @throws SystemException if a system exception occurred */ public static int countAll() throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().countAll(); } public static QuestionPersistence getPersistence() { if (_persistence == null) { _persistence = (QuestionPersistence)PortletBeanLocatorUtil.locate(com.ese.ils.beta.service.ClpSerializer.getServletContextName(), QuestionPersistence.class.getName()); ReferenceRegistry.registerReference(QuestionUtil.class, "_persistence"); } return _persistence; } /** * @deprecated */ public void setPersistence(QuestionPersistence persistence) { } private static QuestionPersistence _persistence; }