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