@ProviderType
public class AssetLinkLocalServiceUtil
extends java.lang.Object
com.liferay.portlet.asset.service.impl.AssetLinkLocalServiceImpl and is the
primary access point for service operations in application layer code running
on the local server. Methods of this service will not have security checks
based on the propagated JAAS credentials because this service can only be
accessed from within the same VM.AssetLinkLocalService,
com.liferay.portlet.asset.service.base.AssetLinkLocalServiceBaseImpl,
com.liferay.portlet.asset.service.impl.AssetLinkLocalServiceImpl| Constructor and Description |
|---|
AssetLinkLocalServiceUtil() |
| Modifier and Type | Method and Description |
|---|---|
static AssetLink |
addAssetLink(AssetLink assetLink)
Adds the asset link to the database.
|
static AssetLink |
addLink(long userId,
long entryId1,
long entryId2,
int type,
int weight)
Adds a new asset link.
|
static AssetLink |
createAssetLink(long linkId)
Creates a new asset link with the primary key.
|
static AssetLink |
deleteAssetLink(AssetLink assetLink)
Deletes the asset link from the database.
|
static AssetLink |
deleteAssetLink(long linkId)
Deletes the asset link with the primary key from the database.
|
static void |
deleteLink(AssetLink link)
Deletes the asset link.
|
static void |
deleteLink(long linkId)
Deletes the asset link.
|
static void |
deleteLinks(long entryId)
Deletes all links associated with the asset entry.
|
static void |
deleteLinks(long entryId1,
long entryId2)
Delete all links that associate the two asset entries.
|
static DynamicQuery |
dynamicQuery() |
static java.util.List |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.
|
static java.util.List |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows.
|
static java.util.List |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows.
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows that match the dynamic query.
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery,
Projection projection)
Returns the number of rows that match the dynamic query.
|
static AssetLink |
fetchAssetLink(long linkId) |
static AssetLink |
getAssetLink(long linkId)
Returns the asset link with the primary key.
|
static java.util.List<AssetLink> |
getAssetLinks(int start,
int end)
Returns a range of all the asset links.
|
static int |
getAssetLinksCount()
Returns the number of asset links.
|
static java.lang.String |
getBeanIdentifier()
Returns the Spring bean ID for this bean.
|
static java.util.List<AssetLink> |
getDirectLinks(long entryId)
Returns all the asset links whose first entry ID is the given entry ID.
|
static java.util.List<AssetLink> |
getDirectLinks(long entryId,
int typeId)
Returns all the asset links of the given link type whose first entry ID
is the given entry ID.
|
static java.util.List<AssetLink> |
getLinks(long entryId)
Returns all the asset links whose first or second entry ID is the given
entry ID.
|
static java.util.List<AssetLink> |
getLinks(long entryId,
int typeId)
Returns all the asset links of the given link type whose first or second
entry ID is the given entry ID.
|
static PersistedModel |
getPersistedModel(java.io.Serializable primaryKeyObj) |
static java.util.List<AssetLink> |
getReverseLinks(long entryId,
int typeId)
Returns all the asset links of the given link type whose second entry ID
is the given entry ID.
|
static AssetLinkLocalService |
getService() |
static void |
setBeanIdentifier(java.lang.String beanIdentifier)
Sets the Spring bean ID for this bean.
|
void |
setService(AssetLinkLocalService service)
Deprecated.
As of 6.2.0
|
static AssetLink |
updateAssetLink(AssetLink assetLink)
Updates the asset link in the database or adds it if it does not yet exist.
|
static AssetLink |
updateLink(long userId,
long entryId1,
long entryId2,
int typeId,
int weight) |
static void |
updateLinks(long userId,
long entryId,
long[] linkEntryIds,
int typeId)
Updates all links of the asset entry, replacing them with links
associating the asset entry with the asset entries of the given link
entry IDs.
|
public static AssetLink addAssetLink(AssetLink assetLink) throws SystemException
assetLink - the asset linkSystemException - if a system exception occurredpublic static AssetLink createAssetLink(long linkId)
linkId - the primary key for the new asset linkpublic static AssetLink deleteAssetLink(long linkId) throws PortalException, SystemException
linkId - the primary key of the asset linkPortalException - if a asset link with the primary key could not be foundSystemException - if a system exception occurredpublic static AssetLink deleteAssetLink(AssetLink assetLink) throws SystemException
assetLink - the asset linkSystemException - if a system exception occurredpublic static DynamicQuery dynamicQuery()
public static java.util.List dynamicQuery(DynamicQuery dynamicQuery) throws SystemException
dynamicQuery - the dynamic querySystemException - if a system exception occurredpublic static java.util.List dynamicQuery(DynamicQuery dynamicQuery, 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from AssetLinkModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
dynamicQuery - the dynamic querystart - the lower bound of the range of model instancesend - the upper bound of the range of model instances (not inclusive)SystemException - if a system exception occurredpublic static java.util.List dynamicQuery(DynamicQuery dynamicQuery, 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from AssetLinkModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
dynamicQuery - the dynamic querystart - the lower bound of the range of model instancesend - the upper bound of the range of model instances (not inclusive)orderByComparator - the comparator to order the results by (optionally null)SystemException - if a system exception occurredpublic static long dynamicQueryCount(DynamicQuery dynamicQuery) throws SystemException
dynamicQuery - the dynamic querySystemException - if a system exception occurredpublic static long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) throws SystemException
dynamicQuery - the dynamic queryprojection - the projection to apply to the querySystemException - if a system exception occurredpublic static AssetLink fetchAssetLink(long linkId) throws SystemException
SystemExceptionpublic static AssetLink getAssetLink(long linkId) throws PortalException, SystemException
linkId - the primary key of the asset linkPortalException - if a asset link with the primary key could not be foundSystemException - if a system exception occurredpublic static PersistedModel getPersistedModel(java.io.Serializable primaryKeyObj) throws PortalException, SystemException
PortalExceptionSystemExceptionpublic static java.util.List<AssetLink> getAssetLinks(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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from AssetLinkModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start - the lower bound of the range of asset linksend - the upper bound of the range of asset links (not inclusive)SystemException - if a system exception occurredpublic static int getAssetLinksCount()
throws SystemException
SystemException - if a system exception occurredpublic static AssetLink updateAssetLink(AssetLink assetLink) throws SystemException
assetLink - the asset linkSystemException - if a system exception occurredpublic static java.lang.String getBeanIdentifier()
public static void setBeanIdentifier(java.lang.String beanIdentifier)
beanIdentifier - the Spring bean ID for this beanpublic static AssetLink addLink(long userId, long entryId1, long entryId2, int type, int weight) throws PortalException, SystemException
userId - the primary key of the link's creatorentryId1 - the primary key of the first asset entryentryId2 - the primary key of the second asset entrytype - the link type. Acceptable values include AssetLinkConstants.TYPE_RELATED
which is a bidirectional relationship and AssetLinkConstants.TYPE_CHILD
which is a unidirectional relationship. For more information see
AssetLinkConstantsweight - the weight of the relationship, allowing precedence
ordering of linksPortalException - if the user could not be foundSystemException - if a system exception occurredpublic static void deleteLink(AssetLink link) throws SystemException
link - the asset linkSystemException - if a system exception occurredpublic static void deleteLink(long linkId)
throws PortalException,
SystemException
linkId - the primary key of the asset linkPortalException - if the asset link could not be foundSystemException - if a system exception occurredpublic static void deleteLinks(long entryId)
throws SystemException
entryId - the primary key of the asset entrySystemException - if a system exception occurredpublic static void deleteLinks(long entryId1,
long entryId2)
throws SystemException
entryId1 - the primary key of the first asset entryentryId2 - the primary key of the second asset entrySystemException - if a system exception occurredpublic static java.util.List<AssetLink> getDirectLinks(long entryId) throws SystemException
entryId - the primary key of the asset entrySystemException - if a system exception occurredpublic static java.util.List<AssetLink> getDirectLinks(long entryId, int typeId) throws SystemException
entryId - the primary key of the asset entrytypeId - the link type. Acceptable values include AssetLinkConstants.TYPE_RELATED
which is a bidirectional relationship and AssetLinkConstants.TYPE_CHILD
which is a unidirectional relationship. For more information see
AssetLinkConstantsSystemException - if a system exception occurredpublic static java.util.List<AssetLink> getLinks(long entryId) throws SystemException
entryId - the primary key of the asset entrySystemException - if a system exception occurredpublic static java.util.List<AssetLink> getLinks(long entryId, int typeId) throws SystemException
entryId - the primary key of the asset entrytypeId - the link type. Acceptable values include AssetLinkConstants.TYPE_RELATED
which is a bidirectional relationship and AssetLinkConstants.TYPE_CHILD
which is a unidirectional relationship. For more information see
AssetLinkConstantsSystemException - if a system exception occurredpublic static java.util.List<AssetLink> getReverseLinks(long entryId, int typeId) throws SystemException
entryId - the primary key of the asset entrytypeId - the link type. Acceptable values include AssetLinkConstants.TYPE_RELATED
which is a bidirectional relationship and AssetLinkConstants.TYPE_CHILD
which is a unidirectional relationship. For more information see
AssetLinkConstantsSystemException - if a system exception occurredpublic static AssetLink updateLink(long userId, long entryId1, long entryId2, int typeId, int weight) throws PortalException, SystemException
PortalExceptionSystemExceptionpublic static void updateLinks(long userId,
long entryId,
long[] linkEntryIds,
int typeId)
throws PortalException,
SystemException
If no link exists with a given link entry ID, a new link is created associating the current asset entry with the asset entry of that link entry ID. An existing link is deleted if either of its entry IDs is not contained in the given link entry IDs.
userId - the primary key of the user updating the linksentryId - the primary key of the asset entry to be managedlinkEntryIds - the primary keys of the asset entries to be linked
with the asset entry to be managedtypeId - the type of the asset links to be created. Acceptable
values include AssetLinkConstants.TYPE_RELATED
which is a bidirectional relationship and AssetLinkConstants.TYPE_CHILD
which is a unidirectional relationship. For more information see
AssetLinkConstantsPortalException - if the user could not be foundSystemException - if a system exception occurredpublic static AssetLinkLocalService getService()
public void setService(AssetLinkLocalService service)