@ProviderType
public class CampaignLocalServiceUtil
extends java.lang.Object
com.liferay.content.targeting.service.impl.CampaignLocalServiceImpl and is the
primary access point for service operations in application layer code running
on the local server. Methods of this service will not have security checks
based on the propagated JAAS credentials because this service can only be
accessed from within the same VM.CampaignLocalService,
com.liferay.content.targeting.service.base.CampaignLocalServiceBaseImpl,
com.liferay.content.targeting.service.impl.CampaignLocalServiceImpl| Constructor and Description |
|---|
CampaignLocalServiceUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Campaign |
addCampaign(Campaign campaign)
Adds the campaign to the database.
|
static Campaign |
addCampaign(long userId,
java.util.Map<java.util.Locale,java.lang.String> nameMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
java.util.Date startDate,
java.util.Date endDate,
int priority,
boolean active,
long[] userSegmentIds,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static Campaign |
addCampaign(long userId,
java.util.Map<java.util.Locale,java.lang.String> nameMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
java.util.Date startDate,
java.util.Date endDate,
java.lang.String timeZoneId,
int priority,
boolean active,
long[] userSegmentIds,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static void |
addCampaignResources(Campaign campaign,
boolean addGroupPermissions,
boolean addGuestPermissions) |
static void |
addCampaignResources(Campaign campaign,
java.lang.String[] groupPermissions,
java.lang.String[] guestPermissions) |
static void |
addUserSegmentCampaign(long userSegmentId,
Campaign campaign) |
static void |
addUserSegmentCampaign(long userSegmentId,
long campaignId) |
static void |
addUserSegmentCampaigns(long userSegmentId,
java.util.List<Campaign> campaigns) |
static void |
addUserSegmentCampaigns(long userSegmentId,
long[] campaignIds) |
static void |
clearUserSegmentCampaigns(long userSegmentId) |
static Campaign |
createCampaign(long campaignId)
Creates a new campaign with the primary key.
|
static Campaign |
deleteCampaign(Campaign campaign)
Deletes the campaign from the database.
|
static Campaign |
deleteCampaign(long campaignId)
Deletes the campaign with the primary key from the database.
|
static void |
deleteCampaigns(long groupId) |
static com.liferay.portal.kernel.model.PersistedModel |
deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) |
static void |
deleteUserSegmentCampaign(long userSegmentId,
Campaign campaign) |
static void |
deleteUserSegmentCampaign(long userSegmentId,
long campaignId) |
static void |
deleteUserSegmentCampaigns(long userSegmentId,
java.util.List<Campaign> campaigns) |
static void |
deleteUserSegmentCampaigns(long userSegmentId,
long[] campaignIds) |
static com.liferay.portal.kernel.dao.orm.DynamicQuery |
dynamicQuery() |
static <T> java.util.List<T> |
dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.
|
static <T> java.util.List<T> |
dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows.
|
static <T> java.util.List<T> |
dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows.
|
static long |
dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.
|
static long |
dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
com.liferay.portal.kernel.dao.orm.Projection projection)
Returns the number of rows matching the dynamic query.
|
static Campaign |
fetchCampaign(long campaignId) |
static Campaign |
fetchCampaignByUuidAndGroupId(java.lang.String uuid,
long groupId)
Returns the campaign matching the UUID and group.
|
static Campaign |
fetchCurrentMaxPriorityCampaign(long[] groupIds,
long[] userSegmentIds) |
static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery |
getActionableDynamicQuery() |
static Campaign |
getCampaign(long campaignId)
Returns the campaign with the primary key.
|
static Campaign |
getCampaignByUuidAndGroupId(java.lang.String uuid,
long groupId)
Returns the campaign matching the UUID and group.
|
static java.util.List<Campaign> |
getCampaigns(int start,
int end)
Returns a range of all the campaigns.
|
static java.util.List<Campaign> |
getCampaigns(long groupId) |
static java.util.List<Campaign> |
getCampaigns(long[] groupIds) |
static java.util.List<Campaign> |
getCampaigns(long[] groupIds,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc) |
static java.util.List<Campaign> |
getCampaigns(long[] groupIds,
long[] userSegmentIds) |
static java.util.List<Campaign> |
getCampaigns(long[] groupIds,
long userId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc) |
static java.util.List<Campaign> |
getCampaigns(long groupId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc) |
static java.util.List<Campaign> |
getCampaigns(long groupId,
long userId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc) |
static java.util.List<Campaign> |
getCampaignsByUuidAndCompanyId(java.lang.String uuid,
long companyId)
Returns all the campaigns matching the UUID and company.
|
static java.util.List<Campaign> |
getCampaignsByUuidAndCompanyId(java.lang.String uuid,
long companyId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<Campaign> orderByComparator)
Returns a range of campaigns matching the UUID and company.
|
static int |
getCampaignsCount()
Returns the number of campaigns.
|
static int |
getCampaignsCount(long groupId) |
static int |
getCampaignsCount(long[] groupIds) |
static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery |
getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) |
static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery |
getIndexableActionableDynamicQuery() |
static java.lang.String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
static com.liferay.portal.kernel.model.PersistedModel |
getPersistedModel(java.io.Serializable primaryKeyObj) |
static CampaignLocalService |
getService() |
static java.util.List<Campaign> |
getUserSegmentCampaigns(long userSegmentId) |
static java.util.List<Campaign> |
getUserSegmentCampaigns(long userSegmentId,
int start,
int end) |
static java.util.List<Campaign> |
getUserSegmentCampaigns(long userSegmentId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<Campaign> orderByComparator) |
static int |
getUserSegmentCampaignsCount(long userSegmentId) |
static long[] |
getUserSegmentPrimaryKeys(long campaignId)
Returns the userSegmentIds of the user segments associated with the campaign.
|
static boolean |
hasUserSegmentCampaign(long userSegmentId,
long campaignId) |
static boolean |
hasUserSegmentCampaigns(long userSegmentId) |
static com.liferay.portal.kernel.search.Hits |
search(long groupId,
java.lang.String keywords,
int start,
int end) |
static com.liferay.portal.kernel.search.Hits |
search(long groupId,
java.lang.String keywords,
int start,
int end,
com.liferay.portal.kernel.search.Sort sort) |
static BaseModelSearchResult<Campaign> |
searchCampaigns(long groupId,
long userId,
java.lang.String keywords,
int start,
int end,
com.liferay.portal.kernel.search.Sort sort) |
static BaseModelSearchResult<Campaign> |
searchCampaigns(long groupId,
java.lang.String keywords,
int start,
int end) |
static BaseModelSearchResult<Campaign> |
searchCampaigns(long groupId,
java.lang.String keywords,
int start,
int end,
com.liferay.portal.kernel.search.Sort sort) |
static void |
setUserSegmentCampaigns(long userSegmentId,
long[] campaignIds) |
static Campaign |
updateCampaign(Campaign campaign)
Updates the campaign in the database or adds it if it does not yet exist.
|
static Campaign |
updateCampaign(long campaignId,
java.util.Map<java.util.Locale,java.lang.String> nameMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
java.util.Date startDate,
java.util.Date endDate,
int priority,
boolean active,
long[] userSegmentIds,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static Campaign |
updateCampaign(long campaignId,
java.util.Map<java.util.Locale,java.lang.String> nameMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
java.util.Date startDate,
java.util.Date endDate,
java.lang.String timeZoneId,
int priority,
boolean active,
long[] userSegmentIds,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static void |
updateCampaignResources(Campaign campaign,
java.lang.String[] groupPermissions,
java.lang.String[] guestPermissions) |
public static Campaign addCampaign(Campaign campaign)
campaign - the campaignpublic static Campaign addCampaign(long userId, java.util.Map<java.util.Locale,java.lang.String> nameMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, java.util.Date startDate, java.util.Date endDate, int priority, boolean active, long[] userSegmentIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static Campaign addCampaign(long userId, java.util.Map<java.util.Locale,java.lang.String> nameMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, java.util.Date startDate, java.util.Date endDate, java.lang.String timeZoneId, int priority, boolean active, long[] userSegmentIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static void addCampaignResources(Campaign campaign, boolean addGroupPermissions, boolean addGuestPermissions) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static void addCampaignResources(Campaign campaign, java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static void addUserSegmentCampaign(long userSegmentId,
Campaign campaign)
public static void addUserSegmentCampaign(long userSegmentId,
long campaignId)
public static void addUserSegmentCampaigns(long userSegmentId,
java.util.List<Campaign> campaigns)
public static void addUserSegmentCampaigns(long userSegmentId,
long[] campaignIds)
public static void clearUserSegmentCampaigns(long userSegmentId)
public static Campaign createCampaign(long campaignId)
campaignId - the primary key for the new campaignpublic static Campaign deleteCampaign(Campaign campaign) throws com.liferay.portal.kernel.exception.PortalException
campaign - the campaignPortalExceptionpublic static Campaign deleteCampaign(long campaignId) throws com.liferay.portal.kernel.exception.PortalException
campaignId - the primary key of the campaignPortalException - if a campaign with the primary key could not be foundpublic static void deleteCampaigns(long groupId)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel)
throws com.liferay.portal.kernel.exception.PortalException
PortalExceptionpublic static void deleteUserSegmentCampaign(long userSegmentId,
Campaign campaign)
public static void deleteUserSegmentCampaign(long userSegmentId,
long campaignId)
public static void deleteUserSegmentCampaigns(long userSegmentId,
java.util.List<Campaign> campaigns)
public static void deleteUserSegmentCampaigns(long userSegmentId,
long[] campaignIds)
public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery()
public static <T> java.util.List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
dynamicQuery - the dynamic querypublic static <T> java.util.List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end)
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.content.targeting.model.impl.CampaignModelImpl. If both orderByComparator 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.
dynamicQuery - the dynamic querystart - the lower bound of the range of model instancesend - the upper bound of the range of model instances (not inclusive)public static <T> java.util.List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator)
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.content.targeting.model.impl.CampaignModelImpl. If both orderByComparator 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.
dynamicQuery - the dynamic querystart - the lower bound of the range of model instancesend - the upper bound of the range of model instances (not inclusive)orderByComparator - the comparator to order the results by (optionally null)public static long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
dynamicQuery - the dynamic querypublic static long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
com.liferay.portal.kernel.dao.orm.Projection projection)
dynamicQuery - the dynamic queryprojection - the projection to apply to the querypublic static Campaign fetchCampaign(long campaignId)
public static Campaign fetchCampaignByUuidAndGroupId(java.lang.String uuid, long groupId)
uuid - the campaign's UUIDgroupId - the primary key of the groupnull if a matching campaign could not be foundpublic static Campaign fetchCurrentMaxPriorityCampaign(long[] groupIds, long[] userSegmentIds)
public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
public static Campaign getCampaign(long campaignId) throws com.liferay.portal.kernel.exception.PortalException
campaignId - the primary key of the campaignPortalException - if a campaign with the primary key could not be foundpublic static Campaign getCampaignByUuidAndGroupId(java.lang.String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException
uuid - the campaign's UUIDgroupId - the primary key of the groupPortalException - if a matching campaign could not be foundpublic static java.util.List<Campaign> getCampaigns(int start, int end)
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.content.targeting.model.impl.CampaignModelImpl. If both orderByComparator 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.
start - the lower bound of the range of campaignsend - the upper bound of the range of campaigns (not inclusive)public static java.util.List<Campaign> getCampaigns(long groupId)
public static java.util.List<Campaign> getCampaigns(long groupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
public static java.util.List<Campaign> getCampaigns(long groupId, long userId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
public static java.util.List<Campaign> getCampaigns(long[] groupIds)
public static java.util.List<Campaign> getCampaigns(long[] groupIds, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
public static java.util.List<Campaign> getCampaigns(long[] groupIds, long userId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
public static java.util.List<Campaign> getCampaigns(long[] groupIds, long[] userSegmentIds)
public static java.util.List<Campaign> getCampaignsByUuidAndCompanyId(java.lang.String uuid, long companyId)
uuid - the UUID of the campaignscompanyId - the primary key of the companypublic static java.util.List<Campaign> getCampaignsByUuidAndCompanyId(java.lang.String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<Campaign> orderByComparator)
uuid - the UUID of the campaignscompanyId - the primary key of the companystart - the lower bound of the range of campaignsend - the upper bound of the range of campaigns (not inclusive)orderByComparator - the comparator to order the results by (optionally null)public static int getCampaignsCount()
public static int getCampaignsCount(long groupId)
public static int getCampaignsCount(long[] groupIds)
public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
public static java.lang.String getOSGiServiceIdentifier()
public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(java.io.Serializable primaryKeyObj)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static java.util.List<Campaign> getUserSegmentCampaigns(long userSegmentId)
public static java.util.List<Campaign> getUserSegmentCampaigns(long userSegmentId, int start, int end)
public static java.util.List<Campaign> getUserSegmentCampaigns(long userSegmentId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<Campaign> orderByComparator)
public static int getUserSegmentCampaignsCount(long userSegmentId)
public static long[] getUserSegmentPrimaryKeys(long campaignId)
campaignId - the campaignId of the campaignpublic static boolean hasUserSegmentCampaign(long userSegmentId,
long campaignId)
public static boolean hasUserSegmentCampaigns(long userSegmentId)
public static com.liferay.portal.kernel.search.Hits search(long groupId,
java.lang.String keywords,
int start,
int end)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static com.liferay.portal.kernel.search.Hits search(long groupId,
java.lang.String keywords,
int start,
int end,
com.liferay.portal.kernel.search.Sort sort)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static BaseModelSearchResult<Campaign> searchCampaigns(long groupId, long userId, java.lang.String keywords, int start, int end, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static BaseModelSearchResult<Campaign> searchCampaigns(long groupId, java.lang.String keywords, int start, int end) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static BaseModelSearchResult<Campaign> searchCampaigns(long groupId, java.lang.String keywords, int start, int end, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static void setUserSegmentCampaigns(long userSegmentId,
long[] campaignIds)
public static Campaign updateCampaign(Campaign campaign)
campaign - the campaignpublic static Campaign updateCampaign(long campaignId, java.util.Map<java.util.Locale,java.lang.String> nameMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, java.util.Date startDate, java.util.Date endDate, int priority, boolean active, long[] userSegmentIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static Campaign updateCampaign(long campaignId, java.util.Map<java.util.Locale,java.lang.String> nameMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, java.util.Date startDate, java.util.Date endDate, java.lang.String timeZoneId, int priority, boolean active, long[] userSegmentIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static void updateCampaignResources(Campaign campaign, java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static CampaignLocalService getService()