@ProviderType
public class UserThreadLocalServiceUtil
extends java.lang.Object
com.liferay.social.privatemessaging.service.impl.UserThreadLocalServiceImpl 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.UserThreadLocalService,
com.liferay.social.privatemessaging.service.base.UserThreadLocalServiceBaseImpl,
com.liferay.social.privatemessaging.service.impl.UserThreadLocalServiceImpl| Constructor and Description |
|---|
UserThreadLocalServiceUtil() |
| Modifier and Type | Method and Description |
|---|---|
static com.liferay.message.boards.kernel.model.MBMessage |
addPrivateMessage(long userId,
long mbThreadId,
java.lang.String to,
java.lang.String subject,
java.lang.String body,
java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String,java.io.InputStream>> inputStreamOVPs,
com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) |
static com.liferay.message.boards.kernel.model.MBMessage |
addPrivateMessageBranch(long userId,
long parentMBMessageId,
java.lang.String body,
java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String,java.io.InputStream>> inputStreamOVPs,
com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) |
static void |
addUserThread(long userId,
long mbThreadId,
long topMBMessageId,
boolean read,
boolean deleted) |
static UserThread |
addUserThread(UserThread userThread)
Adds the user thread to the database.
|
static UserThread |
createUserThread(long userThreadId)
Creates a new user thread with the primary key.
|
static com.liferay.portal.kernel.model.PersistedModel |
deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) |
static void |
deleteUser(long userId) |
static UserThread |
deleteUserThread(long userThreadId)
Deletes the user thread with the primary key from the database.
|
static void |
deleteUserThread(long userId,
long mbThreadId) |
static UserThread |
deleteUserThread(UserThread userThread)
Deletes the user thread from the database.
|
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 UserThread |
fetchUserThread(long userThreadId) |
static UserThread |
fetchUserThread(long userId,
long mbThreadId) |
static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery |
getActionableDynamicQuery() |
static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery |
getIndexableActionableDynamicQuery() |
static java.util.List<UserThread> |
getMBThreadUserThreads(long mbThreadId) |
static java.lang.String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
static com.liferay.portal.kernel.model.PersistedModel |
getPersistedModel(java.io.Serializable primaryKeyObj) |
static UserThreadLocalService |
getService() |
static UserThread |
getUserThread(long userThreadId)
Returns the user thread with the primary key.
|
static UserThread |
getUserThread(long userId,
long mbThreadId) |
static java.util.List<UserThread> |
getUserThreads(int start,
int end)
Returns a range of all the user threads.
|
static int |
getUserThreadsCount()
Returns the number of user threads.
|
static int |
getUserUserThreadCount(long userId,
boolean deleted) |
static int |
getUserUserThreadCount(long userId,
boolean read,
boolean deleted) |
static java.util.List<UserThread> |
getUserUserThreads(long userId,
boolean deleted) |
static java.util.List<UserThread> |
getUserUserThreads(long userId,
boolean read,
boolean deleted) |
static java.util.List<UserThread> |
getUserUserThreads(long userId,
boolean deleted,
int start,
int end) |
static void |
markUserThreadAsRead(long userId,
long mbThreadId) |
static void |
markUserThreadAsUnread(long userId,
long mbThreadId) |
static void |
updateUserName(com.liferay.portal.kernel.model.User user) |
static UserThread |
updateUserThread(UserThread userThread)
Updates the user thread in the database or adds it if it does not yet exist.
|
public static com.liferay.message.boards.kernel.model.MBMessage addPrivateMessage(long userId,
long mbThreadId,
java.lang.String to,
java.lang.String subject,
java.lang.String body,
java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String,java.io.InputStream>> inputStreamOVPs,
com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static com.liferay.message.boards.kernel.model.MBMessage addPrivateMessageBranch(long userId,
long parentMBMessageId,
java.lang.String body,
java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String,java.io.InputStream>> inputStreamOVPs,
com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static void addUserThread(long userId,
long mbThreadId,
long topMBMessageId,
boolean read,
boolean deleted)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static UserThread addUserThread(UserThread userThread)
userThread - the user threadpublic static UserThread createUserThread(long userThreadId)
userThreadId - the primary key for the new user threadpublic 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 deleteUser(long userId)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static void deleteUserThread(long userId,
long mbThreadId)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static UserThread deleteUserThread(UserThread userThread)
userThread - the user threadpublic static UserThread deleteUserThread(long userThreadId) throws com.liferay.portal.kernel.exception.PortalException
userThreadId - the primary key of the user threadPortalException - if a user thread with the primary key could not be foundpublic 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.social.privatemessaging.model.impl.UserThreadModelImpl. 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.social.privatemessaging.model.impl.UserThreadModelImpl. 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 UserThread fetchUserThread(long userId, long mbThreadId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static UserThread fetchUserThread(long userThreadId)
public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
public static java.util.List<UserThread> getMBThreadUserThreads(long mbThreadId)
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 UserThread getUserThread(long userId, long mbThreadId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static UserThread getUserThread(long userThreadId) throws com.liferay.portal.kernel.exception.PortalException
userThreadId - the primary key of the user threadPortalException - if a user thread with the primary key could not be foundpublic static java.util.List<UserThread> getUserThreads(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.social.privatemessaging.model.impl.UserThreadModelImpl. 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 threadsend - the upper bound of the range of user threads (not inclusive)public static int getUserThreadsCount()
public static int getUserUserThreadCount(long userId,
boolean deleted)
public static int getUserUserThreadCount(long userId,
boolean read,
boolean deleted)
public static java.util.List<UserThread> getUserUserThreads(long userId, boolean deleted)
public static java.util.List<UserThread> getUserUserThreads(long userId, boolean deleted, int start, int end)
public static java.util.List<UserThread> getUserUserThreads(long userId, boolean read, boolean deleted)
public static void markUserThreadAsRead(long userId,
long mbThreadId)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static void markUserThreadAsUnread(long userId,
long mbThreadId)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static void updateUserName(com.liferay.portal.kernel.model.User user)
public static UserThread updateUserThread(UserThread userThread)
userThread - the user threadpublic static UserThreadLocalService getService()