Liferay 6.1.2-ce-ga3

com.liferay.portlet.messageboards.service.persistence
Class MBThreadFlagUtil

java.lang.Object
  extended by com.liferay.portlet.messageboards.service.persistence.MBThreadFlagUtil

public class MBThreadFlagUtil
extends Object

The persistence utility for the message boards thread flag service. This utility wraps MBThreadFlagPersistenceImpl and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.

Caching information and settings can be found in portal.properties

See Also:
MBThreadFlagPersistence, MBThreadFlagPersistenceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Constructor Summary
MBThreadFlagUtil()
           
 
Method Summary
static void cacheResult(List<MBThreadFlag> mbThreadFlags)
          Caches the message boards thread flags in the entity cache if it is enabled.
static void cacheResult(MBThreadFlag mbThreadFlag)
          Caches the message boards thread flag in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(MBThreadFlag mbThreadFlag)
           
static int countAll()
          Returns the number of message boards thread flags.
static int countByThreadId(long threadId)
          Returns the number of message boards thread flags where threadId = ?.
static int countByU_T(long userId, long threadId)
          Returns the number of message boards thread flags where userId = ? and threadId = ?.
static int countByUserId(long userId)
          Returns the number of message boards thread flags where userId = ?.
 long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static MBThreadFlag create(long threadFlagId)
          Creates a new message boards thread flag with the primary key.
static MBThreadFlag fetchByPrimaryKey(long threadFlagId)
          Returns the message boards thread flag with the primary key or returns null if it could not be found.
static MBThreadFlag fetchByThreadId_First(long threadId, OrderByComparator orderByComparator)
          Returns the first message boards thread flag in the ordered set where threadId = ?.
static MBThreadFlag fetchByThreadId_Last(long threadId, OrderByComparator orderByComparator)
          Returns the last message boards thread flag in the ordered set where threadId = ?.
static MBThreadFlag fetchByU_T(long userId, long threadId)
          Returns the message boards thread flag where userId = ? and threadId = ? or returns null if it could not be found.
static MBThreadFlag fetchByU_T(long userId, long threadId, boolean retrieveFromCache)
          Returns the message boards thread flag where userId = ? and threadId = ? or returns null if it could not be found, optionally using the finder cache.
static MBThreadFlag fetchByUserId_First(long userId, OrderByComparator orderByComparator)
          Returns the first message boards thread flag in the ordered set where userId = ?.
static MBThreadFlag fetchByUserId_Last(long userId, OrderByComparator orderByComparator)
          Returns the last message boards thread flag in the ordered set where userId = ?.
static List<MBThreadFlag> findAll()
          Returns all the message boards thread flags.
static List<MBThreadFlag> findAll(int start, int end)
          Returns a range of all the message boards thread flags.
static List<MBThreadFlag> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the message boards thread flags.
static MBThreadFlag findByPrimaryKey(long threadFlagId)
          Returns the message boards thread flag with the primary key or throws a NoSuchThreadFlagException if it could not be found.
static MBThreadFlag findByThreadId_First(long threadId, OrderByComparator orderByComparator)
          Returns the first message boards thread flag in the ordered set where threadId = ?.
static MBThreadFlag findByThreadId_Last(long threadId, OrderByComparator orderByComparator)
          Returns the last message boards thread flag in the ordered set where threadId = ?.
static MBThreadFlag[] findByThreadId_PrevAndNext(long threadFlagId, long threadId, OrderByComparator orderByComparator)
          Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where threadId = ?.
static List<MBThreadFlag> findByThreadId(long threadId)
          Returns all the message boards thread flags where threadId = ?.
static List<MBThreadFlag> findByThreadId(long threadId, int start, int end)
          Returns a range of all the message boards thread flags where threadId = ?.
static List<MBThreadFlag> findByThreadId(long threadId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the message boards thread flags where threadId = ?.
static MBThreadFlag findByU_T(long userId, long threadId)
          Returns the message boards thread flag where userId = ? and threadId = ? or throws a NoSuchThreadFlagException if it could not be found.
static MBThreadFlag findByUserId_First(long userId, OrderByComparator orderByComparator)
          Returns the first message boards thread flag in the ordered set where userId = ?.
static MBThreadFlag findByUserId_Last(long userId, OrderByComparator orderByComparator)
          Returns the last message boards thread flag in the ordered set where userId = ?.
static MBThreadFlag[] findByUserId_PrevAndNext(long threadFlagId, long userId, OrderByComparator orderByComparator)
          Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where userId = ?.
static List<MBThreadFlag> findByUserId(long userId)
          Returns all the message boards thread flags where userId = ?.
static List<MBThreadFlag> findByUserId(long userId, int start, int end)
          Returns a range of all the message boards thread flags where userId = ?.
static List<MBThreadFlag> findByUserId(long userId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the message boards thread flags where userId = ?.
static List<MBThreadFlag> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<MBThreadFlag> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<MBThreadFlag> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static MBThreadFlagPersistence getPersistence()
           
static MBThreadFlag remove(long threadFlagId)
          Removes the message boards thread flag with the primary key from the database.
static void removeAll()
          Removes all the message boards thread flags from the database.
static void removeByThreadId(long threadId)
          Removes all the message boards thread flags where threadId = ? from the database.
static MBThreadFlag removeByU_T(long userId, long threadId)
          Removes the message boards thread flag where userId = ? and threadId = ? from the database.
static void removeByUserId(long userId)
          Removes all the message boards thread flags where userId = ? from the database.
 void setPersistence(MBThreadFlagPersistence persistence)
          Deprecated.  
static MBThreadFlag update(MBThreadFlag mbThreadFlag, boolean merge)
           
static MBThreadFlag update(MBThreadFlag mbThreadFlag, boolean merge, ServiceContext serviceContext)
           
static MBThreadFlag updateImpl(MBThreadFlag mbThreadFlag, boolean merge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBThreadFlagUtil

public MBThreadFlagUtil()
Method Detail

clearCache

public static void clearCache()
See Also:
BasePersistence.clearCache()

clearCache

public static void clearCache(MBThreadFlag mbThreadFlag)
See Also:
BasePersistence.clearCache(com.liferay.portal.model.BaseModel)

countWithDynamicQuery

public long countWithDynamicQuery(DynamicQuery dynamicQuery)
                           throws SystemException
Throws:
SystemException
See Also:
BasePersistence.countWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<MBThreadFlag> findWithDynamicQuery(DynamicQuery dynamicQuery)
                                               throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<MBThreadFlag> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                                      int start,
                                                      int end)
                                               throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)

findWithDynamicQuery

public static List<MBThreadFlag> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                                      int start,
                                                      int end,
                                                      OrderByComparator orderByComparator)
                                               throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)

update

public static MBThreadFlag update(MBThreadFlag mbThreadFlag,
                                  boolean merge)
                           throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean)

update

public static MBThreadFlag update(MBThreadFlag mbThreadFlag,
                                  boolean merge,
                                  ServiceContext serviceContext)
                           throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)

cacheResult

public static void cacheResult(MBThreadFlag mbThreadFlag)
Caches the message boards thread flag in the entity cache if it is enabled.

Parameters:
mbThreadFlag - the message boards thread flag

cacheResult

public static void cacheResult(List<MBThreadFlag> mbThreadFlags)
Caches the message boards thread flags in the entity cache if it is enabled.

Parameters:
mbThreadFlags - the message boards thread flags

create

public static MBThreadFlag create(long threadFlagId)
Creates a new message boards thread flag with the primary key. Does not add the message boards thread flag to the database.

Parameters:
threadFlagId - the primary key for the new message boards thread flag
Returns:
the new message boards thread flag

remove

public static MBThreadFlag remove(long threadFlagId)
                           throws SystemException,
                                  NoSuchThreadFlagException
Removes the message boards thread flag with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
threadFlagId - the primary key of the message boards thread flag
Returns:
the message boards thread flag that was removed
Throws:
NoSuchThreadFlagException - if a message boards thread flag with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

public static MBThreadFlag updateImpl(MBThreadFlag mbThreadFlag,
                                      boolean merge)
                               throws SystemException
Throws:
SystemException

findByPrimaryKey

public static MBThreadFlag findByPrimaryKey(long threadFlagId)
                                     throws SystemException,
                                            NoSuchThreadFlagException
Returns the message boards thread flag with the primary key or throws a NoSuchThreadFlagException if it could not be found.

Parameters:
threadFlagId - the primary key of the message boards thread flag
Returns:
the message boards thread flag
Throws:
NoSuchThreadFlagException - if a message boards thread flag with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

public static MBThreadFlag fetchByPrimaryKey(long threadFlagId)
                                      throws SystemException
Returns the message boards thread flag with the primary key or returns null if it could not be found.

Parameters:
threadFlagId - the primary key of the message boards thread flag
Returns:
the message boards thread flag, or null if a message boards thread flag with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findByUserId

public static List<MBThreadFlag> findByUserId(long userId)
                                       throws SystemException
Returns all the message boards thread flags where userId = ?.

Parameters:
userId - the user ID
Returns:
the matching message boards thread flags
Throws:
SystemException - if a system exception occurred

findByUserId

public static List<MBThreadFlag> findByUserId(long userId,
                                              int start,
                                              int end)
                                       throws SystemException
Returns a range of all the message boards thread flags where userId = ?.

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.

Parameters:
userId - the user ID
start - the lower bound of the range of message boards thread flags
end - the upper bound of the range of message boards thread flags (not inclusive)
Returns:
the range of matching message boards thread flags
Throws:
SystemException - if a system exception occurred

findByUserId

public static List<MBThreadFlag> findByUserId(long userId,
                                              int start,
                                              int end,
                                              OrderByComparator orderByComparator)
                                       throws SystemException
Returns an ordered range of all the message boards thread flags where userId = ?.

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.

Parameters:
userId - the user ID
start - the lower bound of the range of message boards thread flags
end - the upper bound of the range of message boards thread flags (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching message boards thread flags
Throws:
SystemException - if a system exception occurred

findByUserId_First

public static MBThreadFlag findByUserId_First(long userId,
                                              OrderByComparator orderByComparator)
                                       throws SystemException,
                                              NoSuchThreadFlagException
Returns the first message boards thread flag in the ordered set where userId = ?.

Parameters:
userId - the user ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching message boards thread flag
Throws:
NoSuchThreadFlagException - if a matching message boards thread flag could not be found
SystemException - if a system exception occurred

fetchByUserId_First

public static MBThreadFlag fetchByUserId_First(long userId,
                                               OrderByComparator orderByComparator)
                                        throws SystemException
Returns the first message boards thread flag in the ordered set where userId = ?.

Parameters:
userId - the user ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching message boards thread flag, or null if a matching message boards thread flag could not be found
Throws:
SystemException - if a system exception occurred

findByUserId_Last

public static MBThreadFlag findByUserId_Last(long userId,
                                             OrderByComparator orderByComparator)
                                      throws SystemException,
                                             NoSuchThreadFlagException
Returns the last message boards thread flag in the ordered set where userId = ?.

Parameters:
userId - the user ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching message boards thread flag
Throws:
NoSuchThreadFlagException - if a matching message boards thread flag could not be found
SystemException - if a system exception occurred

fetchByUserId_Last

public static MBThreadFlag fetchByUserId_Last(long userId,
                                              OrderByComparator orderByComparator)
                                       throws SystemException
Returns the last message boards thread flag in the ordered set where userId = ?.

Parameters:
userId - the user ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching message boards thread flag, or null if a matching message boards thread flag could not be found
Throws:
SystemException - if a system exception occurred

findByUserId_PrevAndNext

public static MBThreadFlag[] findByUserId_PrevAndNext(long threadFlagId,
                                                      long userId,
                                                      OrderByComparator orderByComparator)
                                               throws SystemException,
                                                      NoSuchThreadFlagException
Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where userId = ?.

Parameters:
threadFlagId - the primary key of the current message boards thread flag
userId - the user ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next message boards thread flag
Throws:
NoSuchThreadFlagException - if a message boards thread flag with the primary key could not be found
SystemException - if a system exception occurred

findByThreadId

public static List<MBThreadFlag> findByThreadId(long threadId)
                                         throws SystemException
Returns all the message boards thread flags where threadId = ?.

Parameters:
threadId - the thread ID
Returns:
the matching message boards thread flags
Throws:
SystemException - if a system exception occurred

findByThreadId

public static List<MBThreadFlag> findByThreadId(long threadId,
                                                int start,
                                                int end)
                                         throws SystemException
Returns a range of all the message boards thread flags where threadId = ?.

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.

Parameters:
threadId - the thread ID
start - the lower bound of the range of message boards thread flags
end - the upper bound of the range of message boards thread flags (not inclusive)
Returns:
the range of matching message boards thread flags
Throws:
SystemException - if a system exception occurred

findByThreadId

public static List<MBThreadFlag> findByThreadId(long threadId,
                                                int start,
                                                int end,
                                                OrderByComparator orderByComparator)
                                         throws SystemException
Returns an ordered range of all the message boards thread flags where threadId = ?.

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.

Parameters:
threadId - the thread ID
start - the lower bound of the range of message boards thread flags
end - the upper bound of the range of message boards thread flags (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching message boards thread flags
Throws:
SystemException - if a system exception occurred

findByThreadId_First

public static MBThreadFlag findByThreadId_First(long threadId,
                                                OrderByComparator orderByComparator)
                                         throws SystemException,
                                                NoSuchThreadFlagException
Returns the first message boards thread flag in the ordered set where threadId = ?.

Parameters:
threadId - the thread ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching message boards thread flag
Throws:
NoSuchThreadFlagException - if a matching message boards thread flag could not be found
SystemException - if a system exception occurred

fetchByThreadId_First

public static MBThreadFlag fetchByThreadId_First(long threadId,
                                                 OrderByComparator orderByComparator)
                                          throws SystemException
Returns the first message boards thread flag in the ordered set where threadId = ?.

Parameters:
threadId - the thread ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching message boards thread flag, or null if a matching message boards thread flag could not be found
Throws:
SystemException - if a system exception occurred

findByThreadId_Last

public static MBThreadFlag findByThreadId_Last(long threadId,
                                               OrderByComparator orderByComparator)
                                        throws SystemException,
                                               NoSuchThreadFlagException
Returns the last message boards thread flag in the ordered set where threadId = ?.

Parameters:
threadId - the thread ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching message boards thread flag
Throws:
NoSuchThreadFlagException - if a matching message boards thread flag could not be found
SystemException - if a system exception occurred

fetchByThreadId_Last

public static MBThreadFlag fetchByThreadId_Last(long threadId,
                                                OrderByComparator orderByComparator)
                                         throws SystemException
Returns the last message boards thread flag in the ordered set where threadId = ?.

Parameters:
threadId - the thread ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching message boards thread flag, or null if a matching message boards thread flag could not be found
Throws:
SystemException - if a system exception occurred

findByThreadId_PrevAndNext

public static MBThreadFlag[] findByThreadId_PrevAndNext(long threadFlagId,
                                                        long threadId,
                                                        OrderByComparator orderByComparator)
                                                 throws SystemException,
                                                        NoSuchThreadFlagException
Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where threadId = ?.

Parameters:
threadFlagId - the primary key of the current message boards thread flag
threadId - the thread ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next message boards thread flag
Throws:
NoSuchThreadFlagException - if a message boards thread flag with the primary key could not be found
SystemException - if a system exception occurred

findByU_T

public static MBThreadFlag findByU_T(long userId,
                                     long threadId)
                              throws SystemException,
                                     NoSuchThreadFlagException
Returns the message boards thread flag where userId = ? and threadId = ? or throws a NoSuchThreadFlagException if it could not be found.

Parameters:
userId - the user ID
threadId - the thread ID
Returns:
the matching message boards thread flag
Throws:
NoSuchThreadFlagException - if a matching message boards thread flag could not be found
SystemException - if a system exception occurred

fetchByU_T

public static MBThreadFlag fetchByU_T(long userId,
                                      long threadId)
                               throws SystemException
Returns the message boards thread flag where userId = ? and threadId = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
userId - the user ID
threadId - the thread ID
Returns:
the matching message boards thread flag, or null if a matching message boards thread flag could not be found
Throws:
SystemException - if a system exception occurred

fetchByU_T

public static MBThreadFlag fetchByU_T(long userId,
                                      long threadId,
                                      boolean retrieveFromCache)
                               throws SystemException
Returns the message boards thread flag where userId = ? and threadId = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
userId - the user ID
threadId - the thread ID
retrieveFromCache - whether to use the finder cache
Returns:
the matching message boards thread flag, or null if a matching message boards thread flag could not be found
Throws:
SystemException - if a system exception occurred

findAll

public static List<MBThreadFlag> findAll()
                                  throws SystemException
Returns all the message boards thread flags.

Returns:
the message boards thread flags
Throws:
SystemException - if a system exception occurred

findAll

public static List<MBThreadFlag> findAll(int start,
                                         int end)
                                  throws SystemException
Returns a range of all the message boards thread flags.

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.

Parameters:
start - the lower bound of the range of message boards thread flags
end - the upper bound of the range of message boards thread flags (not inclusive)
Returns:
the range of message boards thread flags
Throws:
SystemException - if a system exception occurred

findAll

public static List<MBThreadFlag> findAll(int start,
                                         int end,
                                         OrderByComparator orderByComparator)
                                  throws SystemException
Returns an ordered range of all the message boards thread flags.

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.

Parameters:
start - the lower bound of the range of message boards thread flags
end - the upper bound of the range of message boards thread flags (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of message boards thread flags
Throws:
SystemException - if a system exception occurred

removeByUserId

public static void removeByUserId(long userId)
                           throws SystemException
Removes all the message boards thread flags where userId = ? from the database.

Parameters:
userId - the user ID
Throws:
SystemException - if a system exception occurred

removeByThreadId

public static void removeByThreadId(long threadId)
                             throws SystemException
Removes all the message boards thread flags where threadId = ? from the database.

Parameters:
threadId - the thread ID
Throws:
SystemException - if a system exception occurred

removeByU_T

public static MBThreadFlag removeByU_T(long userId,
                                       long threadId)
                                throws SystemException,
                                       NoSuchThreadFlagException
Removes the message boards thread flag where userId = ? and threadId = ? from the database.

Parameters:
userId - the user ID
threadId - the thread ID
Returns:
the message boards thread flag that was removed
Throws:
SystemException - if a system exception occurred
NoSuchThreadFlagException

removeAll

public static void removeAll()
                      throws SystemException
Removes all the message boards thread flags from the database.

Throws:
SystemException - if a system exception occurred

countByUserId

public static int countByUserId(long userId)
                         throws SystemException
Returns the number of message boards thread flags where userId = ?.

Parameters:
userId - the user ID
Returns:
the number of matching message boards thread flags
Throws:
SystemException - if a system exception occurred

countByThreadId

public static int countByThreadId(long threadId)
                           throws SystemException
Returns the number of message boards thread flags where threadId = ?.

Parameters:
threadId - the thread ID
Returns:
the number of matching message boards thread flags
Throws:
SystemException - if a system exception occurred

countByU_T

public static int countByU_T(long userId,
                             long threadId)
                      throws SystemException
Returns the number of message boards thread flags where userId = ? and threadId = ?.

Parameters:
userId - the user ID
threadId - the thread ID
Returns:
the number of matching message boards thread flags
Throws:
SystemException - if a system exception occurred

countAll

public static int countAll()
                    throws SystemException
Returns the number of message boards thread flags.

Returns:
the number of message boards thread flags
Throws:
SystemException - if a system exception occurred

getPersistence

public static MBThreadFlagPersistence getPersistence()

setPersistence

public void setPersistence(MBThreadFlagPersistence persistence)
Deprecated. 


Liferay 6.1.2-ce-ga3