/**
* 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.Slide;
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 slide service. This utility wraps {@link SlidePersistenceImpl} 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 SlidePersistence
* @see SlidePersistenceImpl
* @generated
*/
public class SlideUtil {
/*
* 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(Slide slide) {
getPersistence().clearCache(slide);
}
/**
* @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<Slide> findWithDynamicQuery(DynamicQuery dynamicQuery)
throws SystemException {
return getPersistence().findWithDynamicQuery(dynamicQuery);
}
/**
* @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
*/
public static List<Slide> 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<Slide> 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 Slide update(Slide slide, boolean merge)
throws SystemException {
return getPersistence().update(slide, merge);
}
/**
* @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
*/
public static Slide update(Slide slide, boolean merge,
ServiceContext serviceContext) throws SystemException {
return getPersistence().update(slide, merge, serviceContext);
}
/**
* Caches the slide in the entity cache if it is enabled.
*
* @param slide the slide
*/
public static void cacheResult(com.ese.ils.beta.model.Slide slide) {
getPersistence().cacheResult(slide);
}
/**
* Caches the slides in the entity cache if it is enabled.
*
* @param slides the slides
*/
public static void cacheResult(
java.util.List<com.ese.ils.beta.model.Slide> slides) {
getPersistence().cacheResult(slides);
}
/**
* Creates a new slide with the primary key. Does not add the slide to the database.
*
* @param slideId the primary key for the new slide
* @return the new slide
*/
public static com.ese.ils.beta.model.Slide create(long slideId) {
return getPersistence().create(slideId);
}
/**
* Removes the slide with the primary key from the database. Also notifies the appropriate model listeners.
*
* @param slideId the primary key of the slide
* @return the slide that was removed
* @throws com.ese.ils.beta.NoSuchSlideException if a slide with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Slide remove(long slideId)
throws com.ese.ils.beta.NoSuchSlideException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence().remove(slideId);
}
public static com.ese.ils.beta.model.Slide updateImpl(
com.ese.ils.beta.model.Slide slide, boolean merge)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().updateImpl(slide, merge);
}
/**
* Returns the slide with the primary key or throws a {@link com.ese.ils.beta.NoSuchSlideException} if it could not be found.
*
* @param slideId the primary key of the slide
* @return the slide
* @throws com.ese.ils.beta.NoSuchSlideException if a slide with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Slide findByPrimaryKey(long slideId)
throws com.ese.ils.beta.NoSuchSlideException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByPrimaryKey(slideId);
}
/**
* Returns the slide with the primary key or returns <code>null</code> if it could not be found.
*
* @param slideId the primary key of the slide
* @return the slide, or <code>null</code> if a slide with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Slide fetchByPrimaryKey(long slideId)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().fetchByPrimaryKey(slideId);
}
/**
* Returns all the slides where moduleId = ?.
*
* @param moduleId the module ID
* @return the matching slides
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Slide> findByByModule(
long moduleId)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByByModule(moduleId);
}
/**
* Returns a range of all the slides 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 slides
* @param end the upper bound of the range of slides (not inclusive)
* @return the range of matching slides
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Slide> findByByModule(
long moduleId, int start, int end)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByByModule(moduleId, start, end);
}
/**
* Returns an ordered range of all the slides 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 slides
* @param end the upper bound of the range of slides (not inclusive)
* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
* @return the ordered range of matching slides
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Slide> findByByModule(
long moduleId, int start, int end,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.findByByModule(moduleId, start, end, orderByComparator);
}
/**
* Returns the first slide 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 slide
* @throws com.ese.ils.beta.NoSuchSlideException if a matching slide could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Slide findByByModule_First(
long moduleId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.ese.ils.beta.NoSuchSlideException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByByModule_First(moduleId, orderByComparator);
}
/**
* Returns the first slide 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 slide, or <code>null</code> if a matching slide could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Slide fetchByByModule_First(
long moduleId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.fetchByByModule_First(moduleId, orderByComparator);
}
/**
* Returns the last slide 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 slide
* @throws com.ese.ils.beta.NoSuchSlideException if a matching slide could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Slide findByByModule_Last(
long moduleId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.ese.ils.beta.NoSuchSlideException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByByModule_Last(moduleId, orderByComparator);
}
/**
* Returns the last slide 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 slide, or <code>null</code> if a matching slide could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Slide fetchByByModule_Last(
long moduleId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().fetchByByModule_Last(moduleId, orderByComparator);
}
/**
* Returns the slides before and after the current slide in the ordered set where moduleId = ?.
*
* @param slideId the primary key of the current slide
* @param moduleId the module ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next slide
* @throws com.ese.ils.beta.NoSuchSlideException if a slide with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
public static com.ese.ils.beta.model.Slide[] findByByModule_PrevAndNext(
long slideId, long moduleId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.ese.ils.beta.NoSuchSlideException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence()
.findByByModule_PrevAndNext(slideId, moduleId,
orderByComparator);
}
/**
* Returns all the slides.
*
* @return the slides
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Slide> findAll()
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findAll();
}
/**
* Returns a range of all the slides.
*
* <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 slides
* @param end the upper bound of the range of slides (not inclusive)
* @return the range of slides
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Slide> findAll(
int start, int end)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findAll(start, end);
}
/**
* Returns an ordered range of all the slides.
*
* <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 slides
* @param end the upper bound of the range of slides (not inclusive)
* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
* @return the ordered range of slides
* @throws SystemException if a system exception occurred
*/
public static java.util.List<com.ese.ils.beta.model.Slide> 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 slides where moduleId = ? from the database.
*
* @param moduleId the module ID
* @throws SystemException if a system exception occurred
*/
public static void removeByByModule(long moduleId)
throws com.liferay.portal.kernel.exception.SystemException {
getPersistence().removeByByModule(moduleId);
}
/**
* Removes all the slides 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 slides where moduleId = ?.
*
* @param moduleId the module ID
* @return the number of matching slides
* @throws SystemException if a system exception occurred
*/
public static int countByByModule(long moduleId)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().countByByModule(moduleId);
}
/**
* Returns the number of slides.
*
* @return the number of slides
* @throws SystemException if a system exception occurred
*/
public static int countAll()
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().countAll();
}
public static SlidePersistence getPersistence() {
if (_persistence == null) {
_persistence = (SlidePersistence)PortletBeanLocatorUtil.locate(com.ese.ils.beta.service.ClpSerializer.getServletContextName(),
SlidePersistence.class.getName());
ReferenceRegistry.registerReference(SlideUtil.class, "_persistence");
}
return _persistence;
}
/**
* @deprecated
*/
public void setPersistence(SlidePersistence persistence) {
}
private static SlidePersistence _persistence;
}