--- /dev/null
+/**
+ * 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.pentila.entSavoie.cdt.service.persistence;
+
+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 com.pentila.entSavoie.cdt.model.Homework;
+
+import java.util.List;
+
+/**
+ * The persistence utility for the homework service. This utility wraps {@link HomeworkPersistenceImpl} 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 Cedric Lecarpentier
+ * @see HomeworkPersistence
+ * @see HomeworkPersistenceImpl
+ * @generated
+ */
+public class HomeworkUtil {
+ /*
+ * 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(Homework homework) {
+ getPersistence().clearCache(homework);
+ }
+
+ /**
+ * @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<Homework> findWithDynamicQuery(DynamicQuery dynamicQuery)
+ throws SystemException {
+ return getPersistence().findWithDynamicQuery(dynamicQuery);
+ }
+
+ /**
+ * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
+ */
+ public static List<Homework> 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<Homework> 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 Homework update(Homework homework, boolean merge)
+ throws SystemException {
+ return getPersistence().update(homework, merge);
+ }
+
+ /**
+ * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
+ */
+ public static Homework update(Homework homework, boolean merge,
+ ServiceContext serviceContext) throws SystemException {
+ return getPersistence().update(homework, merge, serviceContext);
+ }
+
+ /**
+ * Caches the homework in the entity cache if it is enabled.
+ *
+ * @param homework the homework
+ */
+ public static void cacheResult(
+ com.pentila.entSavoie.cdt.model.Homework homework) {
+ getPersistence().cacheResult(homework);
+ }
+
+ /**
+ * Caches the homeworks in the entity cache if it is enabled.
+ *
+ * @param homeworks the homeworks
+ */
+ public static void cacheResult(
+ java.util.List<com.pentila.entSavoie.cdt.model.Homework> homeworks) {
+ getPersistence().cacheResult(homeworks);
+ }
+
+ /**
+ * Creates a new homework with the primary key. Does not add the homework to the database.
+ *
+ * @param homeworkId the primary key for the new homework
+ * @return the new homework
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework create(
+ long homeworkId) {
+ return getPersistence().create(homeworkId);
+ }
+
+ /**
+ * Removes the homework with the primary key from the database. Also notifies the appropriate model listeners.
+ *
+ * @param homeworkId the primary key of the homework
+ * @return the homework that was removed
+ * @throws com.pentila.entSavoie.cdt.NoSuchHomeworkException if a homework with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework remove(
+ long homeworkId)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ com.pentila.entSavoie.cdt.NoSuchHomeworkException {
+ return getPersistence().remove(homeworkId);
+ }
+
+ public static com.pentila.entSavoie.cdt.model.Homework updateImpl(
+ com.pentila.entSavoie.cdt.model.Homework homework, boolean merge)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().updateImpl(homework, merge);
+ }
+
+ /**
+ * Returns the homework with the primary key or throws a {@link com.pentila.entSavoie.cdt.NoSuchHomeworkException} if it could not be found.
+ *
+ * @param homeworkId the primary key of the homework
+ * @return the homework
+ * @throws com.pentila.entSavoie.cdt.NoSuchHomeworkException if a homework with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework findByPrimaryKey(
+ long homeworkId)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ com.pentila.entSavoie.cdt.NoSuchHomeworkException {
+ return getPersistence().findByPrimaryKey(homeworkId);
+ }
+
+ /**
+ * Returns the homework with the primary key or returns <code>null</code> if it could not be found.
+ *
+ * @param homeworkId the primary key of the homework
+ * @return the homework, or <code>null</code> if a homework with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework fetchByPrimaryKey(
+ long homeworkId)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().fetchByPrimaryKey(homeworkId);
+ }
+
+ /**
+ * Returns all the homeworks where targetSessionId = ?.
+ *
+ * @param targetSessionId the target session ID
+ * @return the matching homeworks
+ * @throws SystemException if a system exception occurred
+ */
+ public static java.util.List<com.pentila.entSavoie.cdt.model.Homework> findBytargetSessionId(
+ long targetSessionId)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().findBytargetSessionId(targetSessionId);
+ }
+
+ /**
+ * Returns a range of all the homeworks where targetSessionId = ?.
+ *
+ * <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 targetSessionId the target session ID
+ * @param start the lower bound of the range of homeworks
+ * @param end the upper bound of the range of homeworks (not inclusive)
+ * @return the range of matching homeworks
+ * @throws SystemException if a system exception occurred
+ */
+ public static java.util.List<com.pentila.entSavoie.cdt.model.Homework> findBytargetSessionId(
+ long targetSessionId, int start, int end)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence()
+ .findBytargetSessionId(targetSessionId, start, end);
+ }
+
+ /**
+ * Returns an ordered range of all the homeworks where targetSessionId = ?.
+ *
+ * <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 targetSessionId the target session ID
+ * @param start the lower bound of the range of homeworks
+ * @param end the upper bound of the range of homeworks (not inclusive)
+ * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
+ * @return the ordered range of matching homeworks
+ * @throws SystemException if a system exception occurred
+ */
+ public static java.util.List<com.pentila.entSavoie.cdt.model.Homework> findBytargetSessionId(
+ long targetSessionId, int start, int end,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence()
+ .findBytargetSessionId(targetSessionId, start, end,
+ orderByComparator);
+ }
+
+ /**
+ * Returns the first homework in the ordered set where targetSessionId = ?.
+ *
+ * @param targetSessionId the target session ID
+ * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
+ * @return the first matching homework
+ * @throws com.pentila.entSavoie.cdt.NoSuchHomeworkException if a matching homework could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework findBytargetSessionId_First(
+ long targetSessionId,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ com.pentila.entSavoie.cdt.NoSuchHomeworkException {
+ return getPersistence()
+ .findBytargetSessionId_First(targetSessionId,
+ orderByComparator);
+ }
+
+ /**
+ * Returns the first homework in the ordered set where targetSessionId = ?.
+ *
+ * @param targetSessionId the target session ID
+ * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
+ * @return the first matching homework, or <code>null</code> if a matching homework could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework fetchBytargetSessionId_First(
+ long targetSessionId,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence()
+ .fetchBytargetSessionId_First(targetSessionId,
+ orderByComparator);
+ }
+
+ /**
+ * Returns the last homework in the ordered set where targetSessionId = ?.
+ *
+ * @param targetSessionId the target session ID
+ * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
+ * @return the last matching homework
+ * @throws com.pentila.entSavoie.cdt.NoSuchHomeworkException if a matching homework could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework findBytargetSessionId_Last(
+ long targetSessionId,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ com.pentila.entSavoie.cdt.NoSuchHomeworkException {
+ return getPersistence()
+ .findBytargetSessionId_Last(targetSessionId,
+ orderByComparator);
+ }
+
+ /**
+ * Returns the last homework in the ordered set where targetSessionId = ?.
+ *
+ * @param targetSessionId the target session ID
+ * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
+ * @return the last matching homework, or <code>null</code> if a matching homework could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework fetchBytargetSessionId_Last(
+ long targetSessionId,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence()
+ .fetchBytargetSessionId_Last(targetSessionId,
+ orderByComparator);
+ }
+
+ /**
+ * Returns the homeworks before and after the current homework in the ordered set where targetSessionId = ?.
+ *
+ * @param homeworkId the primary key of the current homework
+ * @param targetSessionId the target session ID
+ * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
+ * @return the previous, current, and next homework
+ * @throws com.pentila.entSavoie.cdt.NoSuchHomeworkException if a homework with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework[] findBytargetSessionId_PrevAndNext(
+ long homeworkId, long targetSessionId,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ com.pentila.entSavoie.cdt.NoSuchHomeworkException {
+ return getPersistence()
+ .findBytargetSessionId_PrevAndNext(homeworkId,
+ targetSessionId, orderByComparator);
+ }
+
+ /**
+ * Returns all the homeworks where sourceSessionId = ?.
+ *
+ * @param sourceSessionId the source session ID
+ * @return the matching homeworks
+ * @throws SystemException if a system exception occurred
+ */
+ public static java.util.List<com.pentila.entSavoie.cdt.model.Homework> findBysourceSessionId(
+ long sourceSessionId)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().findBysourceSessionId(sourceSessionId);
+ }
+
+ /**
+ * Returns a range of all the homeworks where sourceSessionId = ?.
+ *
+ * <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 sourceSessionId the source session ID
+ * @param start the lower bound of the range of homeworks
+ * @param end the upper bound of the range of homeworks (not inclusive)
+ * @return the range of matching homeworks
+ * @throws SystemException if a system exception occurred
+ */
+ public static java.util.List<com.pentila.entSavoie.cdt.model.Homework> findBysourceSessionId(
+ long sourceSessionId, int start, int end)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence()
+ .findBysourceSessionId(sourceSessionId, start, end);
+ }
+
+ /**
+ * Returns an ordered range of all the homeworks where sourceSessionId = ?.
+ *
+ * <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 sourceSessionId the source session ID
+ * @param start the lower bound of the range of homeworks
+ * @param end the upper bound of the range of homeworks (not inclusive)
+ * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
+ * @return the ordered range of matching homeworks
+ * @throws SystemException if a system exception occurred
+ */
+ public static java.util.List<com.pentila.entSavoie.cdt.model.Homework> findBysourceSessionId(
+ long sourceSessionId, int start, int end,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence()
+ .findBysourceSessionId(sourceSessionId, start, end,
+ orderByComparator);
+ }
+
+ /**
+ * Returns the first homework in the ordered set where sourceSessionId = ?.
+ *
+ * @param sourceSessionId the source session ID
+ * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
+ * @return the first matching homework
+ * @throws com.pentila.entSavoie.cdt.NoSuchHomeworkException if a matching homework could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework findBysourceSessionId_First(
+ long sourceSessionId,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ com.pentila.entSavoie.cdt.NoSuchHomeworkException {
+ return getPersistence()
+ .findBysourceSessionId_First(sourceSessionId,
+ orderByComparator);
+ }
+
+ /**
+ * Returns the first homework in the ordered set where sourceSessionId = ?.
+ *
+ * @param sourceSessionId the source session ID
+ * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
+ * @return the first matching homework, or <code>null</code> if a matching homework could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework fetchBysourceSessionId_First(
+ long sourceSessionId,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence()
+ .fetchBysourceSessionId_First(sourceSessionId,
+ orderByComparator);
+ }
+
+ /**
+ * Returns the last homework in the ordered set where sourceSessionId = ?.
+ *
+ * @param sourceSessionId the source session ID
+ * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
+ * @return the last matching homework
+ * @throws com.pentila.entSavoie.cdt.NoSuchHomeworkException if a matching homework could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework findBysourceSessionId_Last(
+ long sourceSessionId,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ com.pentila.entSavoie.cdt.NoSuchHomeworkException {
+ return getPersistence()
+ .findBysourceSessionId_Last(sourceSessionId,
+ orderByComparator);
+ }
+
+ /**
+ * Returns the last homework in the ordered set where sourceSessionId = ?.
+ *
+ * @param sourceSessionId the source session ID
+ * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
+ * @return the last matching homework, or <code>null</code> if a matching homework could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework fetchBysourceSessionId_Last(
+ long sourceSessionId,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence()
+ .fetchBysourceSessionId_Last(sourceSessionId,
+ orderByComparator);
+ }
+
+ /**
+ * Returns the homeworks before and after the current homework in the ordered set where sourceSessionId = ?.
+ *
+ * @param homeworkId the primary key of the current homework
+ * @param sourceSessionId the source session ID
+ * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
+ * @return the previous, current, and next homework
+ * @throws com.pentila.entSavoie.cdt.NoSuchHomeworkException if a homework with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework[] findBysourceSessionId_PrevAndNext(
+ long homeworkId, long sourceSessionId,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ com.pentila.entSavoie.cdt.NoSuchHomeworkException {
+ return getPersistence()
+ .findBysourceSessionId_PrevAndNext(homeworkId,
+ sourceSessionId, orderByComparator);
+ }
+
+ /**
+ * Returns all the homeworks where targetWeekId = ?.
+ *
+ * @param targetWeekId the target week ID
+ * @return the matching homeworks
+ * @throws SystemException if a system exception occurred
+ */
+ public static java.util.List<com.pentila.entSavoie.cdt.model.Homework> findBytargetWeekId(
+ int targetWeekId)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().findBytargetWeekId(targetWeekId);
+ }
+
+ /**
+ * Returns a range of all the homeworks where targetWeekId = ?.
+ *
+ * <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 targetWeekId the target week ID
+ * @param start the lower bound of the range of homeworks
+ * @param end the upper bound of the range of homeworks (not inclusive)
+ * @return the range of matching homeworks
+ * @throws SystemException if a system exception occurred
+ */
+ public static java.util.List<com.pentila.entSavoie.cdt.model.Homework> findBytargetWeekId(
+ int targetWeekId, int start, int end)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().findBytargetWeekId(targetWeekId, start, end);
+ }
+
+ /**
+ * Returns an ordered range of all the homeworks where targetWeekId = ?.
+ *
+ * <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 targetWeekId the target week ID
+ * @param start the lower bound of the range of homeworks
+ * @param end the upper bound of the range of homeworks (not inclusive)
+ * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
+ * @return the ordered range of matching homeworks
+ * @throws SystemException if a system exception occurred
+ */
+ public static java.util.List<com.pentila.entSavoie.cdt.model.Homework> findBytargetWeekId(
+ int targetWeekId, int start, int end,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence()
+ .findBytargetWeekId(targetWeekId, start, end,
+ orderByComparator);
+ }
+
+ /**
+ * Returns the first homework in the ordered set where targetWeekId = ?.
+ *
+ * @param targetWeekId the target week ID
+ * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
+ * @return the first matching homework
+ * @throws com.pentila.entSavoie.cdt.NoSuchHomeworkException if a matching homework could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework findBytargetWeekId_First(
+ int targetWeekId,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ com.pentila.entSavoie.cdt.NoSuchHomeworkException {
+ return getPersistence()
+ .findBytargetWeekId_First(targetWeekId, orderByComparator);
+ }
+
+ /**
+ * Returns the first homework in the ordered set where targetWeekId = ?.
+ *
+ * @param targetWeekId the target week ID
+ * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
+ * @return the first matching homework, or <code>null</code> if a matching homework could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework fetchBytargetWeekId_First(
+ int targetWeekId,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence()
+ .fetchBytargetWeekId_First(targetWeekId, orderByComparator);
+ }
+
+ /**
+ * Returns the last homework in the ordered set where targetWeekId = ?.
+ *
+ * @param targetWeekId the target week ID
+ * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
+ * @return the last matching homework
+ * @throws com.pentila.entSavoie.cdt.NoSuchHomeworkException if a matching homework could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework findBytargetWeekId_Last(
+ int targetWeekId,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ com.pentila.entSavoie.cdt.NoSuchHomeworkException {
+ return getPersistence()
+ .findBytargetWeekId_Last(targetWeekId, orderByComparator);
+ }
+
+ /**
+ * Returns the last homework in the ordered set where targetWeekId = ?.
+ *
+ * @param targetWeekId the target week ID
+ * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
+ * @return the last matching homework, or <code>null</code> if a matching homework could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework fetchBytargetWeekId_Last(
+ int targetWeekId,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence()
+ .fetchBytargetWeekId_Last(targetWeekId, orderByComparator);
+ }
+
+ /**
+ * Returns the homeworks before and after the current homework in the ordered set where targetWeekId = ?.
+ *
+ * @param homeworkId the primary key of the current homework
+ * @param targetWeekId the target week ID
+ * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
+ * @return the previous, current, and next homework
+ * @throws com.pentila.entSavoie.cdt.NoSuchHomeworkException if a homework with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static com.pentila.entSavoie.cdt.model.Homework[] findBytargetWeekId_PrevAndNext(
+ long homeworkId, int targetWeekId,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ com.pentila.entSavoie.cdt.NoSuchHomeworkException {
+ return getPersistence()
+ .findBytargetWeekId_PrevAndNext(homeworkId, targetWeekId,
+ orderByComparator);
+ }
+
+ /**
+ * Returns all the homeworks.
+ *
+ * @return the homeworks
+ * @throws SystemException if a system exception occurred
+ */
+ public static java.util.List<com.pentila.entSavoie.cdt.model.Homework> findAll()
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().findAll();
+ }
+
+ /**
+ * Returns a range of all the homeworks.
+ *
+ * <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 homeworks
+ * @param end the upper bound of the range of homeworks (not inclusive)
+ * @return the range of homeworks
+ * @throws SystemException if a system exception occurred
+ */
+ public static java.util.List<com.pentila.entSavoie.cdt.model.Homework> findAll(
+ int start, int end)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().findAll(start, end);
+ }
+
+ /**
+ * Returns an ordered range of all the homeworks.
+ *
+ * <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 homeworks
+ * @param end the upper bound of the range of homeworks (not inclusive)
+ * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
+ * @return the ordered range of homeworks
+ * @throws SystemException if a system exception occurred
+ */
+ public static java.util.List<com.pentila.entSavoie.cdt.model.Homework> 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 homeworks where targetSessionId = ? from the database.
+ *
+ * @param targetSessionId the target session ID
+ * @throws SystemException if a system exception occurred
+ */
+ public static void removeBytargetSessionId(long targetSessionId)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ getPersistence().removeBytargetSessionId(targetSessionId);
+ }
+
+ /**
+ * Removes all the homeworks where sourceSessionId = ? from the database.
+ *
+ * @param sourceSessionId the source session ID
+ * @throws SystemException if a system exception occurred
+ */
+ public static void removeBysourceSessionId(long sourceSessionId)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ getPersistence().removeBysourceSessionId(sourceSessionId);
+ }
+
+ /**
+ * Removes all the homeworks where targetWeekId = ? from the database.
+ *
+ * @param targetWeekId the target week ID
+ * @throws SystemException if a system exception occurred
+ */
+ public static void removeBytargetWeekId(int targetWeekId)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ getPersistence().removeBytargetWeekId(targetWeekId);
+ }
+
+ /**
+ * Removes all the homeworks 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 homeworks where targetSessionId = ?.
+ *
+ * @param targetSessionId the target session ID
+ * @return the number of matching homeworks
+ * @throws SystemException if a system exception occurred
+ */
+ public static int countBytargetSessionId(long targetSessionId)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().countBytargetSessionId(targetSessionId);
+ }
+
+ /**
+ * Returns the number of homeworks where sourceSessionId = ?.
+ *
+ * @param sourceSessionId the source session ID
+ * @return the number of matching homeworks
+ * @throws SystemException if a system exception occurred
+ */
+ public static int countBysourceSessionId(long sourceSessionId)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().countBysourceSessionId(sourceSessionId);
+ }
+
+ /**
+ * Returns the number of homeworks where targetWeekId = ?.
+ *
+ * @param targetWeekId the target week ID
+ * @return the number of matching homeworks
+ * @throws SystemException if a system exception occurred
+ */
+ public static int countBytargetWeekId(int targetWeekId)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().countBytargetWeekId(targetWeekId);
+ }
+
+ /**
+ * Returns the number of homeworks.
+ *
+ * @return the number of homeworks
+ * @throws SystemException if a system exception occurred
+ */
+ public static int countAll()
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().countAll();
+ }
+
+ public static HomeworkPersistence getPersistence() {
+ if (_persistence == null) {
+ _persistence = (HomeworkPersistence)PortletBeanLocatorUtil.locate(com.pentila.entSavoie.cdt.service.ClpSerializer.getServletContextName(),
+ HomeworkPersistence.class.getName());
+
+ ReferenceRegistry.registerReference(HomeworkUtil.class,
+ "_persistence");
+ }
+
+ return _persistence;
+ }
+
+ /**
+ * @deprecated
+ */
+ public void setPersistence(HomeworkPersistence persistence) {
+ }
+
+ private static HomeworkPersistence _persistence;
+}
\ No newline at end of file