public class WallEntryUtil
extends java.lang.Object
com.liferay.social.networking.service.persistence.impl.WallEntryPersistenceImpl
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
WallEntryPersistence
Constructor and Description |
---|
WallEntryUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(java.util.List<WallEntry> wallEntries)
Caches the wall entries in the entity cache if it is enabled.
|
static void |
cacheResult(WallEntry wallEntry)
Caches the wall entry in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(WallEntry wallEntry) |
static int |
countAll()
Returns the number of wall entries.
|
static int |
countByG_U(long groupId,
long userId)
Returns the number of wall entries where groupId = ? and userId = ?.
|
static int |
countByGroupId(long groupId)
Returns the number of wall entries where groupId = ?.
|
static int |
countByUserId(long userId)
Returns the number of wall entries where userId = ?.
|
static long |
countWithDynamicQuery(DynamicQuery dynamicQuery) |
static WallEntry |
create(long wallEntryId)
Creates a new wall entry with the primary key.
|
static WallEntry |
fetchByG_U_First(long groupId,
long userId,
OrderByComparator<WallEntry> orderByComparator)
Returns the first wall entry in the ordered set where groupId = ? and userId = ?.
|
static WallEntry |
fetchByG_U_Last(long groupId,
long userId,
OrderByComparator<WallEntry> orderByComparator)
Returns the last wall entry in the ordered set where groupId = ? and userId = ?.
|
static WallEntry |
fetchByGroupId_First(long groupId,
OrderByComparator<WallEntry> orderByComparator)
Returns the first wall entry in the ordered set where groupId = ?.
|
static WallEntry |
fetchByGroupId_Last(long groupId,
OrderByComparator<WallEntry> orderByComparator)
Returns the last wall entry in the ordered set where groupId = ?.
|
static WallEntry |
fetchByPrimaryKey(long wallEntryId)
Returns the wall entry with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,WallEntry> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static WallEntry |
fetchByUserId_First(long userId,
OrderByComparator<WallEntry> orderByComparator)
Returns the first wall entry in the ordered set where userId = ?.
|
static WallEntry |
fetchByUserId_Last(long userId,
OrderByComparator<WallEntry> orderByComparator)
Returns the last wall entry in the ordered set where userId = ?.
|
static java.util.List<WallEntry> |
findAll()
Returns all the wall entries.
|
static java.util.List<WallEntry> |
findAll(int start,
int end)
Returns a range of all the wall entries.
|
static java.util.List<WallEntry> |
findAll(int start,
int end,
OrderByComparator<WallEntry> orderByComparator)
Returns an ordered range of all the wall entries.
|
static java.util.List<WallEntry> |
findAll(int start,
int end,
OrderByComparator<WallEntry> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the wall entries.
|
static WallEntry |
findByG_U_First(long groupId,
long userId,
OrderByComparator<WallEntry> orderByComparator)
Returns the first wall entry in the ordered set where groupId = ? and userId = ?.
|
static WallEntry |
findByG_U_Last(long groupId,
long userId,
OrderByComparator<WallEntry> orderByComparator)
Returns the last wall entry in the ordered set where groupId = ? and userId = ?.
|
static WallEntry[] |
findByG_U_PrevAndNext(long wallEntryId,
long groupId,
long userId,
OrderByComparator<WallEntry> orderByComparator)
Returns the wall entries before and after the current wall entry in the ordered set where groupId = ? and userId = ?.
|
static java.util.List<WallEntry> |
findByG_U(long groupId,
long userId)
Returns all the wall entries where groupId = ? and userId = ?.
|
static java.util.List<WallEntry> |
findByG_U(long groupId,
long userId,
int start,
int end)
Returns a range of all the wall entries where groupId = ? and userId = ?.
|
static java.util.List<WallEntry> |
findByG_U(long groupId,
long userId,
int start,
int end,
OrderByComparator<WallEntry> orderByComparator)
Returns an ordered range of all the wall entries where groupId = ? and userId = ?.
|
static java.util.List<WallEntry> |
findByG_U(long groupId,
long userId,
int start,
int end,
OrderByComparator<WallEntry> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the wall entries where groupId = ? and userId = ?.
|
static WallEntry |
findByGroupId_First(long groupId,
OrderByComparator<WallEntry> orderByComparator)
Returns the first wall entry in the ordered set where groupId = ?.
|
static WallEntry |
findByGroupId_Last(long groupId,
OrderByComparator<WallEntry> orderByComparator)
Returns the last wall entry in the ordered set where groupId = ?.
|
static WallEntry[] |
findByGroupId_PrevAndNext(long wallEntryId,
long groupId,
OrderByComparator<WallEntry> orderByComparator)
Returns the wall entries before and after the current wall entry in the ordered set where groupId = ?.
|
static java.util.List<WallEntry> |
findByGroupId(long groupId)
Returns all the wall entries where groupId = ?.
|
static java.util.List<WallEntry> |
findByGroupId(long groupId,
int start,
int end)
Returns a range of all the wall entries where groupId = ?.
|
static java.util.List<WallEntry> |
findByGroupId(long groupId,
int start,
int end,
OrderByComparator<WallEntry> orderByComparator)
Returns an ordered range of all the wall entries where groupId = ?.
|
static java.util.List<WallEntry> |
findByGroupId(long groupId,
int start,
int end,
OrderByComparator<WallEntry> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the wall entries where groupId = ?.
|
static WallEntry |
findByPrimaryKey(long wallEntryId)
Returns the wall entry with the primary key or throws a
NoSuchWallEntryException if it could not be found. |
static WallEntry |
findByUserId_First(long userId,
OrderByComparator<WallEntry> orderByComparator)
Returns the first wall entry in the ordered set where userId = ?.
|
static WallEntry |
findByUserId_Last(long userId,
OrderByComparator<WallEntry> orderByComparator)
Returns the last wall entry in the ordered set where userId = ?.
|
static WallEntry[] |
findByUserId_PrevAndNext(long wallEntryId,
long userId,
OrderByComparator<WallEntry> orderByComparator)
Returns the wall entries before and after the current wall entry in the ordered set where userId = ?.
|
static java.util.List<WallEntry> |
findByUserId(long userId)
Returns all the wall entries where userId = ?.
|
static java.util.List<WallEntry> |
findByUserId(long userId,
int start,
int end)
Returns a range of all the wall entries where userId = ?.
|
static java.util.List<WallEntry> |
findByUserId(long userId,
int start,
int end,
OrderByComparator<WallEntry> orderByComparator)
Returns an ordered range of all the wall entries where userId = ?.
|
static java.util.List<WallEntry> |
findByUserId(long userId,
int start,
int end,
OrderByComparator<WallEntry> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the wall entries where userId = ?.
|
static java.util.List<WallEntry> |
findWithDynamicQuery(DynamicQuery dynamicQuery) |
static java.util.List<WallEntry> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<WallEntry> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator<WallEntry> orderByComparator) |
static WallEntryPersistence |
getPersistence() |
static WallEntry |
remove(long wallEntryId)
Removes the wall entry with the primary key from the database.
|
static void |
removeAll()
Removes all the wall entries from the database.
|
static void |
removeByG_U(long groupId,
long userId)
Removes all the wall entries where groupId = ? and userId = ? from the database.
|
static void |
removeByGroupId(long groupId)
Removes all the wall entries where groupId = ? from the database.
|
static void |
removeByUserId(long userId)
Removes all the wall entries where userId = ? from the database.
|
static WallEntry |
update(WallEntry wallEntry) |
static WallEntry |
update(WallEntry wallEntry,
ServiceContext serviceContext) |
static WallEntry |
updateImpl(WallEntry wallEntry) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(WallEntry wallEntry)
public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
public static java.util.Map<java.io.Serializable,WallEntry> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<WallEntry> findWithDynamicQuery(DynamicQuery dynamicQuery)
public static java.util.List<WallEntry> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
public static java.util.List<WallEntry> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<WallEntry> orderByComparator)
public static WallEntry update(WallEntry wallEntry, ServiceContext serviceContext)
public static java.util.List<WallEntry> findByGroupId(long groupId)
groupId
- the group IDpublic static java.util.List<WallEntry> findByGroupId(long groupId, 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 WallEntryModelImpl
.
groupId
- the group IDstart
- the lower bound of the range of wall entriesend
- the upper bound of the range of wall entries (not inclusive)public static java.util.List<WallEntry> findByGroupId(long groupId, int start, int end, OrderByComparator<WallEntry> 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 WallEntryModelImpl
.
groupId
- the group IDstart
- the lower bound of the range of wall entriesend
- the upper bound of the range of wall entries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<WallEntry> findByGroupId(long groupId, int start, int end, OrderByComparator<WallEntry> 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 WallEntryModelImpl
.
groupId
- the group IDstart
- the lower bound of the range of wall entriesend
- the upper bound of the range of wall entries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static WallEntry findByGroupId_First(long groupId, OrderByComparator<WallEntry> orderByComparator) throws NoSuchWallEntryException
groupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchWallEntryException
- if a matching wall entry could not be foundpublic static WallEntry fetchByGroupId_First(long groupId, OrderByComparator<WallEntry> orderByComparator)
groupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching wall entry could not be foundpublic static WallEntry findByGroupId_Last(long groupId, OrderByComparator<WallEntry> orderByComparator) throws NoSuchWallEntryException
groupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchWallEntryException
- if a matching wall entry could not be foundpublic static WallEntry fetchByGroupId_Last(long groupId, OrderByComparator<WallEntry> orderByComparator)
groupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching wall entry could not be foundpublic static WallEntry[] findByGroupId_PrevAndNext(long wallEntryId, long groupId, OrderByComparator<WallEntry> orderByComparator) throws NoSuchWallEntryException
wallEntryId
- the primary key of the current wall entrygroupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchWallEntryException
- if a wall entry with the primary key could not be foundpublic static void removeByGroupId(long groupId)
groupId
- the group IDpublic static int countByGroupId(long groupId)
groupId
- the group IDpublic static java.util.List<WallEntry> findByUserId(long userId)
userId
- the user IDpublic static java.util.List<WallEntry> findByUserId(long userId, 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 WallEntryModelImpl
.
userId
- the user IDstart
- the lower bound of the range of wall entriesend
- the upper bound of the range of wall entries (not inclusive)public static java.util.List<WallEntry> findByUserId(long userId, int start, int end, OrderByComparator<WallEntry> 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 WallEntryModelImpl
.
userId
- the user IDstart
- the lower bound of the range of wall entriesend
- the upper bound of the range of wall entries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<WallEntry> findByUserId(long userId, int start, int end, OrderByComparator<WallEntry> 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 WallEntryModelImpl
.
userId
- the user IDstart
- the lower bound of the range of wall entriesend
- the upper bound of the range of wall entries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static WallEntry findByUserId_First(long userId, OrderByComparator<WallEntry> orderByComparator) throws NoSuchWallEntryException
userId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchWallEntryException
- if a matching wall entry could not be foundpublic static WallEntry fetchByUserId_First(long userId, OrderByComparator<WallEntry> orderByComparator)
userId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching wall entry could not be foundpublic static WallEntry findByUserId_Last(long userId, OrderByComparator<WallEntry> orderByComparator) throws NoSuchWallEntryException
userId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchWallEntryException
- if a matching wall entry could not be foundpublic static WallEntry fetchByUserId_Last(long userId, OrderByComparator<WallEntry> orderByComparator)
userId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching wall entry could not be foundpublic static WallEntry[] findByUserId_PrevAndNext(long wallEntryId, long userId, OrderByComparator<WallEntry> orderByComparator) throws NoSuchWallEntryException
wallEntryId
- the primary key of the current wall entryuserId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchWallEntryException
- if a wall entry with the primary key could not be foundpublic static void removeByUserId(long userId)
userId
- the user IDpublic static int countByUserId(long userId)
userId
- the user IDpublic static java.util.List<WallEntry> findByG_U(long groupId, long userId)
groupId
- the group IDuserId
- the user IDpublic static java.util.List<WallEntry> findByG_U(long groupId, long userId, 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 WallEntryModelImpl
.
groupId
- the group IDuserId
- the user IDstart
- the lower bound of the range of wall entriesend
- the upper bound of the range of wall entries (not inclusive)public static java.util.List<WallEntry> findByG_U(long groupId, long userId, int start, int end, OrderByComparator<WallEntry> 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 WallEntryModelImpl
.
groupId
- the group IDuserId
- the user IDstart
- the lower bound of the range of wall entriesend
- the upper bound of the range of wall entries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<WallEntry> findByG_U(long groupId, long userId, int start, int end, OrderByComparator<WallEntry> 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 WallEntryModelImpl
.
groupId
- the group IDuserId
- the user IDstart
- the lower bound of the range of wall entriesend
- the upper bound of the range of wall entries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static WallEntry findByG_U_First(long groupId, long userId, OrderByComparator<WallEntry> orderByComparator) throws NoSuchWallEntryException
groupId
- the group IDuserId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchWallEntryException
- if a matching wall entry could not be foundpublic static WallEntry fetchByG_U_First(long groupId, long userId, OrderByComparator<WallEntry> orderByComparator)
groupId
- the group IDuserId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching wall entry could not be foundpublic static WallEntry findByG_U_Last(long groupId, long userId, OrderByComparator<WallEntry> orderByComparator) throws NoSuchWallEntryException
groupId
- the group IDuserId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchWallEntryException
- if a matching wall entry could not be foundpublic static WallEntry fetchByG_U_Last(long groupId, long userId, OrderByComparator<WallEntry> orderByComparator)
groupId
- the group IDuserId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching wall entry could not be foundpublic static WallEntry[] findByG_U_PrevAndNext(long wallEntryId, long groupId, long userId, OrderByComparator<WallEntry> orderByComparator) throws NoSuchWallEntryException
wallEntryId
- the primary key of the current wall entrygroupId
- the group IDuserId
- the user IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchWallEntryException
- if a wall entry with the primary key could not be foundpublic static void removeByG_U(long groupId, long userId)
groupId
- the group IDuserId
- the user IDpublic static int countByG_U(long groupId, long userId)
groupId
- the group IDuserId
- the user IDpublic static void cacheResult(WallEntry wallEntry)
wallEntry
- the wall entrypublic static void cacheResult(java.util.List<WallEntry> wallEntries)
wallEntries
- the wall entriespublic static WallEntry create(long wallEntryId)
wallEntryId
- the primary key for the new wall entrypublic static WallEntry remove(long wallEntryId) throws NoSuchWallEntryException
wallEntryId
- the primary key of the wall entryNoSuchWallEntryException
- if a wall entry with the primary key could not be foundpublic static WallEntry findByPrimaryKey(long wallEntryId) throws NoSuchWallEntryException
NoSuchWallEntryException
if it could not be found.wallEntryId
- the primary key of the wall entryNoSuchWallEntryException
- if a wall entry with the primary key could not be foundpublic static WallEntry fetchByPrimaryKey(long wallEntryId)
null
if it could not be found.wallEntryId
- the primary key of the wall entrynull
if a wall entry with the primary key could not be foundpublic static java.util.List<WallEntry> findAll()
public static java.util.List<WallEntry> 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 WallEntryModelImpl
.
start
- the lower bound of the range of wall entriesend
- the upper bound of the range of wall entries (not inclusive)public static java.util.List<WallEntry> findAll(int start, int end, OrderByComparator<WallEntry> 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 WallEntryModelImpl
.
start
- the lower bound of the range of wall entriesend
- the upper bound of the range of wall entries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<WallEntry> findAll(int start, int end, OrderByComparator<WallEntry> 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 WallEntryModelImpl
.
start
- the lower bound of the range of wall entriesend
- the upper bound of the range of wall entries (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 WallEntryPersistence getPersistence()