Example usage for com.liferay.portal.kernel.workflow WorkflowConstants STATUS_ANY

List of usage examples for com.liferay.portal.kernel.workflow WorkflowConstants STATUS_ANY

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.workflow WorkflowConstants STATUS_ANY.

Prototype

int STATUS_ANY

To view the source code for com.liferay.portal.kernel.workflow WorkflowConstants STATUS_ANY.

Click Source Link

Usage

From source file:com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.java

License:Open Source License

public List<MBMessage> getThreadMessages(long threadId, int status, Comparator<MBMessage> comparator)
        throws SystemException {

    List<MBMessage> messages = null;

    if (status == WorkflowConstants.STATUS_ANY) {
        messages = mbMessagePersistence.findByThreadId(threadId);
    } else {// w  w w .j  a va  2  s .c  o  m
        messages = mbMessagePersistence.findByT_S(threadId, status);
    }

    return ListUtil.sort(messages, comparator);
}

From source file:com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.java

License:Open Source License

public List<MBMessage> getThreadMessages(long threadId, int status, int start, int end) throws SystemException {

    if (status == WorkflowConstants.STATUS_ANY) {
        return mbMessagePersistence.findByThreadId(threadId, start, end);
    } else {/* w ww  .  j ava 2 s .c o m*/
        return mbMessagePersistence.findByT_S(threadId, status, start, end);
    }
}

From source file:com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.java

License:Open Source License

public int getThreadMessagesCount(long threadId, int status) throws SystemException {

    if (status == WorkflowConstants.STATUS_ANY) {
        return mbMessagePersistence.countByThreadId(threadId);
    } else {//  w  w  w .jav  a2  s.c o m
        return mbMessagePersistence.countByT_S(threadId, status);
    }
}

From source file:com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.java

License:Open Source License

public List<MBMessage> getThreadRepliesMessages(long threadId, int status, int start, int end)
        throws SystemException {

    if (status == WorkflowConstants.STATUS_ANY) {
        return mbMessagePersistence.findByThreadReplies(threadId, start, end);
    } else {/*w w w.j a v a  2s  . c o m*/
        return mbMessagePersistence.findByTR_S(threadId, status, start, end);
    }
}

From source file:com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.java

License:Open Source License

public List<MBMessage> getUserDiscussionMessages(long userId, long classNameId, long classPK, int status,
        int start, int end, OrderByComparator obc) throws SystemException {

    if (status == WorkflowConstants.STATUS_ANY) {
        return mbMessagePersistence.findByU_C_C(userId, classNameId, classPK, start, end, obc);
    } else {/*  w w  w .  jav a2 s. co  m*/
        return mbMessagePersistence.findByU_C_C_S(userId, classNameId, classPK, status, start, end, obc);
    }
}

From source file:com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.java

License:Open Source License

public List<MBMessage> getUserDiscussionMessages(long userId, long[] classNameIds, int status, int start,
        int end, OrderByComparator obc) throws SystemException {

    if (status == WorkflowConstants.STATUS_ANY) {
        return mbMessagePersistence.findByU_C(userId, classNameIds, start, end, obc);
    } else {//from   w w  w .  ja v  a2  s .c  o  m
        return mbMessagePersistence.findByU_C_S(userId, classNameIds, status, start, end, obc);
    }
}

From source file:com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.java

License:Open Source License

public int getUserDiscussionMessagesCount(long userId, long classNameId, long classPK, int status)
        throws SystemException {

    if (status == WorkflowConstants.STATUS_ANY) {
        return mbMessagePersistence.countByU_C_C(userId, classNameId, classPK);
    } else {/*from   ww  w . j  a  v  a  2s.c o  m*/
        return mbMessagePersistence.countByU_C_C_S(userId, classNameId, classPK, status);
    }
}

From source file:com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl.java

License:Open Source License

public int getUserDiscussionMessagesCount(long userId, long[] classNameIds, int status) throws SystemException {

    if (status == WorkflowConstants.STATUS_ANY) {
        return mbMessagePersistence.countByU_C(userId, classNameIds);
    } else {//from  w  w  w. ja  v  a  2s.c o m
        return mbMessagePersistence.countByU_C_S(userId, classNameIds, status);
    }
}

From source file:com.liferay.portlet.messageboards.service.impl.MBMessageServiceImpl.java

License:Open Source License

public int getGroupMessagesCount(long groupId, int status) throws SystemException {

    if (status == WorkflowConstants.STATUS_ANY) {
        return mbMessagePersistence.filterCountByGroupId(groupId);
    } else {//from   w w  w.  j  av a  2s  .  c o  m
        return mbMessagePersistence.filterCountByG_S(groupId, status);
    }
}

From source file:com.liferay.portlet.messageboards.service.impl.MBMessageServiceImpl.java

License:Open Source License

public List<MBMessage> getThreadMessages(long groupId, long categoryId, long threadId, int status, int start,
        int end) throws SystemException {

    if (status == WorkflowConstants.STATUS_ANY) {
        return mbMessagePersistence.filterFindByG_C_T(groupId, categoryId, threadId, start, end);
    } else {/*from www.  jav a2s . c  o  m*/
        return mbMessagePersistence.filterFindByG_C_T_S(groupId, categoryId, threadId, status, start, end);
    }
}