|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.liferay.portlet.asset.service.persistence.AssetTagUtil
public class AssetTagUtil
The persistence utility for the asset tag service. This utility wraps AssetTagPersistenceImpl
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
AssetTagPersistence
,
AssetTagPersistenceImpl
Constructor Summary | |
---|---|
AssetTagUtil()
|
Method Summary | |
---|---|
static void |
addAssetEntries(long pk,
List<AssetEntry> assetEntries)
Adds an association between the asset tag and the asset entries. |
static void |
addAssetEntries(long pk,
long[] assetEntryPKs)
Adds an association between the asset tag and the asset entries. |
static void |
addAssetEntry(long pk,
AssetEntry assetEntry)
Adds an association between the asset tag and the asset entry. |
static void |
addAssetEntry(long pk,
long assetEntryPK)
Adds an association between the asset tag and the asset entry. |
static void |
cacheResult(AssetTag assetTag)
Caches the asset tag in the entity cache if it is enabled. |
static void |
cacheResult(List<AssetTag> assetTags)
Caches the asset tags in the entity cache if it is enabled. |
static void |
clearAssetEntries(long pk)
Clears all associations between the asset tag and its asset entries. |
static void |
clearCache()
|
static void |
clearCache(AssetTag assetTag)
|
static boolean |
containsAssetEntries(long pk)
Returns true if the asset tag has any asset entries associated with it. |
static boolean |
containsAssetEntry(long pk,
long assetEntryPK)
Returns true if the asset entry is associated with the asset tag. |
static int |
countAll()
Returns the number of asset tags. |
static int |
countByG_N(long groupId,
String name)
Returns the number of asset tags where groupId = ? and name = ?. |
static int |
countByGroupId(long groupId)
Returns the number of asset tags where groupId = ?. |
long |
countWithDynamicQuery(DynamicQuery dynamicQuery)
|
static AssetTag |
create(long tagId)
Creates a new asset tag with the primary key. |
static AssetTag |
fetchByG_N(long groupId,
String name)
Returns the asset tag where groupId = ? and name = ? or returns null if it could not be found. |
static AssetTag |
fetchByG_N(long groupId,
String name,
boolean retrieveFromCache)
Returns the asset tag where groupId = ? and name = ? or returns null if it could not be found, optionally using the finder cache. |
static AssetTag |
fetchByGroupId_First(long groupId,
OrderByComparator orderByComparator)
Returns the first asset tag in the ordered set where groupId = ?. |
static AssetTag |
fetchByGroupId_Last(long groupId,
OrderByComparator orderByComparator)
Returns the last asset tag in the ordered set where groupId = ?. |
static AssetTag |
fetchByPrimaryKey(long tagId)
Returns the asset tag with the primary key or returns null if it could not be found. |
static int |
filterCountByGroupId(long groupId)
Returns the number of asset tags that the user has permission to view where groupId = ?. |
static AssetTag[] |
filterFindByGroupId_PrevAndNext(long tagId,
long groupId,
OrderByComparator orderByComparator)
Returns the asset tags before and after the current asset tag in the ordered set of asset tags that the user has permission to view where groupId = ?. |
static List<AssetTag> |
filterFindByGroupId(long groupId)
Returns all the asset tags that the user has permission to view where groupId = ?. |
static List<AssetTag> |
filterFindByGroupId(long groupId,
int start,
int end)
Returns a range of all the asset tags that the user has permission to view where groupId = ?. |
static List<AssetTag> |
filterFindByGroupId(long groupId,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the asset tags that the user has permissions to view where groupId = ?. |
static List<AssetTag> |
findAll()
Returns all the asset tags. |
static List<AssetTag> |
findAll(int start,
int end)
Returns a range of all the asset tags. |
static List<AssetTag> |
findAll(int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the asset tags. |
static AssetTag |
findByG_N(long groupId,
String name)
Returns the asset tag where groupId = ? and name = ? or throws a NoSuchTagException if it could not be found. |
static AssetTag |
findByGroupId_First(long groupId,
OrderByComparator orderByComparator)
Returns the first asset tag in the ordered set where groupId = ?. |
static AssetTag |
findByGroupId_Last(long groupId,
OrderByComparator orderByComparator)
Returns the last asset tag in the ordered set where groupId = ?. |
static AssetTag[] |
findByGroupId_PrevAndNext(long tagId,
long groupId,
OrderByComparator orderByComparator)
Returns the asset tags before and after the current asset tag in the ordered set where groupId = ?. |
static List<AssetTag> |
findByGroupId(long groupId)
Returns all the asset tags where groupId = ?. |
static List<AssetTag> |
findByGroupId(long groupId,
int start,
int end)
Returns a range of all the asset tags where groupId = ?. |
static List<AssetTag> |
findByGroupId(long groupId,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the asset tags where groupId = ?. |
static AssetTag |
findByPrimaryKey(long tagId)
Returns the asset tag with the primary key or throws a NoSuchTagException if it could not be found. |
static List<AssetTag> |
findWithDynamicQuery(DynamicQuery dynamicQuery)
|
static List<AssetTag> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
|
static List<AssetTag> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator orderByComparator)
|
static List<AssetEntry> |
getAssetEntries(long pk)
Returns all the asset entries associated with the asset tag. |
static List<AssetEntry> |
getAssetEntries(long pk,
int start,
int end)
Returns a range of all the asset entries associated with the asset tag. |
static List<AssetEntry> |
getAssetEntries(long pk,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the asset entries associated with the asset tag. |
static int |
getAssetEntriesSize(long pk)
Returns the number of asset entries associated with the asset tag. |
static AssetTagPersistence |
getPersistence()
|
static AssetTag |
remove(long tagId)
Removes the asset tag with the primary key from the database. |
static void |
removeAll()
Removes all the asset tags from the database. |
static void |
removeAssetEntries(long pk,
List<AssetEntry> assetEntries)
Removes the association between the asset tag and the asset entries. |
static void |
removeAssetEntries(long pk,
long[] assetEntryPKs)
Removes the association between the asset tag and the asset entries. |
static void |
removeAssetEntry(long pk,
AssetEntry assetEntry)
Removes the association between the asset tag and the asset entry. |
static void |
removeAssetEntry(long pk,
long assetEntryPK)
Removes the association between the asset tag and the asset entry. |
static AssetTag |
removeByG_N(long groupId,
String name)
Removes the asset tag where groupId = ? and name = ? from the database. |
static void |
removeByGroupId(long groupId)
Removes all the asset tags where groupId = ? from the database. |
static void |
setAssetEntries(long pk,
List<AssetEntry> assetEntries)
Sets the asset entries associated with the asset tag, removing and adding associations as necessary. |
static void |
setAssetEntries(long pk,
long[] assetEntryPKs)
Sets the asset entries associated with the asset tag, removing and adding associations as necessary. |
void |
setPersistence(AssetTagPersistence persistence)
Deprecated. |
static AssetTag |
update(AssetTag assetTag,
boolean merge)
|
static AssetTag |
update(AssetTag assetTag,
boolean merge,
ServiceContext serviceContext)
|
static AssetTag |
updateImpl(AssetTag assetTag,
boolean merge)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AssetTagUtil()
Method Detail |
---|
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(AssetTag assetTag)
BasePersistence.clearCache(com.liferay.portal.model.BaseModel)
public long countWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException
SystemException
BasePersistence.countWithDynamicQuery(DynamicQuery)
public static List<AssetTag> findWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static List<AssetTag> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static List<AssetTag> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static AssetTag update(AssetTag assetTag, boolean merge) throws SystemException
SystemException
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean)
public static AssetTag update(AssetTag assetTag, boolean merge, ServiceContext serviceContext) throws SystemException
SystemException
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
public static void cacheResult(AssetTag assetTag)
assetTag
- the asset tagpublic static void cacheResult(List<AssetTag> assetTags)
assetTags
- the asset tagspublic static AssetTag create(long tagId)
tagId
- the primary key for the new asset tag
public static AssetTag remove(long tagId) throws SystemException, NoSuchTagException
tagId
- the primary key of the asset tag
NoSuchTagException
- if a asset tag with the primary key could not be found
SystemException
- if a system exception occurredpublic static AssetTag updateImpl(AssetTag assetTag, boolean merge) throws SystemException
SystemException
public static AssetTag findByPrimaryKey(long tagId) throws SystemException, NoSuchTagException
NoSuchTagException
if it could not be found.
tagId
- the primary key of the asset tag
NoSuchTagException
- if a asset tag with the primary key could not be found
SystemException
- if a system exception occurredpublic static AssetTag fetchByPrimaryKey(long tagId) throws SystemException
null
if it could not be found.
tagId
- the primary key of the asset tag
null
if a asset tag with the primary key could not be found
SystemException
- if a system exception occurredpublic static List<AssetTag> findByGroupId(long groupId) throws SystemException
groupId
- the group ID
SystemException
- if a system exception occurredpublic static List<AssetTag> findByGroupId(long groupId, int start, int end) throws SystemException
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.
groupId
- the group IDstart
- the lower bound of the range of asset tagsend
- the upper bound of the range of asset tags (not inclusive)
SystemException
- if a system exception occurredpublic static List<AssetTag> findByGroupId(long groupId, int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
groupId
- the group IDstart
- the lower bound of the range of asset tagsend
- the upper bound of the range of asset tags (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredpublic static AssetTag findByGroupId_First(long groupId, OrderByComparator orderByComparator) throws SystemException, NoSuchTagException
groupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchTagException
- if a matching asset tag could not be found
SystemException
- if a system exception occurredpublic static AssetTag fetchByGroupId_First(long groupId, OrderByComparator orderByComparator) throws SystemException
groupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching asset tag could not be found
SystemException
- if a system exception occurredpublic static AssetTag findByGroupId_Last(long groupId, OrderByComparator orderByComparator) throws SystemException, NoSuchTagException
groupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchTagException
- if a matching asset tag could not be found
SystemException
- if a system exception occurredpublic static AssetTag fetchByGroupId_Last(long groupId, OrderByComparator orderByComparator) throws SystemException
groupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching asset tag could not be found
SystemException
- if a system exception occurredpublic static AssetTag[] findByGroupId_PrevAndNext(long tagId, long groupId, OrderByComparator orderByComparator) throws SystemException, NoSuchTagException
tagId
- the primary key of the current asset taggroupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchTagException
- if a asset tag with the primary key could not be found
SystemException
- if a system exception occurredpublic static List<AssetTag> filterFindByGroupId(long groupId) throws SystemException
groupId
- the group ID
SystemException
- if a system exception occurredpublic static List<AssetTag> filterFindByGroupId(long groupId, int start, int end) throws SystemException
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.
groupId
- the group IDstart
- the lower bound of the range of asset tagsend
- the upper bound of the range of asset tags (not inclusive)
SystemException
- if a system exception occurredpublic static List<AssetTag> filterFindByGroupId(long groupId, int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
groupId
- the group IDstart
- the lower bound of the range of asset tagsend
- the upper bound of the range of asset tags (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredpublic static AssetTag[] filterFindByGroupId_PrevAndNext(long tagId, long groupId, OrderByComparator orderByComparator) throws SystemException, NoSuchTagException
tagId
- the primary key of the current asset taggroupId
- the group IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchTagException
- if a asset tag with the primary key could not be found
SystemException
- if a system exception occurredpublic static AssetTag findByG_N(long groupId, String name) throws SystemException, NoSuchTagException
NoSuchTagException
if it could not be found.
groupId
- the group IDname
- the name
NoSuchTagException
- if a matching asset tag could not be found
SystemException
- if a system exception occurredpublic static AssetTag fetchByG_N(long groupId, String name) throws SystemException
null
if it could not be found. Uses the finder cache.
groupId
- the group IDname
- the name
null
if a matching asset tag could not be found
SystemException
- if a system exception occurredpublic static AssetTag fetchByG_N(long groupId, String name, boolean retrieveFromCache) throws SystemException
null
if it could not be found, optionally using the finder cache.
groupId
- the group IDname
- the nameretrieveFromCache
- whether to use the finder cache
null
if a matching asset tag could not be found
SystemException
- if a system exception occurredpublic static List<AssetTag> findAll() throws SystemException
SystemException
- if a system exception occurredpublic static List<AssetTag> findAll(int start, int end) throws SystemException
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.
start
- the lower bound of the range of asset tagsend
- the upper bound of the range of asset tags (not inclusive)
SystemException
- if a system exception occurredpublic static List<AssetTag> findAll(int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
start
- the lower bound of the range of asset tagsend
- the upper bound of the range of asset tags (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredpublic static void removeByGroupId(long groupId) throws SystemException
groupId
- the group ID
SystemException
- if a system exception occurredpublic static AssetTag removeByG_N(long groupId, String name) throws SystemException, NoSuchTagException
groupId
- the group IDname
- the name
SystemException
- if a system exception occurred
NoSuchTagException
public static void removeAll() throws SystemException
SystemException
- if a system exception occurredpublic static int countByGroupId(long groupId) throws SystemException
groupId
- the group ID
SystemException
- if a system exception occurredpublic static int filterCountByGroupId(long groupId) throws SystemException
groupId
- the group ID
SystemException
- if a system exception occurredpublic static int countByG_N(long groupId, String name) throws SystemException
groupId
- the group IDname
- the name
SystemException
- if a system exception occurredpublic static int countAll() throws SystemException
SystemException
- if a system exception occurredpublic static List<AssetEntry> getAssetEntries(long pk) throws SystemException
pk
- the primary key of the asset tag
SystemException
- if a system exception occurredpublic static List<AssetEntry> getAssetEntries(long pk, int start, int end) throws SystemException
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.
pk
- the primary key of the asset tagstart
- the lower bound of the range of asset tagsend
- the upper bound of the range of asset tags (not inclusive)
SystemException
- if a system exception occurredpublic static List<AssetEntry> getAssetEntries(long pk, int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
pk
- the primary key of the asset tagstart
- the lower bound of the range of asset tagsend
- the upper bound of the range of asset tags (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredpublic static int getAssetEntriesSize(long pk) throws SystemException
pk
- the primary key of the asset tag
SystemException
- if a system exception occurredpublic static boolean containsAssetEntry(long pk, long assetEntryPK) throws SystemException
true
if the asset entry is associated with the asset tag.
pk
- the primary key of the asset tagassetEntryPK
- the primary key of the asset entry
true
if the asset entry is associated with the asset tag; false
otherwise
SystemException
- if a system exception occurredpublic static boolean containsAssetEntries(long pk) throws SystemException
true
if the asset tag has any asset entries associated with it.
pk
- the primary key of the asset tag to check for associations with asset entries
true
if the asset tag has any asset entries associated with it; false
otherwise
SystemException
- if a system exception occurredpublic static void addAssetEntry(long pk, long assetEntryPK) throws SystemException
pk
- the primary key of the asset tagassetEntryPK
- the primary key of the asset entry
SystemException
- if a system exception occurredpublic static void addAssetEntry(long pk, AssetEntry assetEntry) throws SystemException
pk
- the primary key of the asset tagassetEntry
- the asset entry
SystemException
- if a system exception occurredpublic static void addAssetEntries(long pk, long[] assetEntryPKs) throws SystemException
pk
- the primary key of the asset tagassetEntryPKs
- the primary keys of the asset entries
SystemException
- if a system exception occurredpublic static void addAssetEntries(long pk, List<AssetEntry> assetEntries) throws SystemException
pk
- the primary key of the asset tagassetEntries
- the asset entries
SystemException
- if a system exception occurredpublic static void clearAssetEntries(long pk) throws SystemException
pk
- the primary key of the asset tag to clear the associated asset entries from
SystemException
- if a system exception occurredpublic static void removeAssetEntry(long pk, long assetEntryPK) throws SystemException
pk
- the primary key of the asset tagassetEntryPK
- the primary key of the asset entry
SystemException
- if a system exception occurredpublic static void removeAssetEntry(long pk, AssetEntry assetEntry) throws SystemException
pk
- the primary key of the asset tagassetEntry
- the asset entry
SystemException
- if a system exception occurredpublic static void removeAssetEntries(long pk, long[] assetEntryPKs) throws SystemException
pk
- the primary key of the asset tagassetEntryPKs
- the primary keys of the asset entries
SystemException
- if a system exception occurredpublic static void removeAssetEntries(long pk, List<AssetEntry> assetEntries) throws SystemException
pk
- the primary key of the asset tagassetEntries
- the asset entries
SystemException
- if a system exception occurredpublic static void setAssetEntries(long pk, long[] assetEntryPKs) throws SystemException
pk
- the primary key of the asset tagassetEntryPKs
- the primary keys of the asset entries to be associated with the asset tag
SystemException
- if a system exception occurredpublic static void setAssetEntries(long pk, List<AssetEntry> assetEntries) throws SystemException
pk
- the primary key of the asset tagassetEntries
- the asset entries to be associated with the asset tag
SystemException
- if a system exception occurredpublic static AssetTagPersistence getPersistence()
public void setPersistence(AssetTagPersistence persistence)
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |