/** * Copyright (c) 2000-present 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.liferay.content.targeting.service.persistence; import com.liferay.content.targeting.model.Campaign; 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 campaign service. This utility wraps {@link CampaignPersistenceImpl} 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 Brian Wing Shun Chan * @see CampaignPersistence * @see CampaignPersistenceImpl * @generated */ public class CampaignUtil { /* * 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(Campaign campaign) { getPersistence().clearCache(campaign); } /** * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) */ public static long countWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException { return getPersistence().countWithDynamicQuery(dynamicQuery); } /** * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) */ public static List<Campaign> findWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException { return getPersistence().findWithDynamicQuery(dynamicQuery); } /** * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) */ public static List<Campaign> 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<Campaign> 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) */ public static Campaign update(Campaign campaign) throws SystemException { return getPersistence().update(campaign); } /** * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) */ public static Campaign update(Campaign campaign, ServiceContext serviceContext) throws SystemException { return getPersistence().update(campaign, serviceContext); } /** * Returns all the campaigns where uuid = ?. * * @param uuid the uuid * @return the matching campaigns * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> findByUuid( java.lang.String uuid) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByUuid(uuid); } /** * Returns a range of all the campaigns where uuid = ?. * * <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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.content.targeting.model.impl.CampaignModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. * </p> * * @param uuid the uuid * @param start the lower bound of the range of campaigns * @param end the upper bound of the range of campaigns (not inclusive) * @return the range of matching campaigns * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> findByUuid( java.lang.String uuid, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByUuid(uuid, start, end); } /** * Returns an ordered range of all the campaigns where uuid = ?. * * <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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.content.targeting.model.impl.CampaignModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. * </p> * * @param uuid the uuid * @param start the lower bound of the range of campaigns * @param end the upper bound of the range of campaigns (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching campaigns * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> findByUuid( java.lang.String uuid, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByUuid(uuid, start, end, orderByComparator); } /** * Returns the first campaign in the ordered set where uuid = ?. * * @param uuid the uuid * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching campaign * @throws com.liferay.content.targeting.NoSuchCampaignException if a matching campaign could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign findByUuid_First( java.lang.String uuid, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.content.targeting.NoSuchCampaignException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByUuid_First(uuid, orderByComparator); } /** * Returns the first campaign in the ordered set where uuid = ?. * * @param uuid the uuid * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching campaign, or <code>null</code> if a matching campaign could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign fetchByUuid_First( java.lang.String uuid, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().fetchByUuid_First(uuid, orderByComparator); } /** * Returns the last campaign in the ordered set where uuid = ?. * * @param uuid the uuid * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching campaign * @throws com.liferay.content.targeting.NoSuchCampaignException if a matching campaign could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign findByUuid_Last( java.lang.String uuid, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.content.targeting.NoSuchCampaignException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByUuid_Last(uuid, orderByComparator); } /** * Returns the last campaign in the ordered set where uuid = ?. * * @param uuid the uuid * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching campaign, or <code>null</code> if a matching campaign could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign fetchByUuid_Last( java.lang.String uuid, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().fetchByUuid_Last(uuid, orderByComparator); } /** * Returns the campaigns before and after the current campaign in the ordered set where uuid = ?. * * @param campaignId the primary key of the current campaign * @param uuid the uuid * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the previous, current, and next campaign * @throws com.liferay.content.targeting.NoSuchCampaignException if a campaign with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign[] findByUuid_PrevAndNext( long campaignId, java.lang.String uuid, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.content.targeting.NoSuchCampaignException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByUuid_PrevAndNext(campaignId, uuid, orderByComparator); } /** * Removes all the campaigns where uuid = ? from the database. * * @param uuid the uuid * @throws SystemException if a system exception occurred */ public static void removeByUuid(java.lang.String uuid) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().removeByUuid(uuid); } /** * Returns the number of campaigns where uuid = ?. * * @param uuid the uuid * @return the number of matching campaigns * @throws SystemException if a system exception occurred */ public static int countByUuid(java.lang.String uuid) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().countByUuid(uuid); } /** * Returns the campaign where uuid = ? and groupId = ? or throws a {@link com.liferay.content.targeting.NoSuchCampaignException} if it could not be found. * * @param uuid the uuid * @param groupId the group ID * @return the matching campaign * @throws com.liferay.content.targeting.NoSuchCampaignException if a matching campaign could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign findByUUID_G( java.lang.String uuid, long groupId) throws com.liferay.content.targeting.NoSuchCampaignException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByUUID_G(uuid, groupId); } /** * Returns the campaign where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. * * @param uuid the uuid * @param groupId the group ID * @return the matching campaign, or <code>null</code> if a matching campaign could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign fetchByUUID_G( java.lang.String uuid, long groupId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().fetchByUUID_G(uuid, groupId); } /** * Returns the campaign where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. * * @param uuid the uuid * @param groupId the group ID * @param retrieveFromCache whether to use the finder cache * @return the matching campaign, or <code>null</code> if a matching campaign could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign fetchByUUID_G( java.lang.String uuid, long groupId, boolean retrieveFromCache) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); } /** * Removes the campaign where uuid = ? and groupId = ? from the database. * * @param uuid the uuid * @param groupId the group ID * @return the campaign that was removed * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign removeByUUID_G( java.lang.String uuid, long groupId) throws com.liferay.content.targeting.NoSuchCampaignException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().removeByUUID_G(uuid, groupId); } /** * Returns the number of campaigns where uuid = ? and groupId = ?. * * @param uuid the uuid * @param groupId the group ID * @return the number of matching campaigns * @throws SystemException if a system exception occurred */ public static int countByUUID_G(java.lang.String uuid, long groupId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().countByUUID_G(uuid, groupId); } /** * Returns all the campaigns where uuid = ? and companyId = ?. * * @param uuid the uuid * @param companyId the company ID * @return the matching campaigns * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> findByUuid_C( java.lang.String uuid, long companyId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByUuid_C(uuid, companyId); } /** * Returns a range of all the campaigns where uuid = ? and companyId = ?. * * <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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.content.targeting.model.impl.CampaignModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. * </p> * * @param uuid the uuid * @param companyId the company ID * @param start the lower bound of the range of campaigns * @param end the upper bound of the range of campaigns (not inclusive) * @return the range of matching campaigns * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> findByUuid_C( java.lang.String uuid, long companyId, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByUuid_C(uuid, companyId, start, end); } /** * Returns an ordered range of all the campaigns where uuid = ? and companyId = ?. * * <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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.content.targeting.model.impl.CampaignModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. * </p> * * @param uuid the uuid * @param companyId the company ID * @param start the lower bound of the range of campaigns * @param end the upper bound of the range of campaigns (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching campaigns * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> findByUuid_C( java.lang.String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByUuid_C(uuid, companyId, start, end, orderByComparator); } /** * Returns the first campaign in the ordered set where uuid = ? and companyId = ?. * * @param uuid the uuid * @param companyId the company ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching campaign * @throws com.liferay.content.targeting.NoSuchCampaignException if a matching campaign could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign findByUuid_C_First( java.lang.String uuid, long companyId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.content.targeting.NoSuchCampaignException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByUuid_C_First(uuid, companyId, orderByComparator); } /** * Returns the first campaign in the ordered set where uuid = ? and companyId = ?. * * @param uuid the uuid * @param companyId the company ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching campaign, or <code>null</code> if a matching campaign could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign fetchByUuid_C_First( java.lang.String uuid, long companyId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByUuid_C_First(uuid, companyId, orderByComparator); } /** * Returns the last campaign in the ordered set where uuid = ? and companyId = ?. * * @param uuid the uuid * @param companyId the company ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching campaign * @throws com.liferay.content.targeting.NoSuchCampaignException if a matching campaign could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign findByUuid_C_Last( java.lang.String uuid, long companyId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.content.targeting.NoSuchCampaignException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByUuid_C_Last(uuid, companyId, orderByComparator); } /** * Returns the last campaign in the ordered set where uuid = ? and companyId = ?. * * @param uuid the uuid * @param companyId the company ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching campaign, or <code>null</code> if a matching campaign could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign fetchByUuid_C_Last( java.lang.String uuid, long companyId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByUuid_C_Last(uuid, companyId, orderByComparator); } /** * Returns the campaigns before and after the current campaign in the ordered set where uuid = ? and companyId = ?. * * @param campaignId the primary key of the current campaign * @param uuid the uuid * @param companyId the company ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the previous, current, and next campaign * @throws com.liferay.content.targeting.NoSuchCampaignException if a campaign with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign[] findByUuid_C_PrevAndNext( long campaignId, java.lang.String uuid, long companyId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.content.targeting.NoSuchCampaignException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByUuid_C_PrevAndNext(campaignId, uuid, companyId, orderByComparator); } /** * Removes all the campaigns where uuid = ? and companyId = ? from the database. * * @param uuid the uuid * @param companyId the company ID * @throws SystemException if a system exception occurred */ public static void removeByUuid_C(java.lang.String uuid, long companyId) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().removeByUuid_C(uuid, companyId); } /** * Returns the number of campaigns where uuid = ? and companyId = ?. * * @param uuid the uuid * @param companyId the company ID * @return the number of matching campaigns * @throws SystemException if a system exception occurred */ public static int countByUuid_C(java.lang.String uuid, long companyId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().countByUuid_C(uuid, companyId); } /** * Returns all the campaigns where groupId = ?. * * @param groupId the group ID * @return the matching campaigns * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> findByGroupId( long groupId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByGroupId(groupId); } /** * Returns a range of all the campaigns where groupId = ?. * * <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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.content.targeting.model.impl.CampaignModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. * </p> * * @param groupId the group ID * @param start the lower bound of the range of campaigns * @param end the upper bound of the range of campaigns (not inclusive) * @return the range of matching campaigns * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> findByGroupId( long groupId, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByGroupId(groupId, start, end); } /** * Returns an ordered range of all the campaigns where groupId = ?. * * <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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.content.targeting.model.impl.CampaignModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. * </p> * * @param groupId the group ID * @param start the lower bound of the range of campaigns * @param end the upper bound of the range of campaigns (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching campaigns * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> findByGroupId( long groupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByGroupId(groupId, start, end, orderByComparator); } /** * Returns the first campaign in the ordered set where groupId = ?. * * @param groupId the group ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching campaign * @throws com.liferay.content.targeting.NoSuchCampaignException if a matching campaign could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign findByGroupId_First( long groupId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.content.targeting.NoSuchCampaignException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByGroupId_First(groupId, orderByComparator); } /** * Returns the first campaign in the ordered set where groupId = ?. * * @param groupId the group ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching campaign, or <code>null</code> if a matching campaign could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign fetchByGroupId_First( long groupId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().fetchByGroupId_First(groupId, orderByComparator); } /** * Returns the last campaign in the ordered set where groupId = ?. * * @param groupId the group ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching campaign * @throws com.liferay.content.targeting.NoSuchCampaignException if a matching campaign could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign findByGroupId_Last( long groupId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.content.targeting.NoSuchCampaignException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByGroupId_Last(groupId, orderByComparator); } /** * Returns the last campaign in the ordered set where groupId = ?. * * @param groupId the group ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching campaign, or <code>null</code> if a matching campaign could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign fetchByGroupId_Last( long groupId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); } /** * Returns the campaigns before and after the current campaign in the ordered set where groupId = ?. * * @param campaignId the primary key of the current campaign * @param groupId the group ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the previous, current, and next campaign * @throws com.liferay.content.targeting.NoSuchCampaignException if a campaign with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign[] findByGroupId_PrevAndNext( long campaignId, long groupId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.content.targeting.NoSuchCampaignException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByGroupId_PrevAndNext(campaignId, groupId, orderByComparator); } /** * Returns all the campaigns that the user has permission to view where groupId = ?. * * @param groupId the group ID * @return the matching campaigns that the user has permission to view * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> filterFindByGroupId( long groupId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().filterFindByGroupId(groupId); } /** * Returns a range of all the campaigns that the user has permission to view where groupId = ?. * * <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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.content.targeting.model.impl.CampaignModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. * </p> * * @param groupId the group ID * @param start the lower bound of the range of campaigns * @param end the upper bound of the range of campaigns (not inclusive) * @return the range of matching campaigns that the user has permission to view * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> filterFindByGroupId( long groupId, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().filterFindByGroupId(groupId, start, end); } /** * Returns an ordered range of all the campaigns that the user has permissions to view where groupId = ?. * * <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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.content.targeting.model.impl.CampaignModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. * </p> * * @param groupId the group ID * @param start the lower bound of the range of campaigns * @param end the upper bound of the range of campaigns (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching campaigns that the user has permission to view * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> filterFindByGroupId( long groupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .filterFindByGroupId(groupId, start, end, orderByComparator); } /** * Returns the campaigns before and after the current campaign in the ordered set of campaigns that the user has permission to view where groupId = ?. * * @param campaignId the primary key of the current campaign * @param groupId the group ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the previous, current, and next campaign * @throws com.liferay.content.targeting.NoSuchCampaignException if a campaign with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign[] filterFindByGroupId_PrevAndNext( long campaignId, long groupId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.content.targeting.NoSuchCampaignException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .filterFindByGroupId_PrevAndNext(campaignId, groupId, orderByComparator); } /** * Returns all the campaigns that the user has permission to view where groupId = any ?. * * @param groupIds the group IDs * @return the matching campaigns that the user has permission to view * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> filterFindByGroupId( long[] groupIds) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().filterFindByGroupId(groupIds); } /** * Returns a range of all the campaigns that the user has permission to view where groupId = any ?. * * <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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.content.targeting.model.impl.CampaignModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. * </p> * * @param groupIds the group IDs * @param start the lower bound of the range of campaigns * @param end the upper bound of the range of campaigns (not inclusive) * @return the range of matching campaigns that the user has permission to view * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> filterFindByGroupId( long[] groupIds, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().filterFindByGroupId(groupIds, start, end); } /** * Returns an ordered range of all the campaigns that the user has permission to view where groupId = any ?. * * <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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.content.targeting.model.impl.CampaignModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. * </p> * * @param groupIds the group IDs * @param start the lower bound of the range of campaigns * @param end the upper bound of the range of campaigns (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching campaigns that the user has permission to view * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> filterFindByGroupId( long[] groupIds, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .filterFindByGroupId(groupIds, start, end, orderByComparator); } /** * Returns all the campaigns where groupId = any ?. * * <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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.content.targeting.model.impl.CampaignModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. * </p> * * @param groupIds the group IDs * @return the matching campaigns * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> findByGroupId( long[] groupIds) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByGroupId(groupIds); } /** * Returns a range of all the campaigns where groupId = any ?. * * <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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.content.targeting.model.impl.CampaignModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. * </p> * * @param groupIds the group IDs * @param start the lower bound of the range of campaigns * @param end the upper bound of the range of campaigns (not inclusive) * @return the range of matching campaigns * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> findByGroupId( long[] groupIds, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByGroupId(groupIds, start, end); } /** * Returns an ordered range of all the campaigns where groupId = any ?. * * <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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.content.targeting.model.impl.CampaignModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. * </p> * * @param groupIds the group IDs * @param start the lower bound of the range of campaigns * @param end the upper bound of the range of campaigns (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching campaigns * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> findByGroupId( long[] groupIds, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByGroupId(groupIds, start, end, orderByComparator); } /** * Removes all the campaigns where groupId = ? from the database. * * @param groupId the group ID * @throws SystemException if a system exception occurred */ public static void removeByGroupId(long groupId) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().removeByGroupId(groupId); } /** * Returns the number of campaigns where groupId = ?. * * @param groupId the group ID * @return the number of matching campaigns * @throws SystemException if a system exception occurred */ public static int countByGroupId(long groupId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().countByGroupId(groupId); } /** * Returns the number of campaigns where groupId = any ?. * * @param groupIds the group IDs * @return the number of matching campaigns * @throws SystemException if a system exception occurred */ public static int countByGroupId(long[] groupIds) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().countByGroupId(groupIds); } /** * Returns the number of campaigns that the user has permission to view where groupId = ?. * * @param groupId the group ID * @return the number of matching campaigns that the user has permission to view * @throws SystemException if a system exception occurred */ public static int filterCountByGroupId(long groupId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().filterCountByGroupId(groupId); } /** * Returns the number of campaigns that the user has permission to view where groupId = any ?. * * @param groupIds the group IDs * @return the number of matching campaigns that the user has permission to view * @throws SystemException if a system exception occurred */ public static int filterCountByGroupId(long[] groupIds) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().filterCountByGroupId(groupIds); } /** * Caches the campaign in the entity cache if it is enabled. * * @param campaign the campaign */ public static void cacheResult( com.liferay.content.targeting.model.Campaign campaign) { getPersistence().cacheResult(campaign); } /** * Caches the campaigns in the entity cache if it is enabled. * * @param campaigns the campaigns */ public static void cacheResult( java.util.List<com.liferay.content.targeting.model.Campaign> campaigns) { getPersistence().cacheResult(campaigns); } /** * Creates a new campaign with the primary key. Does not add the campaign to the database. * * @param campaignId the primary key for the new campaign * @return the new campaign */ public static com.liferay.content.targeting.model.Campaign create( long campaignId) { return getPersistence().create(campaignId); } /** * Removes the campaign with the primary key from the database. Also notifies the appropriate model listeners. * * @param campaignId the primary key of the campaign * @return the campaign that was removed * @throws com.liferay.content.targeting.NoSuchCampaignException if a campaign with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign remove( long campaignId) throws com.liferay.content.targeting.NoSuchCampaignException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().remove(campaignId); } public static com.liferay.content.targeting.model.Campaign updateImpl( com.liferay.content.targeting.model.Campaign campaign) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().updateImpl(campaign); } /** * Returns the campaign with the primary key or throws a {@link com.liferay.content.targeting.NoSuchCampaignException} if it could not be found. * * @param campaignId the primary key of the campaign * @return the campaign * @throws com.liferay.content.targeting.NoSuchCampaignException if a campaign with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign findByPrimaryKey( long campaignId) throws com.liferay.content.targeting.NoSuchCampaignException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByPrimaryKey(campaignId); } /** * Returns the campaign with the primary key or returns <code>null</code> if it could not be found. * * @param campaignId the primary key of the campaign * @return the campaign, or <code>null</code> if a campaign with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.content.targeting.model.Campaign fetchByPrimaryKey( long campaignId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().fetchByPrimaryKey(campaignId); } /** * Returns all the campaigns. * * @return the campaigns * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> findAll() throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findAll(); } /** * Returns a range of all the campaigns. * * <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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.content.targeting.model.impl.CampaignModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. * </p> * * @param start the lower bound of the range of campaigns * @param end the upper bound of the range of campaigns (not inclusive) * @return the range of campaigns * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> findAll( int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findAll(start, end); } /** * Returns an ordered range of all the campaigns. * * <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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.content.targeting.model.impl.CampaignModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. * </p> * * @param start the lower bound of the range of campaigns * @param end the upper bound of the range of campaigns (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of campaigns * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.Campaign> 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 campaigns 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 campaigns. * * @return the number of campaigns * @throws SystemException if a system exception occurred */ public static int countAll() throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().countAll(); } /** * Returns all the user segments associated with the campaign. * * @param pk the primary key of the campaign * @return the user segments associated with the campaign * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.UserSegment> getUserSegments( long pk) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().getUserSegments(pk); } /** * Returns a range of all the user segments associated with the campaign. * * <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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.content.targeting.model.impl.CampaignModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. * </p> * * @param pk the primary key of the campaign * @param start the lower bound of the range of campaigns * @param end the upper bound of the range of campaigns (not inclusive) * @return the range of user segments associated with the campaign * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.UserSegment> getUserSegments( long pk, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().getUserSegments(pk, start, end); } /** * Returns an ordered range of all the user segments associated with the campaign. * * <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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.content.targeting.model.impl.CampaignModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. * </p> * * @param pk the primary key of the campaign * @param start the lower bound of the range of campaigns * @param end the upper bound of the range of campaigns (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of user segments associated with the campaign * @throws SystemException if a system exception occurred */ public static java.util.List<com.liferay.content.targeting.model.UserSegment> getUserSegments( long pk, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .getUserSegments(pk, start, end, orderByComparator); } /** * Returns the number of user segments associated with the campaign. * * @param pk the primary key of the campaign * @return the number of user segments associated with the campaign * @throws SystemException if a system exception occurred */ public static int getUserSegmentsSize(long pk) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().getUserSegmentsSize(pk); } /** * Returns <code>true</code> if the user segment is associated with the campaign. * * @param pk the primary key of the campaign * @param userSegmentPK the primary key of the user segment * @return <code>true</code> if the user segment is associated with the campaign; <code>false</code> otherwise * @throws SystemException if a system exception occurred */ public static boolean containsUserSegment(long pk, long userSegmentPK) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().containsUserSegment(pk, userSegmentPK); } /** * Returns <code>true</code> if the campaign has any user segments associated with it. * * @param pk the primary key of the campaign to check for associations with user segments * @return <code>true</code> if the campaign has any user segments associated with it; <code>false</code> otherwise * @throws SystemException if a system exception occurred */ public static boolean containsUserSegments(long pk) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().containsUserSegments(pk); } /** * Adds an association between the campaign and the user segment. Also notifies the appropriate model listeners and clears the mapping table finder cache. * * @param pk the primary key of the campaign * @param userSegmentPK the primary key of the user segment * @throws SystemException if a system exception occurred */ public static void addUserSegment(long pk, long userSegmentPK) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().addUserSegment(pk, userSegmentPK); } /** * Adds an association between the campaign and the user segment. Also notifies the appropriate model listeners and clears the mapping table finder cache. * * @param pk the primary key of the campaign * @param userSegment the user segment * @throws SystemException if a system exception occurred */ public static void addUserSegment(long pk, com.liferay.content.targeting.model.UserSegment userSegment) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().addUserSegment(pk, userSegment); } /** * Adds an association between the campaign and the user segments. Also notifies the appropriate model listeners and clears the mapping table finder cache. * * @param pk the primary key of the campaign * @param userSegmentPKs the primary keys of the user segments * @throws SystemException if a system exception occurred */ public static void addUserSegments(long pk, long[] userSegmentPKs) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().addUserSegments(pk, userSegmentPKs); } /** * Adds an association between the campaign and the user segments. Also notifies the appropriate model listeners and clears the mapping table finder cache. * * @param pk the primary key of the campaign * @param userSegments the user segments * @throws SystemException if a system exception occurred */ public static void addUserSegments(long pk, java.util.List<com.liferay.content.targeting.model.UserSegment> userSegments) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().addUserSegments(pk, userSegments); } /** * Clears all associations between the campaign and its user segments. Also notifies the appropriate model listeners and clears the mapping table finder cache. * * @param pk the primary key of the campaign to clear the associated user segments from * @throws SystemException if a system exception occurred */ public static void clearUserSegments(long pk) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().clearUserSegments(pk); } /** * Removes the association between the campaign and the user segment. Also notifies the appropriate model listeners and clears the mapping table finder cache. * * @param pk the primary key of the campaign * @param userSegmentPK the primary key of the user segment * @throws SystemException if a system exception occurred */ public static void removeUserSegment(long pk, long userSegmentPK) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().removeUserSegment(pk, userSegmentPK); } /** * Removes the association between the campaign and the user segment. Also notifies the appropriate model listeners and clears the mapping table finder cache. * * @param pk the primary key of the campaign * @param userSegment the user segment * @throws SystemException if a system exception occurred */ public static void removeUserSegment(long pk, com.liferay.content.targeting.model.UserSegment userSegment) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().removeUserSegment(pk, userSegment); } /** * Removes the association between the campaign and the user segments. Also notifies the appropriate model listeners and clears the mapping table finder cache. * * @param pk the primary key of the campaign * @param userSegmentPKs the primary keys of the user segments * @throws SystemException if a system exception occurred */ public static void removeUserSegments(long pk, long[] userSegmentPKs) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().removeUserSegments(pk, userSegmentPKs); } /** * Removes the association between the campaign and the user segments. Also notifies the appropriate model listeners and clears the mapping table finder cache. * * @param pk the primary key of the campaign * @param userSegments the user segments * @throws SystemException if a system exception occurred */ public static void removeUserSegments(long pk, java.util.List<com.liferay.content.targeting.model.UserSegment> userSegments) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().removeUserSegments(pk, userSegments); } /** * Sets the user segments associated with the campaign, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. * * @param pk the primary key of the campaign * @param userSegmentPKs the primary keys of the user segments to be associated with the campaign * @throws SystemException if a system exception occurred */ public static void setUserSegments(long pk, long[] userSegmentPKs) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().setUserSegments(pk, userSegmentPKs); } /** * Sets the user segments associated with the campaign, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. * * @param pk the primary key of the campaign * @param userSegments the user segments to be associated with the campaign * @throws SystemException if a system exception occurred */ public static void setUserSegments(long pk, java.util.List<com.liferay.content.targeting.model.UserSegment> userSegments) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().setUserSegments(pk, userSegments); } public static CampaignPersistence getPersistence() { if (_persistence == null) { _persistence = (CampaignPersistence)PortletBeanLocatorUtil.locate(com.liferay.content.targeting.service.ClpSerializer.getServletContextName(), CampaignPersistence.class.getName()); ReferenceRegistry.registerReference(CampaignUtil.class, "_persistence"); } return _persistence; } /** * @deprecated As of 6.2.0 */ public void setPersistence(CampaignPersistence persistence) { } private static CampaignPersistence _persistence; }