Class MBThreadLocalServiceUtil
com.liferay.message.boards.service.impl.MBThreadLocalServiceImpl
and
is an 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.- See Also:
- Generated:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MBThread
addMBThread
(MBThread mbThread) Adds the message boards thread to the database.static MBThread
addThread
(long categoryId, MBMessage message, com.liferay.portal.kernel.service.ServiceContext serviceContext) static MBThread
createMBThread
(long threadId) Creates a new message boards thread with the primary key.static com.liferay.portal.kernel.model.PersistedModel
createPersistedModel
(Serializable primaryKeyObj) static MBThread
deleteMBThread
(long threadId) Deletes the message boards thread with the primary key from the database.static MBThread
deleteMBThread
(MBThread mbThread) Deletes the message boards thread from the database.static com.liferay.portal.kernel.model.PersistedModel
deletePersistedModel
(com.liferay.portal.kernel.model.PersistedModel persistedModel) static void
deleteThread
(long threadId) static void
deleteThread
(MBThread thread) static void
deleteThreads
(long groupId, long categoryId) static void
deleteThreads
(long groupId, long categoryId, boolean includeTrashedEntries) static <T> T
dslQuery
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static int
dslQueryCount
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static com.liferay.portal.kernel.dao.orm.DynamicQuery
static <T> 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> 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> 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 MBThread
fetchMBThread
(long threadId) static MBThread
fetchMBThreadByUuidAndGroupId
(String uuid, long groupId) Returns the message boards thread matching the UUID and group.static MBThread
fetchThread
(long threadId) static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
static int
getCategoryThreadsCount
(long groupId, long categoryId, int status) static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery
getExportActionableDynamicQuery
(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) getGroupThreads
(long groupId, long userId, boolean subscribed, boolean includeAnonymous, com.liferay.portal.kernel.dao.orm.QueryDefinition<MBThread> queryDefinition) getGroupThreads
(long groupId, long userId, boolean subscribed, com.liferay.portal.kernel.dao.orm.QueryDefinition<MBThread> queryDefinition) getGroupThreads
(long groupId, long userId, com.liferay.portal.kernel.dao.orm.QueryDefinition<MBThread> queryDefinition) getGroupThreads
(long groupId, com.liferay.portal.kernel.dao.orm.QueryDefinition<MBThread> queryDefinition) static int
getGroupThreadsCount
(long groupId, long userId, boolean subscribed, boolean includeAnonymous, com.liferay.portal.kernel.dao.orm.QueryDefinition<MBThread> queryDefinition) static int
getGroupThreadsCount
(long groupId, long userId, boolean subscribed, com.liferay.portal.kernel.dao.orm.QueryDefinition<MBThread> queryDefinition) static int
getGroupThreadsCount
(long groupId, long userId, com.liferay.portal.kernel.dao.orm.QueryDefinition<MBThread> queryDefinition) static int
getGroupThreadsCount
(long groupId, com.liferay.portal.kernel.dao.orm.QueryDefinition<MBThread> queryDefinition) static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
static MBThread
getMBThread
(long threadId) Returns the message boards thread with the primary key.static MBThread
getMBThreadByUuidAndGroupId
(String uuid, long groupId) Returns the message boards thread matching the UUID and group.getMBThreads
(int start, int end) Returns a range of all the message boards threads.getMBThreadsByUuidAndCompanyId
(String uuid, long companyId) Returns all the message boards threads matching the UUID and company.getMBThreadsByUuidAndCompanyId
(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MBThread> orderByComparator) Returns a range of message boards threads matching the UUID and company.static int
Returns the number of message boards threads.static int
getMessageCount
(long threadId, int status) static String
Returns the OSGi service identifier.static com.liferay.portal.kernel.model.PersistedModel
getPersistedModel
(Serializable primaryKeyObj) getPriorityThreads
(long categoryId, double priority) getPriorityThreads
(long categoryId, double priority, boolean inherit) static MBThreadLocalService
static MBThread
getThread
(long threadId) getThreads
(long groupId, long categoryId, int status, int start, int end) static int
getThreadsCount
(long groupId, long categoryId, int status) static boolean
hasAnswerMessage
(long threadId) static void
incrementViewCounter
(long threadId, int increment) static void
moveDependentsToTrash
(long groupId, long threadId, long trashEntryId) static MBThread
moveThread
(long groupId, long categoryId, long threadId) static MBThread
moveThreadFromTrash
(long userId, long categoryId, long threadId) static void
moveThreadsToTrash
(long groupId, long userId) static MBThread
moveThreadToTrash
(long userId, long threadId) static MBThread
moveThreadToTrash
(long userId, MBThread thread) static void
restoreDependentsFromTrash
(long groupId, long threadId) static void
restoreThreadFromTrash
(long userId, long threadId) static com.liferay.portal.kernel.search.Hits
search
(long groupId, long userId, long creatorUserId, int status, int start, int end) static com.liferay.portal.kernel.search.Hits
search
(long groupId, long userId, long creatorUserId, long startDate, long endDate, int status, int start, int end) static MBThread
splitThread
(long userId, long messageId, String subject, com.liferay.portal.kernel.service.ServiceContext serviceContext) static void
updateLastPostDate
(long threadId, Date lastPostDate) static MBThread
updateMBThread
(MBThread mbThread) Updates the message boards thread in the database or adds it if it does not yet exist.static void
updateQuestion
(long threadId, boolean question) static MBThread
updateStatus
(long userId, long threadId, int status)
-
Constructor Details
-
MBThreadLocalServiceUtil
public MBThreadLocalServiceUtil()
-
-
Method Details
-
addMBThread
Adds the message boards thread to the database. Also notifies the appropriate model listeners.Important: Inspect MBThreadLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
mbThread
- the message boards thread- Returns:
- the message boards thread that was added
-
addThread
public static MBThread addThread(long categoryId, MBMessage message, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
createMBThread
Creates a new message boards thread with the primary key. Does not add the message boards thread to the database.- Parameters:
threadId
- the primary key for the new message boards thread- Returns:
- the new message boards thread
-
createPersistedModel
public static com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteMBThread
public static MBThread deleteMBThread(long threadId) throws com.liferay.portal.kernel.exception.PortalException Deletes the message boards thread with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect MBThreadLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
threadId
- the primary key of the message boards thread- Returns:
- the message boards thread that was removed
- Throws:
com.liferay.portal.kernel.exception.PortalException
- if a message boards thread with the primary key could not be found
-
deleteMBThread
Deletes the message boards thread from the database. Also notifies the appropriate model listeners.Important: Inspect MBThreadLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
mbThread
- the message boards thread- Returns:
- the message boards thread that was removed
-
deletePersistedModel
public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteThread
public static void deleteThread(long threadId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteThread
public static void deleteThread(MBThread thread) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteThreads
public static void deleteThreads(long groupId, long categoryId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteThreads
public static void deleteThreads(long groupId, long categoryId, boolean includeTrashedEntries) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
dslQuery
public static <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) -
dslQueryCount
public static int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) -
dynamicQuery
public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() -
dynamicQuery
Performs a dynamic query on the database and returns the matching rows.- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the matching rows
-
dynamicQuery
public static <T> 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.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.message.boards.model.impl.MBThreadModelImpl
.- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)- Returns:
- the range of matching rows
-
dynamicQuery
public static <T> 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.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.message.boards.model.impl.MBThreadModelImpl
.- Parameters:
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 (optionallynull
)- Returns:
- the ordered range of matching rows
-
dynamicQueryCount
public static long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the number of rows matching the dynamic query
-
dynamicQueryCount
public 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.- Parameters:
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
fetchMBThread
-
fetchMBThreadByUuidAndGroupId
Returns the message boards thread matching the UUID and group.- Parameters:
uuid
- the message boards thread's UUIDgroupId
- the primary key of the group- Returns:
- the matching message boards thread, or
null
if a matching message boards thread could not be found
-
fetchThread
-
getActionableDynamicQuery
public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() -
getCategoryThreadsCount
public static int getCategoryThreadsCount(long groupId, long categoryId, int status) -
getExportActionableDynamicQuery
public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) -
getGroupThreads
-
getGroupThreads
-
getGroupThreads
-
getGroupThreads
-
getGroupThreadsCount
public static int getGroupThreadsCount(long groupId, long userId, boolean subscribed, boolean includeAnonymous, com.liferay.portal.kernel.dao.orm.QueryDefinition<MBThread> queryDefinition) -
getGroupThreadsCount
public static int getGroupThreadsCount(long groupId, long userId, boolean subscribed, com.liferay.portal.kernel.dao.orm.QueryDefinition<MBThread> queryDefinition) -
getGroupThreadsCount
public static int getGroupThreadsCount(long groupId, long userId, com.liferay.portal.kernel.dao.orm.QueryDefinition<MBThread> queryDefinition) -
getGroupThreadsCount
public static int getGroupThreadsCount(long groupId, com.liferay.portal.kernel.dao.orm.QueryDefinition<MBThread> queryDefinition) -
getIndexableActionableDynamicQuery
public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() -
getMBThread
public static MBThread getMBThread(long threadId) throws com.liferay.portal.kernel.exception.PortalException Returns the message boards thread with the primary key.- Parameters:
threadId
- the primary key of the message boards thread- Returns:
- the message boards thread
- Throws:
com.liferay.portal.kernel.exception.PortalException
- if a message boards thread with the primary key could not be found
-
getMBThreadByUuidAndGroupId
public static MBThread getMBThreadByUuidAndGroupId(String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException Returns the message boards thread matching the UUID and group.- Parameters:
uuid
- the message boards thread's UUIDgroupId
- the primary key of the group- Returns:
- the matching message boards thread
- Throws:
com.liferay.portal.kernel.exception.PortalException
- if a matching message boards thread could not be found
-
getMBThreads
Returns a range of all the message boards threads.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.message.boards.model.impl.MBThreadModelImpl
.- Parameters:
start
- the lower bound of the range of message boards threadsend
- the upper bound of the range of message boards threads (not inclusive)- Returns:
- the range of message boards threads
-
getMBThreadsByUuidAndCompanyId
Returns all the message boards threads matching the UUID and company.- Parameters:
uuid
- the UUID of the message boards threadscompanyId
- the primary key of the company- Returns:
- the matching message boards threads, or an empty list if no matches were found
-
getMBThreadsByUuidAndCompanyId
public static List<MBThread> getMBThreadsByUuidAndCompanyId(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<MBThread> orderByComparator) Returns a range of message boards threads matching the UUID and company.- Parameters:
uuid
- the UUID of the message boards threadscompanyId
- the primary key of the companystart
- the lower bound of the range of message boards threadsend
- the upper bound of the range of message boards threads (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- Returns:
- the range of matching message boards threads, or an empty list if no matches were found
-
getMBThreadsCount
public static int getMBThreadsCount()Returns the number of message boards threads.- Returns:
- the number of message boards threads
-
getMessageCount
public static int getMessageCount(long threadId, int status) -
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPersistedModel
public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getPriorityThreads
public static List<MBThread> getPriorityThreads(long categoryId, double priority) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getPriorityThreads
public static List<MBThread> getPriorityThreads(long categoryId, double priority, boolean inherit) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getThread
public static MBThread getThread(long threadId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getThreads
-
getThreadsCount
public static int getThreadsCount(long groupId, long categoryId, int status) -
hasAnswerMessage
public static boolean hasAnswerMessage(long threadId) -
incrementViewCounter
public static void incrementViewCounter(long threadId, int increment) -
moveDependentsToTrash
public static void moveDependentsToTrash(long groupId, long threadId, long trashEntryId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
moveThread
public static MBThread moveThread(long groupId, long categoryId, long threadId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
moveThreadFromTrash
public static MBThread moveThreadFromTrash(long userId, long categoryId, long threadId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
moveThreadsToTrash
public static void moveThreadsToTrash(long groupId, long userId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
moveThreadToTrash
public static MBThread moveThreadToTrash(long userId, long threadId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
moveThreadToTrash
public static MBThread moveThreadToTrash(long userId, MBThread thread) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
restoreDependentsFromTrash
public static void restoreDependentsFromTrash(long groupId, long threadId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
restoreThreadFromTrash
public static void restoreThreadFromTrash(long userId, long threadId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
search
public static com.liferay.portal.kernel.search.Hits search(long groupId, long userId, long creatorUserId, int status, int start, int end) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
search
public static com.liferay.portal.kernel.search.Hits search(long groupId, long userId, long creatorUserId, long startDate, long endDate, int status, int start, int end) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
splitThread
public static MBThread splitThread(long userId, long messageId, String subject, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateLastPostDate
-
updateMBThread
Updates the message boards thread in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect MBThreadLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
mbThread
- the message boards thread- Returns:
- the message boards thread that was updated
-
updateQuestion
public static void updateQuestion(long threadId, boolean question) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateStatus
public static MBThread updateStatus(long userId, long threadId, int status) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getService
-