Liferay 6.2-ce-ga5

com.liferay.portlet.social.service
Class SocialRelationLocalServiceWrapper

java.lang.Object
  extended by com.liferay.portlet.social.service.SocialRelationLocalServiceWrapper
All Implemented Interfaces:
BaseLocalService, PersistedModelLocalService, ServiceWrapper<SocialRelationLocalService>, SocialRelationLocalService

@ProviderType
public class SocialRelationLocalServiceWrapper
extends Object
implements SocialRelationLocalService, ServiceWrapper<SocialRelationLocalService>

Provides a wrapper for SocialRelationLocalService.

See Also:
SocialRelationLocalService

Constructor Summary
SocialRelationLocalServiceWrapper(SocialRelationLocalService socialRelationLocalService)
           
 
Method Summary
 SocialRelation addRelation(long userId1, long userId2, int type)
          Adds a social relation between the two users to the database.
 SocialRelation addSocialRelation(SocialRelation socialRelation)
          Adds the social relation to the database.
 SocialRelation createSocialRelation(long relationId)
          Creates a new social relation with the primary key.
 void deleteRelation(long relationId)
          Removes the relation (and its inverse in case of a bidirectional relation) from the database.
 void deleteRelation(long userId1, long userId2, int type)
          Removes the matching relation (and its inverse in case of a bidirectional relation) from the database.
 void deleteRelation(SocialRelation relation)
          Removes the relation (and its inverse in case of a bidirectional relation) from the database.
 void deleteRelations(long userId)
          Removes all relations involving the user from the database.
 void deleteRelations(long userId1, long userId2)
          Removes all relations between User1 and User2.
 SocialRelation deleteSocialRelation(long relationId)
          Deletes the social relation with the primary key from the database.
 SocialRelation deleteSocialRelation(SocialRelation socialRelation)
          Deletes the social relation from the database.
 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.
 SocialRelation fetchSocialRelation(long relationId)
           
 SocialRelation fetchSocialRelationByUuidAndCompanyId(String uuid, long companyId)
          Returns the social relation with the matching UUID and company.
 String getBeanIdentifier()
          Returns the Spring bean ID for this bean.
 List<SocialRelation> getInverseRelations(long userId, int type, int start, int end)
          Returns a range of all the inverse relations of the given type for which the user is User2 of the relation.
 int getInverseRelationsCount(long userId, int type)
          Returns the number of inverse relations of the given type for which the user is User2 of the relation.
 PersistedModel getPersistedModel(Serializable primaryKeyObj)
           
 SocialRelation getRelation(long relationId)
          Returns the relation identified by its primary key.
 SocialRelation getRelation(long userId1, long userId2, int type)
          Returns the relation of the given type between User1 and User2.
 List<SocialRelation> getRelations(long userId, int type, int start, int end)
          Returns a range of all the relations of the given type where the user is the subject of the relation.
 List<SocialRelation> getRelations(long userId1, long userId2, int start, int end)
          Returns a range of all the relations between User1 and User2.
 int getRelationsCount(long userId, int type)
          Returns the number of relations of the given type where the user is the subject of the relation.
 int getRelationsCount(long userId1, long userId2)
          Returns the number of relations between User1 and User2.
 SocialRelation getSocialRelation(long relationId)
          Returns the social relation with the primary key.
 SocialRelation getSocialRelationByUuidAndCompanyId(String uuid, long companyId)
          Returns the social relation with the matching UUID and company.
 List<SocialRelation> getSocialRelations(int start, int end)
          Returns a range of all the social relations.
 int getSocialRelationsCount()
          Returns the number of social relations.
 SocialRelationLocalService getWrappedService()
           
 SocialRelationLocalService getWrappedSocialRelationLocalService()
          Deprecated. As of 6.1.0, replaced by getWrappedService()
 boolean hasRelation(long userId1, long userId2, int type)
          Returns true if a relation of the given type exists where the user with primary key userId1 is User1 of the relation and the user with the primary key userId2 is User2 of the relation.
 boolean isRelatable(long userId1, long userId2, int type)
          Returns true if the users can be in a relation of the given type where the user with primary key userId1 is User1 of the relation and the user with the primary key userId2 is User2 of the relation.
 void setBeanIdentifier(String beanIdentifier)
          Sets the Spring bean ID for this bean.
 void setWrappedService(SocialRelationLocalService socialRelationLocalService)
           
 void setWrappedSocialRelationLocalService(SocialRelationLocalService socialRelationLocalService)
          Deprecated. As of 6.1.0, replaced by setWrappedService(com.liferay.portlet.social.service.SocialRelationLocalService)
 SocialRelation updateSocialRelation(SocialRelation socialRelation)
          Updates the social relation in the database or adds it if it does not yet exist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocialRelationLocalServiceWrapper

public SocialRelationLocalServiceWrapper(SocialRelationLocalService socialRelationLocalService)
Method Detail

addSocialRelation

public SocialRelation addSocialRelation(SocialRelation socialRelation)
                                 throws SystemException
Adds the social relation to the database. Also notifies the appropriate model listeners.

Specified by:
addSocialRelation in interface SocialRelationLocalService
Parameters:
socialRelation - the social relation
Returns:
the social relation that was added
Throws:
SystemException - if a system exception occurred

createSocialRelation

public SocialRelation createSocialRelation(long relationId)
Creates a new social relation with the primary key. Does not add the social relation to the database.

Specified by:
createSocialRelation in interface SocialRelationLocalService
Parameters:
relationId - the primary key for the new social relation
Returns:
the new social relation

deleteSocialRelation

public SocialRelation deleteSocialRelation(long relationId)
                                    throws PortalException,
                                           SystemException
Deletes the social relation with the primary key from the database. Also notifies the appropriate model listeners.

Specified by:
deleteSocialRelation in interface SocialRelationLocalService
Parameters:
relationId - the primary key of the social relation
Returns:
the social relation that was removed
Throws:
PortalException - if a social relation with the primary key could not be found
SystemException - if a system exception occurred

deleteSocialRelation

public SocialRelation deleteSocialRelation(SocialRelation socialRelation)
                                    throws SystemException
Deletes the social relation from the database. Also notifies the appropriate model listeners.

Specified by:
deleteSocialRelation in interface SocialRelationLocalService
Parameters:
socialRelation - the social relation
Returns:
the social relation that was removed
Throws:
SystemException - if a system exception occurred

dynamicQuery

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

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 SocialRelationLocalService
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 SocialRelationModelImpl. 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 SocialRelationLocalService
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 SocialRelationModelImpl. 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 SocialRelationLocalService
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 SocialRelationLocalService
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 SocialRelationLocalService
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

fetchSocialRelation

public SocialRelation fetchSocialRelation(long relationId)
                                   throws SystemException
Specified by:
fetchSocialRelation in interface SocialRelationLocalService
Throws:
SystemException

fetchSocialRelationByUuidAndCompanyId

public SocialRelation fetchSocialRelationByUuidAndCompanyId(String uuid,
                                                            long companyId)
                                                     throws SystemException
Returns the social relation with the matching UUID and company.

Specified by:
fetchSocialRelationByUuidAndCompanyId in interface SocialRelationLocalService
Parameters:
uuid - the social relation's UUID
companyId - the primary key of the company
Returns:
the matching social relation, or null if a matching social relation could not be found
Throws:
SystemException - if a system exception occurred

getSocialRelation

public SocialRelation getSocialRelation(long relationId)
                                 throws PortalException,
                                        SystemException
Returns the social relation with the primary key.

Specified by:
getSocialRelation in interface SocialRelationLocalService
Parameters:
relationId - the primary key of the social relation
Returns:
the social relation
Throws:
PortalException - if a social relation 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 SocialRelationLocalService
Throws:
PortalException
SystemException

getSocialRelationByUuidAndCompanyId

public SocialRelation getSocialRelationByUuidAndCompanyId(String uuid,
                                                          long companyId)
                                                   throws PortalException,
                                                          SystemException
Returns the social relation with the matching UUID and company.

Specified by:
getSocialRelationByUuidAndCompanyId in interface SocialRelationLocalService
Parameters:
uuid - the social relation's UUID
companyId - the primary key of the company
Returns:
the matching social relation
Throws:
PortalException - if a matching social relation could not be found
SystemException - if a system exception occurred

getSocialRelations

public List<SocialRelation> getSocialRelations(int start,
                                               int end)
                                        throws SystemException
Returns a range of all the social relations.

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 SocialRelationModelImpl. 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:
getSocialRelations in interface SocialRelationLocalService
Parameters:
start - the lower bound of the range of social relations
end - the upper bound of the range of social relations (not inclusive)
Returns:
the range of social relations
Throws:
SystemException - if a system exception occurred

getSocialRelationsCount

public int getSocialRelationsCount()
                            throws SystemException
Returns the number of social relations.

Specified by:
getSocialRelationsCount in interface SocialRelationLocalService
Returns:
the number of social relations
Throws:
SystemException - if a system exception occurred

updateSocialRelation

public SocialRelation updateSocialRelation(SocialRelation socialRelation)
                                    throws SystemException
Updates the social relation in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Specified by:
updateSocialRelation in interface SocialRelationLocalService
Parameters:
socialRelation - the social relation
Returns:
the social relation 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 SocialRelationLocalService
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 SocialRelationLocalService
Parameters:
beanIdentifier - the Spring bean ID for this bean

addRelation

public SocialRelation addRelation(long userId1,
                                  long userId2,
                                  int type)
                           throws PortalException,
                                  SystemException
Adds a social relation between the two users to the database.

Specified by:
addRelation in interface SocialRelationLocalService
Parameters:
userId1 - the user that is the subject of the relation
userId2 - the user at the other end of the relation
type - the type of the relation
Returns:
the social relation
Throws:
PortalException - if the users could not be found, if the users were not from the same company, or if either of the users was the default user
SystemException - if a system exception occurred

deleteRelation

public void deleteRelation(long relationId)
                    throws PortalException,
                           SystemException
Removes the relation (and its inverse in case of a bidirectional relation) from the database.

Specified by:
deleteRelation in interface SocialRelationLocalService
Parameters:
relationId - the primary key of the relation
Throws:
PortalException - if the relation could not be found
SystemException - if a system exception occurred

deleteRelation

public void deleteRelation(long userId1,
                           long userId2,
                           int type)
                    throws PortalException,
                           SystemException
Removes the matching relation (and its inverse in case of a bidirectional relation) from the database.

Specified by:
deleteRelation in interface SocialRelationLocalService
Parameters:
userId1 - the user that is the subject of the relation
userId2 - the user at the other end of the relation
type - the relation's type
Throws:
PortalException - if the relation or its inverse relation (if applicable) could not be found
SystemException - if a system exception occurred

deleteRelation

public void deleteRelation(SocialRelation relation)
                    throws PortalException,
                           SystemException
Removes the relation (and its inverse in case of a bidirectional relation) from the database.

Specified by:
deleteRelation in interface SocialRelationLocalService
Parameters:
relation - the relation to be removed
Throws:
PortalException - if the relation is bidirectional and its inverse relation could not be found
SystemException - if a system exception occurred

deleteRelations

public void deleteRelations(long userId)
                     throws SystemException
Removes all relations involving the user from the database.

Specified by:
deleteRelations in interface SocialRelationLocalService
Parameters:
userId - the primary key of the user
Throws:
SystemException - if a system exception occurred

deleteRelations

public void deleteRelations(long userId1,
                            long userId2)
                     throws PortalException,
                            SystemException
Removes all relations between User1 and User2.

Specified by:
deleteRelations in interface SocialRelationLocalService
Parameters:
userId1 - the user that is the subject of the relation
userId2 - the user at the other end of the relation
Throws:
PortalException - if the inverse relation could not be found
SystemException - if a system exception occurred

getInverseRelations

public List<SocialRelation> getInverseRelations(long userId,
                                                int type,
                                                int start,
                                                int end)
                                         throws SystemException
Returns a range of all the inverse relations of the given type for which the user is User2 of the relation.

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.

Specified by:
getInverseRelations in interface SocialRelationLocalService
Parameters:
userId - the primary key of the user
type - the relation's type
start - the lower bound of the range of results
end - the upper bound of the range of results (not inclusive)
Returns:
the range of matching relations
Throws:
SystemException - if a system exception occurred

getInverseRelationsCount

public int getInverseRelationsCount(long userId,
                                    int type)
                             throws SystemException
Returns the number of inverse relations of the given type for which the user is User2 of the relation.

Specified by:
getInverseRelationsCount in interface SocialRelationLocalService
Parameters:
userId - the primary key of the user
type - the relation's type
Returns:
the number of matching relations
Throws:
SystemException - if a system exception occurred

getRelation

public SocialRelation getRelation(long relationId)
                           throws PortalException,
                                  SystemException
Returns the relation identified by its primary key.

Specified by:
getRelation in interface SocialRelationLocalService
Parameters:
relationId - the primary key of the relation
Returns:
Returns the relation
Throws:
PortalException - if the relation could not be found
SystemException - if a system exception occurred

getRelation

public SocialRelation getRelation(long userId1,
                                  long userId2,
                                  int type)
                           throws PortalException,
                                  SystemException
Returns the relation of the given type between User1 and User2.

Specified by:
getRelation in interface SocialRelationLocalService
Parameters:
userId1 - the user that is the subject of the relation
userId2 - the user at the other end of the relation
type - the relation's type
Returns:
Returns the relation
Throws:
PortalException - if the relation could not be found
SystemException - if a system exception occurred

getRelations

public List<SocialRelation> getRelations(long userId,
                                         int type,
                                         int start,
                                         int end)
                                  throws SystemException
Returns a range of all the relations of the given type where the user is the subject of the relation.

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.

Specified by:
getRelations in interface SocialRelationLocalService
Parameters:
userId - the primary key of the user
type - the relation's type
start - the lower bound of the range of results
end - the upper bound of the range of results (not inclusive)
Returns:
the range of relations
Throws:
SystemException - if a system exception occurred

getRelations

public List<SocialRelation> getRelations(long userId1,
                                         long userId2,
                                         int start,
                                         int end)
                                  throws SystemException
Returns a range of all the relations between User1 and User2.

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.

Specified by:
getRelations in interface SocialRelationLocalService
Parameters:
userId1 - the user that is the subject of the relation
userId2 - the user at the other end of the relation
start - the lower bound of the range of results
end - the upper bound of the range of results (not inclusive)
Returns:
the range of relations
Throws:
SystemException - if a system exception occurred

getRelationsCount

public int getRelationsCount(long userId,
                             int type)
                      throws SystemException
Returns the number of relations of the given type where the user is the subject of the relation.

Specified by:
getRelationsCount in interface SocialRelationLocalService
Parameters:
userId - the primary key of the user
type - the relation's type
Returns:
the number of relations
Throws:
SystemException - if a system exception occurred

getRelationsCount

public int getRelationsCount(long userId1,
                             long userId2)
                      throws SystemException
Returns the number of relations between User1 and User2.

Specified by:
getRelationsCount in interface SocialRelationLocalService
Parameters:
userId1 - the user that is the subject of the relation
userId2 - the user at the other end of the relation
Returns:
the number of relations
Throws:
SystemException - if a system exception occurred

hasRelation

public boolean hasRelation(long userId1,
                           long userId2,
                           int type)
                    throws SystemException
Returns true if a relation of the given type exists where the user with primary key userId1 is User1 of the relation and the user with the primary key userId2 is User2 of the relation.

Specified by:
hasRelation in interface SocialRelationLocalService
Parameters:
userId1 - the user that is the subject of the relation
userId2 - the user at the other end of the relation
type - the relation's type
Returns:
true if the relation exists; false otherwise
Throws:
SystemException - if a system exception occurred

isRelatable

public boolean isRelatable(long userId1,
                           long userId2,
                           int type)
                    throws SystemException
Returns true if the users can be in a relation of the given type where the user with primary key userId1 is User1 of the relation and the user with the primary key userId2 is User2 of the relation.

This method returns false if User1 and User2 are the same, if either user is the default user, or if a matching relation already exists.

Specified by:
isRelatable in interface SocialRelationLocalService
Parameters:
userId1 - the user that is the subject of the relation
userId2 - the user at the other end of the relation
type - the relation's type
Returns:
true if the two users can be in a new relation of the given type; false otherwise
Throws:
SystemException - if a system exception occurred

getWrappedSocialRelationLocalService

public SocialRelationLocalService getWrappedSocialRelationLocalService()
Deprecated. As of 6.1.0, replaced by getWrappedService()


setWrappedSocialRelationLocalService

public void setWrappedSocialRelationLocalService(SocialRelationLocalService socialRelationLocalService)
Deprecated. As of 6.1.0, replaced by setWrappedService(com.liferay.portlet.social.service.SocialRelationLocalService)


getWrappedService

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

setWrappedService

public void setWrappedService(SocialRelationLocalService socialRelationLocalService)
Specified by:
setWrappedService in interface ServiceWrapper<SocialRelationLocalService>

Liferay 6.2-ce-ga5