public class AnalyticsMessageUtil
extends java.lang.Object
com.liferay.analytics.message.storage.service.persistence.impl.AnalyticsMessagePersistenceImpl
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
AnalyticsMessagePersistence
Constructor and Description |
---|
AnalyticsMessageUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(AnalyticsMessage analyticsMessage)
Caches the analytics message in the entity cache if it is enabled.
|
static void |
cacheResult(java.util.List<AnalyticsMessage> analyticsMessages)
Caches the analytics messages in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(AnalyticsMessage analyticsMessage) |
static int |
countAll()
Returns the number of analytics messages.
|
static int |
countByCompanyId(long companyId)
Returns the number of analytics messages where companyId = ?.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static AnalyticsMessage |
create(long analyticsMessageId)
Creates a new analytics message with the primary key.
|
static AnalyticsMessage |
fetchByCompanyId_First(long companyId,
com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator)
Returns the first analytics message in the ordered set where companyId = ?.
|
static AnalyticsMessage |
fetchByCompanyId_Last(long companyId,
com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator)
Returns the last analytics message in the ordered set where companyId = ?.
|
static AnalyticsMessage |
fetchByPrimaryKey(long analyticsMessageId)
Returns the analytics message with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,AnalyticsMessage> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static java.util.List<AnalyticsMessage> |
findAll()
Returns all the analytics messages.
|
static java.util.List<AnalyticsMessage> |
findAll(int start,
int end)
Returns a range of all the analytics messages.
|
static java.util.List<AnalyticsMessage> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator)
Returns an ordered range of all the analytics messages.
|
static java.util.List<AnalyticsMessage> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the analytics messages.
|
static AnalyticsMessage |
findByCompanyId_First(long companyId,
com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator)
Returns the first analytics message in the ordered set where companyId = ?.
|
static AnalyticsMessage |
findByCompanyId_Last(long companyId,
com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator)
Returns the last analytics message in the ordered set where companyId = ?.
|
static AnalyticsMessage[] |
findByCompanyId_PrevAndNext(long analyticsMessageId,
long companyId,
com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator)
Returns the analytics messages before and after the current analytics message in the ordered set where companyId = ?.
|
static java.util.List<AnalyticsMessage> |
findByCompanyId(long companyId)
Returns all the analytics messages where companyId = ?.
|
static java.util.List<AnalyticsMessage> |
findByCompanyId(long companyId,
int start,
int end)
Returns a range of all the analytics messages where companyId = ?.
|
static java.util.List<AnalyticsMessage> |
findByCompanyId(long companyId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator)
Returns an ordered range of all the analytics messages where companyId = ?.
|
static java.util.List<AnalyticsMessage> |
findByCompanyId(long companyId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the analytics messages where companyId = ?.
|
static AnalyticsMessage |
findByPrimaryKey(long analyticsMessageId)
Returns the analytics message with the primary key or throws a
NoSuchMessageException if it could not be found. |
static java.util.List<AnalyticsMessage> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<AnalyticsMessage> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<AnalyticsMessage> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator) |
static AnalyticsMessagePersistence |
getPersistence() |
static AnalyticsMessage |
remove(long analyticsMessageId)
Removes the analytics message with the primary key from the database.
|
static void |
removeAll()
Removes all the analytics messages from the database.
|
static void |
removeByCompanyId(long companyId)
Removes all the analytics messages where companyId = ? from the database.
|
static AnalyticsMessage |
update(AnalyticsMessage analyticsMessage) |
static AnalyticsMessage |
update(AnalyticsMessage analyticsMessage,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static AnalyticsMessage |
updateImpl(AnalyticsMessage analyticsMessage) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(AnalyticsMessage analyticsMessage)
BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)
public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.countWithDynamicQuery(DynamicQuery)
public static java.util.Map<java.io.Serializable,AnalyticsMessage> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<AnalyticsMessage> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<AnalyticsMessage> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<AnalyticsMessage> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static AnalyticsMessage update(AnalyticsMessage analyticsMessage)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static AnalyticsMessage update(AnalyticsMessage analyticsMessage, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static java.util.List<AnalyticsMessage> findByCompanyId(long companyId)
companyId
- the company IDpublic static java.util.List<AnalyticsMessage> findByCompanyId(long companyId, 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, then the query will include the default ORDER BY logic from AnalyticsMessageModelImpl
.
companyId
- the company IDstart
- the lower bound of the range of analytics messagesend
- the upper bound of the range of analytics messages (not inclusive)public static java.util.List<AnalyticsMessage> findByCompanyId(long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> 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, then the query will include the default ORDER BY logic from AnalyticsMessageModelImpl
.
companyId
- the company IDstart
- the lower bound of the range of analytics messagesend
- the upper bound of the range of analytics messages (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<AnalyticsMessage> findByCompanyId(long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator, boolean useFinderCache)
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, then the query will include the default ORDER BY logic from AnalyticsMessageModelImpl
.
companyId
- the company IDstart
- the lower bound of the range of analytics messagesend
- the upper bound of the range of analytics messages (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static AnalyticsMessage findByCompanyId_First(long companyId, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator) throws NoSuchMessageException
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchMessageException
- if a matching analytics message could not be foundpublic static AnalyticsMessage fetchByCompanyId_First(long companyId, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator)
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching analytics message could not be foundpublic static AnalyticsMessage findByCompanyId_Last(long companyId, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator) throws NoSuchMessageException
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchMessageException
- if a matching analytics message could not be foundpublic static AnalyticsMessage fetchByCompanyId_Last(long companyId, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator)
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching analytics message could not be foundpublic static AnalyticsMessage[] findByCompanyId_PrevAndNext(long analyticsMessageId, long companyId, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator) throws NoSuchMessageException
analyticsMessageId
- the primary key of the current analytics messagecompanyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchMessageException
- if a analytics message with the primary key could not be foundpublic static void removeByCompanyId(long companyId)
companyId
- the company IDpublic static int countByCompanyId(long companyId)
companyId
- the company IDpublic static void cacheResult(AnalyticsMessage analyticsMessage)
analyticsMessage
- the analytics messagepublic static void cacheResult(java.util.List<AnalyticsMessage> analyticsMessages)
analyticsMessages
- the analytics messagespublic static AnalyticsMessage create(long analyticsMessageId)
analyticsMessageId
- the primary key for the new analytics messagepublic static AnalyticsMessage remove(long analyticsMessageId) throws NoSuchMessageException
analyticsMessageId
- the primary key of the analytics messageNoSuchMessageException
- if a analytics message with the primary key could not be foundpublic static AnalyticsMessage updateImpl(AnalyticsMessage analyticsMessage)
public static AnalyticsMessage findByPrimaryKey(long analyticsMessageId) throws NoSuchMessageException
NoSuchMessageException
if it could not be found.analyticsMessageId
- the primary key of the analytics messageNoSuchMessageException
- if a analytics message with the primary key could not be foundpublic static AnalyticsMessage fetchByPrimaryKey(long analyticsMessageId)
null
if it could not be found.analyticsMessageId
- the primary key of the analytics messagenull
if a analytics message with the primary key could not be foundpublic static java.util.List<AnalyticsMessage> findAll()
public static java.util.List<AnalyticsMessage> findAll(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, then the query will include the default ORDER BY logic from AnalyticsMessageModelImpl
.
start
- the lower bound of the range of analytics messagesend
- the upper bound of the range of analytics messages (not inclusive)public static java.util.List<AnalyticsMessage> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> 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, then the query will include the default ORDER BY logic from AnalyticsMessageModelImpl
.
start
- the lower bound of the range of analytics messagesend
- the upper bound of the range of analytics messages (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<AnalyticsMessage> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<AnalyticsMessage> orderByComparator, boolean useFinderCache)
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, then the query will include the default ORDER BY logic from AnalyticsMessageModelImpl
.
start
- the lower bound of the range of analytics messagesend
- the upper bound of the range of analytics messages (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static void removeAll()
public static int countAll()
public static AnalyticsMessagePersistence getPersistence()