@ProviderType
public class MBThreadLocalServiceUtil
extends Object
MBThreadLocalServiceImpl
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.MBThreadLocalService
,
MBThreadLocalServiceBaseImpl
,
MBThreadLocalServiceImpl
Constructor and Description |
---|
MBThreadLocalServiceUtil() |
Modifier and Type | Method and Description |
---|---|
static MBThread |
addMBThread(MBThread mbThread)
Adds the message boards thread to the database.
|
static MBThread |
addThread(long categoryId,
MBMessage message,
ServiceContext serviceContext) |
static MBThread |
createMBThread(long threadId)
Creates a new message boards thread with the primary key.
|
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 PersistedModel |
deletePersistedModel(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 DynamicQuery |
dynamicQuery() |
static <T> List<T> |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.
|
static <T> List<T> |
dynamicQuery(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(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator<T> orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows.
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery,
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 ActionableDynamicQuery |
getActionableDynamicQuery() |
static int |
getCategoryThreadsCount(long groupId,
long categoryId,
int status) |
static ExportActionableDynamicQuery |
getExportActionableDynamicQuery(PortletDataContext portletDataContext) |
static List<MBThread> |
getGroupThreads(long groupId,
long userId,
boolean subscribed,
boolean includeAnonymous,
QueryDefinition<MBThread> queryDefinition) |
static List<MBThread> |
getGroupThreads(long groupId,
long userId,
boolean subscribed,
QueryDefinition<MBThread> queryDefinition) |
static List<MBThread> |
getGroupThreads(long groupId,
long userId,
QueryDefinition<MBThread> queryDefinition) |
static List<MBThread> |
getGroupThreads(long groupId,
QueryDefinition<MBThread> queryDefinition) |
static int |
getGroupThreadsCount(long groupId,
long userId,
boolean subscribed,
boolean includeAnonymous,
QueryDefinition<MBThread> queryDefinition) |
static int |
getGroupThreadsCount(long groupId,
long userId,
boolean subscribed,
QueryDefinition<MBThread> queryDefinition) |
static int |
getGroupThreadsCount(long groupId,
long userId,
QueryDefinition<MBThread> queryDefinition) |
static int |
getGroupThreadsCount(long groupId,
QueryDefinition<MBThread> queryDefinition) |
static IndexableActionableDynamicQuery |
getIndexableActionableDynamicQuery() |
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.
|
static List<MBThread> |
getMBThreads(int start,
int end)
Returns a range of all the message boards threads.
|
static List<MBThread> |
getMBThreadsByUuidAndCompanyId(String uuid,
long companyId)
Returns all the message boards threads matching the UUID and company.
|
static List<MBThread> |
getMBThreadsByUuidAndCompanyId(String uuid,
long companyId,
int start,
int end,
OrderByComparator<MBThread> orderByComparator)
Returns a range of message boards threads matching the UUID and company.
|
static int |
getMBThreadsCount()
Returns the number of message boards threads.
|
static List<MBThread> |
getNoAssetThreads() |
static String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
static PersistedModel |
getPersistedModel(Serializable primaryKeyObj) |
static List<MBThread> |
getPriorityThreads(long categoryId,
double priority) |
static List<MBThread> |
getPriorityThreads(long categoryId,
double priority,
boolean inherit) |
static MBThreadLocalService |
getService() |
static MBThread |
getThread(long threadId) |
static List<MBThread> |
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 |
restoreDependentsFromTrash(long groupId,
long threadId,
long trashEntryId)
Deprecated.
As of Wilberforce (7.0.x), replaced by
restoreDependentsFromTrash(long, long) |
static void |
restoreThreadFromTrash(long userId,
long threadId) |
static Hits |
search(long groupId,
long userId,
long creatorUserId,
int status,
int start,
int end) |
static 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,
ServiceContext serviceContext) |
static MBThread |
updateMBThread(MBThread mbThread)
Updates the message boards thread in the database or adds it if it does not yet exist.
|
static MBThread |
updateMessageCount(long threadId) |
static void |
updateQuestion(long threadId,
boolean question) |
static MBThread |
updateStatus(long userId,
long threadId,
int status) |
public static MBThread addMBThread(MBThread mbThread)
mbThread
- the message boards threadpublic static MBThread addThread(long categoryId, MBMessage message, ServiceContext serviceContext) throws PortalException
PortalException
public static MBThread createMBThread(long threadId)
threadId
- the primary key for the new message boards threadpublic static MBThread deleteMBThread(long threadId) throws PortalException
threadId
- the primary key of the message boards threadPortalException
- if a message boards thread with the primary key could not be foundpublic static MBThread deleteMBThread(MBThread mbThread)
mbThread
- the message boards threadpublic static PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException
PortalException
public static void deleteThread(long threadId) throws PortalException
PortalException
public static void deleteThread(MBThread thread) throws PortalException
PortalException
public static void deleteThreads(long groupId, long categoryId) throws PortalException
PortalException
public static void deleteThreads(long groupId, long categoryId, boolean includeTrashedEntries) throws PortalException
PortalException
public static DynamicQuery dynamicQuery()
public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static <T> List<T> dynamicQuery(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 MBThreadModelImpl
. 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> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, 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 MBThreadModelImpl
. 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(DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the querypublic static MBThread fetchMBThread(long threadId)
public static MBThread fetchMBThreadByUuidAndGroupId(String uuid, long groupId)
uuid
- the message boards thread's UUIDgroupId
- the primary key of the groupnull
if a matching message boards thread could not be foundpublic static MBThread fetchThread(long threadId)
public static ActionableDynamicQuery getActionableDynamicQuery()
public static int getCategoryThreadsCount(long groupId, long categoryId, int status)
public static ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext)
public static List<MBThread> getGroupThreads(long groupId, long userId, boolean subscribed, boolean includeAnonymous, QueryDefinition<MBThread> queryDefinition)
public static List<MBThread> getGroupThreads(long groupId, long userId, boolean subscribed, QueryDefinition<MBThread> queryDefinition)
public static List<MBThread> getGroupThreads(long groupId, long userId, QueryDefinition<MBThread> queryDefinition)
public static List<MBThread> getGroupThreads(long groupId, QueryDefinition<MBThread> queryDefinition)
public static int getGroupThreadsCount(long groupId, long userId, boolean subscribed, boolean includeAnonymous, QueryDefinition<MBThread> queryDefinition)
public static int getGroupThreadsCount(long groupId, long userId, boolean subscribed, QueryDefinition<MBThread> queryDefinition)
public static int getGroupThreadsCount(long groupId, long userId, QueryDefinition<MBThread> queryDefinition)
public static int getGroupThreadsCount(long groupId, QueryDefinition<MBThread> queryDefinition)
public static IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
public static MBThread getMBThread(long threadId) throws PortalException
threadId
- the primary key of the message boards threadPortalException
- if a message boards thread with the primary key could not be foundpublic static MBThread getMBThreadByUuidAndGroupId(String uuid, long groupId) throws PortalException
uuid
- the message boards thread's UUIDgroupId
- the primary key of the groupPortalException
- if a matching message boards thread could not be foundpublic static List<MBThread> getMBThreads(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 MBThreadModelImpl
. 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 message boards threadsend
- the upper bound of the range of message boards threads (not inclusive)public static List<MBThread> getMBThreadsByUuidAndCompanyId(String uuid, long companyId)
uuid
- the UUID of the message boards threadscompanyId
- the primary key of the companypublic static List<MBThread> getMBThreadsByUuidAndCompanyId(String uuid, long companyId, int start, int end, OrderByComparator<MBThread> orderByComparator)
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 (optionally null
)public static int getMBThreadsCount()
public static List<MBThread> getNoAssetThreads()
public static String getOSGiServiceIdentifier()
public static PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException
PortalException
public static List<MBThread> getPriorityThreads(long categoryId, double priority) throws PortalException
PortalException
public static List<MBThread> getPriorityThreads(long categoryId, double priority, boolean inherit) throws PortalException
PortalException
public static MBThread getThread(long threadId) throws PortalException
PortalException
public static List<MBThread> getThreads(long groupId, long categoryId, int status, int start, int end)
public static int getThreadsCount(long groupId, long categoryId, int status)
public static boolean hasAnswerMessage(long threadId)
public static void incrementViewCounter(long threadId, int increment) throws PortalException
PortalException
public static void moveDependentsToTrash(long groupId, long threadId, long trashEntryId) throws PortalException
PortalException
public static MBThread moveThread(long groupId, long categoryId, long threadId) throws PortalException
PortalException
public static MBThread moveThreadFromTrash(long userId, long categoryId, long threadId) throws PortalException
PortalException
public static void moveThreadsToTrash(long groupId, long userId) throws PortalException
PortalException
public static MBThread moveThreadToTrash(long userId, long threadId) throws PortalException
PortalException
public static MBThread moveThreadToTrash(long userId, MBThread thread) throws PortalException
PortalException
public static void restoreDependentsFromTrash(long groupId, long threadId) throws PortalException
PortalException
@Deprecated public static void restoreDependentsFromTrash(long groupId, long threadId, long trashEntryId) throws PortalException
restoreDependentsFromTrash(long, long)
PortalException
public static void restoreThreadFromTrash(long userId, long threadId) throws PortalException
PortalException
public static Hits search(long groupId, long userId, long creatorUserId, int status, int start, int end) throws PortalException
PortalException
public static Hits search(long groupId, long userId, long creatorUserId, long startDate, long endDate, int status, int start, int end) throws PortalException
PortalException
public static MBThread splitThread(long userId, long messageId, String subject, ServiceContext serviceContext) throws PortalException
PortalException
public static MBThread updateMBThread(MBThread mbThread)
mbThread
- the message boards threadpublic static MBThread updateMessageCount(long threadId)
public static void updateQuestion(long threadId, boolean question) throws PortalException
PortalException
public static MBThread updateStatus(long userId, long threadId, int status) throws PortalException
PortalException
public static MBThreadLocalService getService()