@ProviderType
public class UserSegmentLocalServiceUtil
extends java.lang.Object
com.liferay.content.targeting.service.impl.UserSegmentLocalServiceImpl 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.UserSegmentLocalService,
com.liferay.content.targeting.service.base.UserSegmentLocalServiceBaseImpl,
com.liferay.content.targeting.service.impl.UserSegmentLocalServiceImpl| Constructor and Description |
|---|
UserSegmentLocalServiceUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addCampaignUserSegment(long campaignId,
long userSegmentId) |
static void |
addCampaignUserSegment(long campaignId,
UserSegment userSegment) |
static void |
addCampaignUserSegments(long campaignId,
java.util.List<UserSegment> userSegments) |
static void |
addCampaignUserSegments(long campaignId,
long[] userSegmentIds) |
static void |
addTacticUserSegment(long tacticId,
long userSegmentId) |
static void |
addTacticUserSegment(long tacticId,
UserSegment userSegment) |
static void |
addTacticUserSegments(long tacticId,
java.util.List<UserSegment> userSegments) |
static void |
addTacticUserSegments(long tacticId,
long[] userSegmentIds) |
static UserSegment |
addUserSegment(long userId,
java.util.Map<java.util.Locale,java.lang.String> nameMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static UserSegment |
addUserSegment(UserSegment userSegment)
Adds the user segment to the database.
|
static void |
addUserSegmentResources(UserSegment userSegment,
boolean addGroupPermissions,
boolean addGuestPermissions) |
static void |
addUserSegmentResources(UserSegment userSegment,
java.lang.String[] groupPermissions,
java.lang.String[] guestPermissions) |
static void |
clearCampaignUserSegments(long campaignId) |
static void |
clearTacticUserSegments(long tacticId) |
static UserSegment |
createUserSegment(long userSegmentId)
Creates a new user segment with the primary key.
|
static void |
deleteCampaignUserSegment(long campaignId,
long userSegmentId) |
static void |
deleteCampaignUserSegment(long campaignId,
UserSegment userSegment) |
static void |
deleteCampaignUserSegments(long campaignId,
java.util.List<UserSegment> userSegments) |
static void |
deleteCampaignUserSegments(long campaignId,
long[] userSegmentIds) |
static com.liferay.portal.kernel.model.PersistedModel |
deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) |
static void |
deleteTacticUserSegment(long tacticId,
long userSegmentId) |
static void |
deleteTacticUserSegment(long tacticId,
UserSegment userSegment) |
static void |
deleteTacticUserSegments(long tacticId,
java.util.List<UserSegment> userSegments) |
static void |
deleteTacticUserSegments(long tacticId,
long[] userSegmentIds) |
static UserSegment |
deleteUserSegment(long userSegmentId)
Deletes the user segment with the primary key from the database.
|
static UserSegment |
deleteUserSegment(UserSegment userSegment)
Deletes the user segment from the database.
|
static void |
deleteUserSegments(long groupId) |
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 UserSegment |
fetchUserSegment(long userSegmentId) |
static UserSegment |
fetchUserSegmentByAssetCategoryId(long assetCategoryId) |
static UserSegment |
fetchUserSegmentByUuidAndGroupId(java.lang.String uuid,
long groupId)
Returns the user segment matching the UUID and group.
|
static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery |
getActionableDynamicQuery() |
static long[] |
getCampaignPrimaryKeys(long userSegmentId)
Returns the campaignIds of the campaigns associated with the user segment.
|
static java.util.List<UserSegment> |
getCampaignUserSegments(long campaignId) |
static java.util.List<UserSegment> |
getCampaignUserSegments(long campaignId,
int start,
int end) |
static java.util.List<UserSegment> |
getCampaignUserSegments(long campaignId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<UserSegment> orderByComparator) |
static int |
getCampaignUserSegmentsCount(long campaignId) |
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 UserSegmentLocalService |
getService() |
static long[] |
getTacticPrimaryKeys(long userSegmentId)
Returns the tacticIds of the tactics associated with the user segment.
|
static java.util.List<UserSegment> |
getTacticUserSegments(long tacticId) |
static java.util.List<UserSegment> |
getTacticUserSegments(long tacticId,
int start,
int end) |
static java.util.List<UserSegment> |
getTacticUserSegments(long tacticId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<UserSegment> orderByComparator) |
static int |
getTacticUserSegmentsCount(long tacticId) |
static UserSegment |
getUserSegment(long userSegmentId)
Returns the user segment with the primary key.
|
static UserSegment |
getUserSegmentByUuidAndGroupId(java.lang.String uuid,
long groupId)
Returns the user segment matching the UUID and group.
|
static java.util.List<UserSegment> |
getUserSegments(int start,
int end)
Returns a range of all the user segments.
|
static java.util.List<UserSegment> |
getUserSegments(long groupId) |
static java.util.List<UserSegment> |
getUserSegments(long[] groupIds) |
static java.util.List<UserSegment> |
getUserSegments(long[] groupIds,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc) |
static java.util.List<UserSegment> |
getUserSegments(long[] groupIds,
long userId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc) |
static java.util.List<UserSegment> |
getUserSegments(long groupId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc) |
static java.util.List<UserSegment> |
getUserSegments(long groupId,
long userId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc) |
static java.util.List<UserSegment> |
getUserSegmentsByUuidAndCompanyId(java.lang.String uuid,
long companyId)
Returns all the user segments matching the UUID and company.
|
static java.util.List<UserSegment> |
getUserSegmentsByUuidAndCompanyId(java.lang.String uuid,
long companyId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<UserSegment> orderByComparator)
Returns a range of user segments matching the UUID and company.
|
static int |
getUserSegmentsCount()
Returns the number of user segments.
|
static int |
getUserSegmentsCount(long groupId) |
static int |
getUserSegmentsCount(long[] groupIds) |
static boolean |
hasCampaignUserSegment(long campaignId,
long userSegmentId) |
static boolean |
hasCampaignUserSegments(long campaignId) |
static boolean |
hasTacticUserSegment(long tacticId,
long userSegmentId) |
static boolean |
hasTacticUserSegments(long tacticId) |
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<UserSegment> |
searchUserSegments(long groupId,
long userId,
java.lang.String keywords,
int start,
int end,
com.liferay.portal.kernel.search.Sort sort) |
static BaseModelSearchResult<UserSegment> |
searchUserSegments(long groupId,
java.lang.String keywords,
int start,
int end) |
static BaseModelSearchResult<UserSegment> |
searchUserSegments(long groupId,
java.lang.String keywords,
int start,
int end,
com.liferay.portal.kernel.search.Sort sort) |
static void |
setCampaignUserSegments(long campaignId,
long[] userSegmentIds) |
static void |
setTacticUserSegments(long tacticId,
long[] userSegmentIds) |
static UserSegment |
updateUserSegment(long userSegmentId,
java.util.Map<java.util.Locale,java.lang.String> nameMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static UserSegment |
updateUserSegment(UserSegment userSegment)
Updates the user segment in the database or adds it if it does not yet exist.
|
static void |
updateUserSegmentResources(UserSegment userSegment,
java.lang.String[] groupPermissions,
java.lang.String[] guestPermissions) |
public static void addCampaignUserSegment(long campaignId,
long userSegmentId)
public static void addCampaignUserSegment(long campaignId,
UserSegment userSegment)
public static void addCampaignUserSegments(long campaignId,
java.util.List<UserSegment> userSegments)
public static void addCampaignUserSegments(long campaignId,
long[] userSegmentIds)
public static void addTacticUserSegment(long tacticId,
long userSegmentId)
public static void addTacticUserSegment(long tacticId,
UserSegment userSegment)
public static void addTacticUserSegments(long tacticId,
java.util.List<UserSegment> userSegments)
public static void addTacticUserSegments(long tacticId,
long[] userSegmentIds)
public static UserSegment addUserSegment(long userId, java.util.Map<java.util.Locale,java.lang.String> nameMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static UserSegment addUserSegment(UserSegment userSegment)
userSegment - the user segmentpublic static void addUserSegmentResources(UserSegment userSegment, boolean addGroupPermissions, boolean addGuestPermissions) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static void addUserSegmentResources(UserSegment userSegment, java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static void clearCampaignUserSegments(long campaignId)
public static void clearTacticUserSegments(long tacticId)
public static UserSegment createUserSegment(long userSegmentId)
userSegmentId - the primary key for the new user segmentpublic static void deleteCampaignUserSegment(long campaignId,
long userSegmentId)
public static void deleteCampaignUserSegment(long campaignId,
UserSegment userSegment)
public static void deleteCampaignUserSegments(long campaignId,
java.util.List<UserSegment> userSegments)
public static void deleteCampaignUserSegments(long campaignId,
long[] userSegmentIds)
public 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 deleteTacticUserSegment(long tacticId,
long userSegmentId)
public static void deleteTacticUserSegment(long tacticId,
UserSegment userSegment)
public static void deleteTacticUserSegments(long tacticId,
java.util.List<UserSegment> userSegments)
public static void deleteTacticUserSegments(long tacticId,
long[] userSegmentIds)
public static UserSegment deleteUserSegment(long userSegmentId) throws com.liferay.portal.kernel.exception.PortalException
userSegmentId - the primary key of the user segmentPortalException - if a user segment with the primary key could not be foundpublic static UserSegment deleteUserSegment(UserSegment userSegment) throws com.liferay.portal.kernel.exception.PortalException
userSegment - the user segmentPortalExceptionpublic static void deleteUserSegments(long groupId)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic 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.UserSegmentModelImpl. 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.UserSegmentModelImpl. 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 UserSegment fetchUserSegment(long userSegmentId)
public static UserSegment fetchUserSegmentByAssetCategoryId(long assetCategoryId)
public static UserSegment fetchUserSegmentByUuidAndGroupId(java.lang.String uuid, long groupId)
uuid - the user segment's UUIDgroupId - the primary key of the groupnull if a matching user segment could not be foundpublic static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
public static long[] getCampaignPrimaryKeys(long userSegmentId)
userSegmentId - the userSegmentId of the user segmentpublic static java.util.List<UserSegment> getCampaignUserSegments(long campaignId)
public static java.util.List<UserSegment> getCampaignUserSegments(long campaignId, int start, int end)
public static java.util.List<UserSegment> getCampaignUserSegments(long campaignId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<UserSegment> orderByComparator)
public static int getCampaignUserSegmentsCount(long campaignId)
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 long[] getTacticPrimaryKeys(long userSegmentId)
userSegmentId - the userSegmentId of the user segmentpublic static java.util.List<UserSegment> getTacticUserSegments(long tacticId)
public static java.util.List<UserSegment> getTacticUserSegments(long tacticId, int start, int end)
public static java.util.List<UserSegment> getTacticUserSegments(long tacticId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<UserSegment> orderByComparator)
public static int getTacticUserSegmentsCount(long tacticId)
public static UserSegment getUserSegment(long userSegmentId) throws com.liferay.portal.kernel.exception.PortalException
userSegmentId - the primary key of the user segmentPortalException - if a user segment with the primary key could not be foundpublic static UserSegment getUserSegmentByUuidAndGroupId(java.lang.String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException
uuid - the user segment's UUIDgroupId - the primary key of the groupPortalException - if a matching user segment could not be foundpublic static java.util.List<UserSegment> getUserSegments(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.UserSegmentModelImpl. 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 user segmentsend - the upper bound of the range of user segments (not inclusive)public static java.util.List<UserSegment> getUserSegments(long groupId)
public static java.util.List<UserSegment> getUserSegments(long groupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
public static java.util.List<UserSegment> getUserSegments(long groupId, long userId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
public static java.util.List<UserSegment> getUserSegments(long[] groupIds)
public static java.util.List<UserSegment> getUserSegments(long[] groupIds, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
public static java.util.List<UserSegment> getUserSegments(long[] groupIds, long userId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
public static java.util.List<UserSegment> getUserSegmentsByUuidAndCompanyId(java.lang.String uuid, long companyId)
uuid - the UUID of the user segmentscompanyId - the primary key of the companypublic static java.util.List<UserSegment> getUserSegmentsByUuidAndCompanyId(java.lang.String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<UserSegment> orderByComparator)
uuid - the UUID of the user segmentscompanyId - the primary key of the companystart - the lower bound of the range of user segmentsend - the upper bound of the range of user segments (not inclusive)orderByComparator - the comparator to order the results by (optionally null)public static int getUserSegmentsCount()
public static int getUserSegmentsCount(long groupId)
public static int getUserSegmentsCount(long[] groupIds)
public static boolean hasCampaignUserSegment(long campaignId,
long userSegmentId)
public static boolean hasCampaignUserSegments(long campaignId)
public static boolean hasTacticUserSegment(long tacticId,
long userSegmentId)
public static boolean hasTacticUserSegments(long tacticId)
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<UserSegment> searchUserSegments(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<UserSegment> searchUserSegments(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<UserSegment> searchUserSegments(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 setCampaignUserSegments(long campaignId,
long[] userSegmentIds)
public static void setTacticUserSegments(long tacticId,
long[] userSegmentIds)
public static UserSegment updateUserSegment(long userSegmentId, java.util.Map<java.util.Locale,java.lang.String> nameMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static UserSegment updateUserSegment(UserSegment userSegment)
userSegment - the user segmentpublic static void updateUserSegmentResources(UserSegment userSegment, java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static UserSegmentLocalService getService()