Liferay 6.2-ce-ga5

com.liferay.portlet.asset.service
Class AssetLinkLocalServiceWrapper

java.lang.Object
  extended by com.liferay.portlet.asset.service.AssetLinkLocalServiceWrapper
All Implemented Interfaces:
BaseLocalService, PersistedModelLocalService, ServiceWrapper<AssetLinkLocalService>, AssetLinkLocalService

@ProviderType
public class AssetLinkLocalServiceWrapper
extends Object
implements AssetLinkLocalService, ServiceWrapper<AssetLinkLocalService>

Provides a wrapper for AssetLinkLocalService.

See Also:
AssetLinkLocalService

Constructor Summary
AssetLinkLocalServiceWrapper(AssetLinkLocalService assetLinkLocalService)
           
 
Method Summary
 AssetLink addAssetLink(AssetLink assetLink)
          Adds the asset link to the database.
 AssetLink addLink(long userId, long entryId1, long entryId2, int type, int weight)
          Adds a new asset link.
 AssetLink createAssetLink(long linkId)
          Creates a new asset link with the primary key.
 AssetLink deleteAssetLink(AssetLink assetLink)
          Deletes the asset link from the database.
 AssetLink deleteAssetLink(long linkId)
          Deletes the asset link with the primary key from the database.
 void deleteLink(AssetLink link)
          Deletes the asset link.
 void deleteLink(long linkId)
          Deletes the asset link.
 void deleteLinks(long entryId)
          Deletes all links associated with the asset entry.
 void deleteLinks(long entryId1, long entryId2)
          Delete all links that associate the two asset entries.
 DynamicQuery dynamicQuery()
           
 List dynamicQuery(DynamicQuery dynamicQuery)
          Performs a dynamic query on the database and returns the matching rows.
 List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
          Performs a dynamic query on the database and returns a range of the matching rows.
 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.
 long dynamicQueryCount(DynamicQuery dynamicQuery)
          Returns the number of rows that match the dynamic query.
 long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
          Returns the number of rows that match the dynamic query.
 AssetLink fetchAssetLink(long linkId)
           
 AssetLink getAssetLink(long linkId)
          Returns the asset link with the primary key.
 List<AssetLink> getAssetLinks(int start, int end)
          Returns a range of all the asset links.
 int getAssetLinksCount()
          Returns the number of asset links.
 String getBeanIdentifier()
          Returns the Spring bean ID for this bean.
 List<AssetLink> getDirectLinks(long entryId)
          Returns all the asset links whose first entry ID is the given entry ID.
 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.
 List<AssetLink> getLinks(long entryId)
          Returns all the asset links whose first or second entry ID is the given entry ID.
 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.
 PersistedModel getPersistedModel(Serializable primaryKeyObj)
           
 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.
 AssetLinkLocalService getWrappedAssetLinkLocalService()
          Deprecated. As of 6.1.0, replaced by getWrappedService()
 AssetLinkLocalService getWrappedService()
           
 void setBeanIdentifier(String beanIdentifier)
          Sets the Spring bean ID for this bean.
 void setWrappedAssetLinkLocalService(AssetLinkLocalService assetLinkLocalService)
          Deprecated. As of 6.1.0, replaced by setWrappedService(com.liferay.portlet.asset.service.AssetLinkLocalService)
 void setWrappedService(AssetLinkLocalService assetLinkLocalService)
           
 AssetLink updateAssetLink(AssetLink assetLink)
          Updates the asset link in the database or adds it if it does not yet exist.
 AssetLink updateLink(long userId, long entryId1, long entryId2, int typeId, int weight)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetLinkLocalServiceWrapper

public AssetLinkLocalServiceWrapper(AssetLinkLocalService assetLinkLocalService)
Method Detail

addAssetLink

public AssetLink addAssetLink(AssetLink assetLink)
                       throws SystemException
Adds the asset link to the database. Also notifies the appropriate model listeners.

Specified by:
addAssetLink in interface AssetLinkLocalService
Parameters:
assetLink - the asset link
Returns:
the asset link that was added
Throws:
SystemException - if a system exception occurred

createAssetLink

public AssetLink createAssetLink(long linkId)
Creates a new asset link with the primary key. Does not add the asset link to the database.

Specified by:
createAssetLink in interface AssetLinkLocalService
Parameters:
linkId - the primary key for the new asset link
Returns:
the new asset link

deleteAssetLink

public AssetLink deleteAssetLink(long linkId)
                          throws PortalException,
                                 SystemException
Deletes the asset link with the primary key from the database. Also notifies the appropriate model listeners.

Specified by:
deleteAssetLink in interface AssetLinkLocalService
Parameters:
linkId - the primary key of the asset link
Returns:
the asset link that was removed
Throws:
PortalException - if a asset link with the primary key could not be found
SystemException - if a system exception occurred

deleteAssetLink

public AssetLink deleteAssetLink(AssetLink assetLink)
                          throws SystemException
Deletes the asset link from the database. Also notifies the appropriate model listeners.

Specified by:
deleteAssetLink in interface AssetLinkLocalService
Parameters:
assetLink - the asset link
Returns:
the asset link that was removed
Throws:
SystemException - if a system exception occurred

dynamicQuery

public DynamicQuery dynamicQuery()
Specified by:
dynamicQuery in interface AssetLinkLocalService

dynamicQuery

public List dynamicQuery(DynamicQuery dynamicQuery)
                  throws SystemException
Performs a dynamic query on the database and returns the matching rows.

Specified by:
dynamicQuery in interface AssetLinkLocalService
Parameters:
dynamicQuery - the dynamic query
Returns:
the matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

public List dynamicQuery(DynamicQuery dynamicQuery,
                         int start,
                         int end)
                  throws SystemException
Performs a dynamic query on the database and returns a range of the matching rows.

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.

Specified by:
dynamicQuery in interface AssetLinkLocalService
Parameters:
dynamicQuery - the dynamic query
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (not inclusive)
Returns:
the range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

public List dynamicQuery(DynamicQuery dynamicQuery,
                         int start,
                         int end,
                         OrderByComparator orderByComparator)
                  throws SystemException
Performs a dynamic query on the database and returns an ordered range of the matching rows.

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.

Specified by:
dynamicQuery in interface AssetLinkLocalService
Parameters:
dynamicQuery - the dynamic query
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQueryCount

public long dynamicQueryCount(DynamicQuery dynamicQuery)
                       throws SystemException
Returns the number of rows that match the dynamic query.

Specified by:
dynamicQueryCount in interface AssetLinkLocalService
Parameters:
dynamicQuery - the dynamic query
Returns:
the number of rows that match the dynamic query
Throws:
SystemException - if a system exception occurred

dynamicQueryCount

public long dynamicQueryCount(DynamicQuery dynamicQuery,
                              Projection projection)
                       throws SystemException
Returns the number of rows that match the dynamic query.

Specified by:
dynamicQueryCount in interface AssetLinkLocalService
Parameters:
dynamicQuery - the dynamic query
projection - the projection to apply to the query
Returns:
the number of rows that match the dynamic query
Throws:
SystemException - if a system exception occurred

fetchAssetLink

public AssetLink fetchAssetLink(long linkId)
                         throws SystemException
Specified by:
fetchAssetLink in interface AssetLinkLocalService
Throws:
SystemException

getAssetLink

public AssetLink getAssetLink(long linkId)
                       throws PortalException,
                              SystemException
Returns the asset link with the primary key.

Specified by:
getAssetLink in interface AssetLinkLocalService
Parameters:
linkId - the primary key of the asset link
Returns:
the asset link
Throws:
PortalException - if a asset link with the primary key could not be found
SystemException - if a system exception occurred

getPersistedModel

public PersistedModel getPersistedModel(Serializable primaryKeyObj)
                                 throws PortalException,
                                        SystemException
Specified by:
getPersistedModel in interface PersistedModelLocalService
Specified by:
getPersistedModel in interface AssetLinkLocalService
Throws:
PortalException
SystemException

getAssetLinks

public List<AssetLink> getAssetLinks(int start,
                                     int end)
                              throws SystemException
Returns a range of all the asset links.

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.

Specified by:
getAssetLinks in interface AssetLinkLocalService
Parameters:
start - the lower bound of the range of asset links
end - the upper bound of the range of asset links (not inclusive)
Returns:
the range of asset links
Throws:
SystemException - if a system exception occurred

getAssetLinksCount

public int getAssetLinksCount()
                       throws SystemException
Returns the number of asset links.

Specified by:
getAssetLinksCount in interface AssetLinkLocalService
Returns:
the number of asset links
Throws:
SystemException - if a system exception occurred

updateAssetLink

public AssetLink updateAssetLink(AssetLink assetLink)
                          throws SystemException
Updates the asset link in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Specified by:
updateAssetLink in interface AssetLinkLocalService
Parameters:
assetLink - the asset link
Returns:
the asset link that was updated
Throws:
SystemException - if a system exception occurred

getBeanIdentifier

public String getBeanIdentifier()
Returns the Spring bean ID for this bean.

Specified by:
getBeanIdentifier in interface AssetLinkLocalService
Returns:
the Spring bean ID for this bean

setBeanIdentifier

public void setBeanIdentifier(String beanIdentifier)
Sets the Spring bean ID for this bean.

Specified by:
setBeanIdentifier in interface AssetLinkLocalService
Parameters:
beanIdentifier - the Spring bean ID for this bean

addLink

public AssetLink addLink(long userId,
                         long entryId1,
                         long entryId2,
                         int type,
                         int weight)
                  throws PortalException,
                         SystemException
Adds a new asset link.

Specified by:
addLink in interface AssetLinkLocalService
Parameters:
userId - the primary key of the link's creator
entryId1 - the primary key of the first asset entry
entryId2 - the primary key of the second asset entry
type - 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 AssetLinkConstants
weight - the weight of the relationship, allowing precedence ordering of links
Returns:
the asset link
Throws:
PortalException - if the user could not be found
SystemException - if a system exception occurred

deleteLink

public void deleteLink(AssetLink link)
                throws SystemException
Deletes the asset link.

Specified by:
deleteLink in interface AssetLinkLocalService
Parameters:
link - the asset link
Throws:
SystemException - if a system exception occurred

deleteLink

public void deleteLink(long linkId)
                throws PortalException,
                       SystemException
Deletes the asset link.

Specified by:
deleteLink in interface AssetLinkLocalService
Parameters:
linkId - the primary key of the asset link
Throws:
PortalException - if the asset link could not be found
SystemException - if a system exception occurred

deleteLinks

public void deleteLinks(long entryId)
                 throws SystemException
Deletes all links associated with the asset entry.

Specified by:
deleteLinks in interface AssetLinkLocalService
Parameters:
entryId - the primary key of the asset entry
Throws:
SystemException - if a system exception occurred

deleteLinks

public void deleteLinks(long entryId1,
                        long entryId2)
                 throws SystemException
Delete all links that associate the two asset entries.

Specified by:
deleteLinks in interface AssetLinkLocalService
Parameters:
entryId1 - the primary key of the first asset entry
entryId2 - the primary key of the second asset entry
Throws:
SystemException - if a system exception occurred

getDirectLinks

public List<AssetLink> getDirectLinks(long entryId)
                               throws SystemException
Returns all the asset links whose first entry ID is the given entry ID.

Specified by:
getDirectLinks in interface AssetLinkLocalService
Parameters:
entryId - the primary key of the asset entry
Returns:
the asset links whose first entry ID is the given entry ID
Throws:
SystemException - if a system exception occurred

getDirectLinks

public List<AssetLink> getDirectLinks(long entryId,
                                      int typeId)
                               throws SystemException
Returns all the asset links of the given link type whose first entry ID is the given entry ID.

Specified by:
getDirectLinks in interface AssetLinkLocalService
Parameters:
entryId - the primary key of the asset entry
typeId - 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 AssetLinkConstants
Returns:
the asset links of the given link type whose first entry ID is the given entry ID
Throws:
SystemException - if a system exception occurred

getLinks

public List<AssetLink> getLinks(long entryId)
                         throws SystemException
Returns all the asset links whose first or second entry ID is the given entry ID.

Specified by:
getLinks in interface AssetLinkLocalService
Parameters:
entryId - the primary key of the asset entry
Returns:
the asset links whose first or second entry ID is the given entry ID
Throws:
SystemException - if a system exception occurred

getLinks

public List<AssetLink> getLinks(long entryId,
                                int typeId)
                         throws SystemException
Returns all the asset links of the given link type whose first or second entry ID is the given entry ID.

Specified by:
getLinks in interface AssetLinkLocalService
Parameters:
entryId - the primary key of the asset entry
typeId - 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 AssetLinkConstants
Returns:
the asset links of the given link type whose first or second entry ID is the given entry ID
Throws:
SystemException - if a system exception occurred

getReverseLinks

public List<AssetLink> getReverseLinks(long entryId,
                                       int typeId)
                                throws SystemException
Returns all the asset links of the given link type whose second entry ID is the given entry ID.

Specified by:
getReverseLinks in interface AssetLinkLocalService
Parameters:
entryId - the primary key of the asset entry
typeId - 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 AssetLinkConstants
Returns:
the asset links of the given link type whose second entry ID is the given entry ID
Throws:
SystemException - if a system exception occurred

updateLink

public AssetLink updateLink(long userId,
                            long entryId1,
                            long entryId2,
                            int typeId,
                            int weight)
                     throws PortalException,
                            SystemException
Specified by:
updateLink in interface AssetLinkLocalService
Throws:
PortalException
SystemException

updateLinks

public void updateLinks(long userId,
                        long entryId,
                        long[] linkEntryIds,
                        int typeId)
                 throws PortalException,
                        SystemException
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.

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.

Specified by:
updateLinks in interface AssetLinkLocalService
Parameters:
userId - the primary key of the user updating the links
entryId - the primary key of the asset entry to be managed
linkEntryIds - the primary keys of the asset entries to be linked with the asset entry to be managed
typeId - 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 AssetLinkConstants
Throws:
PortalException - if the user could not be found
SystemException - if a system exception occurred

getWrappedAssetLinkLocalService

public AssetLinkLocalService getWrappedAssetLinkLocalService()
Deprecated. As of 6.1.0, replaced by getWrappedService()


setWrappedAssetLinkLocalService

public void setWrappedAssetLinkLocalService(AssetLinkLocalService assetLinkLocalService)
Deprecated. As of 6.1.0, replaced by setWrappedService(com.liferay.portlet.asset.service.AssetLinkLocalService)


getWrappedService

public AssetLinkLocalService getWrappedService()
Specified by:
getWrappedService in interface ServiceWrapper<AssetLinkLocalService>

setWrappedService

public void setWrappedService(AssetLinkLocalService assetLinkLocalService)
Specified by:
setWrappedService in interface ServiceWrapper<AssetLinkLocalService>

Liferay 6.2-ce-ga5