@ProviderType public class SocialRelationLocalServiceWrapper extends Object implements SocialRelationLocalService, ServiceWrapper<SocialRelationLocalService>
SocialRelationLocalService.SocialRelationLocalService| Constructor and Description |
|---|
SocialRelationLocalServiceWrapper(SocialRelationLocalService socialRelationLocalService) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
PersistedModel |
deletePersistedModel(PersistedModel persistedModel) |
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() |
<T> List<T> |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.
|
<T> List<T> |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows.
|
<T> List<T> |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator<T> 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 matching the dynamic query.
|
long |
dynamicQueryCount(DynamicQuery dynamicQuery,
Projection projection)
Returns the number of rows matching the dynamic query.
|
SocialRelation |
fetchSocialRelation(long relationId) |
SocialRelation |
fetchSocialRelationByUuidAndCompanyId(String uuid,
long companyId)
Returns the social relation with the matching UUID and company.
|
ActionableDynamicQuery |
getActionableDynamicQuery() |
IndexableActionableDynamicQuery |
getIndexableActionableDynamicQuery() |
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.
|
String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
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() |
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 |
setWrappedService(SocialRelationLocalService socialRelationLocalService) |
SocialRelation |
updateSocialRelation(SocialRelation socialRelation)
Updates the social relation in the database or adds it if it does not yet exist.
|
public SocialRelationLocalServiceWrapper(SocialRelationLocalService socialRelationLocalService)
public boolean hasRelation(long userId1,
long userId2,
int type)
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.hasRelation in interface SocialRelationLocalServiceuserId1 - the user that is the subject of the relationuserId2 - the user at the other end of the relationtype - the relation's typetrue if the relation exists; false
otherwisepublic boolean isRelatable(long userId1,
long userId2,
int type)
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.
isRelatable in interface SocialRelationLocalServiceuserId1 - the user that is the subject of the relationuserId2 - the user at the other end of the relationtype - the relation's typetrue if the two users can be in a new relation of
the given type; false otherwisepublic ActionableDynamicQuery getActionableDynamicQuery()
getActionableDynamicQuery in interface SocialRelationLocalServicepublic DynamicQuery dynamicQuery()
dynamicQuery in interface SocialRelationLocalServicepublic IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
getIndexableActionableDynamicQuery in interface SocialRelationLocalServicepublic PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException
deletePersistedModel in interface PersistedModelLocalServicedeletePersistedModel in interface SocialRelationLocalServicePortalExceptionpublic PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException
getPersistedModel in interface PersistedModelLocalServicegetPersistedModel in interface SocialRelationLocalServicePortalExceptionpublic SocialRelation addRelation(long userId1, long userId2, int type) throws PortalException
addRelation in interface SocialRelationLocalServiceuserId1 - the user that is the subject of the relationuserId2 - the user at the other end of the relationtype - the type of the relationPortalExceptionpublic SocialRelation addSocialRelation(SocialRelation socialRelation)
addSocialRelation in interface SocialRelationLocalServicesocialRelation - the social relationpublic SocialRelation createSocialRelation(long relationId)
createSocialRelation in interface SocialRelationLocalServicerelationId - the primary key for the new social relationpublic SocialRelation deleteSocialRelation(SocialRelation socialRelation)
deleteSocialRelation in interface SocialRelationLocalServicesocialRelation - the social relationpublic SocialRelation deleteSocialRelation(long relationId) throws PortalException
deleteSocialRelation in interface SocialRelationLocalServicerelationId - the primary key of the social relationPortalException - if a social relation with the primary key could not be foundpublic SocialRelation fetchSocialRelation(long relationId)
fetchSocialRelation in interface SocialRelationLocalServicepublic SocialRelation fetchSocialRelationByUuidAndCompanyId(String uuid, long companyId)
fetchSocialRelationByUuidAndCompanyId in interface SocialRelationLocalServiceuuid - the social relation's UUIDcompanyId - the primary key of the companynull if a matching social relation could not be foundpublic SocialRelation getRelation(long relationId) throws PortalException
getRelation in interface SocialRelationLocalServicerelationId - the primary key of the relationPortalExceptionpublic SocialRelation getRelation(long userId1, long userId2, int type) throws PortalException
getRelation in interface SocialRelationLocalServiceuserId1 - the user that is the subject of the relationuserId2 - the user at the other end of the relationtype - the relation's typePortalExceptionpublic SocialRelation getSocialRelation(long relationId) throws PortalException
getSocialRelation in interface SocialRelationLocalServicerelationId - the primary key of the social relationPortalException - if a social relation with the primary key could not be foundpublic SocialRelation getSocialRelationByUuidAndCompanyId(String uuid, long companyId) throws PortalException
getSocialRelationByUuidAndCompanyId in interface SocialRelationLocalServiceuuid - the social relation's UUIDcompanyId - the primary key of the companyPortalException - if a matching social relation could not be foundpublic SocialRelation updateSocialRelation(SocialRelation socialRelation)
updateSocialRelation in interface SocialRelationLocalServicesocialRelation - the social relationpublic int getInverseRelationsCount(long userId,
int type)
getInverseRelationsCount in interface SocialRelationLocalServiceuserId - the primary key of the usertype - the relation's typepublic int getRelationsCount(long userId,
int type)
getRelationsCount in interface SocialRelationLocalServiceuserId - the primary key of the usertype - the relation's typepublic int getRelationsCount(long userId1,
long userId2)
getRelationsCount in interface SocialRelationLocalServiceuserId1 - the user that is the subject of the relationuserId2 - the user at the other end of the relationpublic int getSocialRelationsCount()
getSocialRelationsCount in interface SocialRelationLocalServicepublic String getOSGiServiceIdentifier()
getOSGiServiceIdentifier in interface SocialRelationLocalServicepublic <T> List<T> dynamicQuery(DynamicQuery dynamicQuery)
dynamicQuery in interface SocialRelationLocalServicedynamicQuery - the dynamic querypublic <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, 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 and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.portlet.social.model.impl.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.
dynamicQuery in interface SocialRelationLocalServicedynamicQuery - the dynamic querystart - the lower bound of the range of model instancesend - the upper bound of the range of model instances (not inclusive)public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> 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 and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.portlet.social.model.impl.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.
dynamicQuery in interface SocialRelationLocalServicedynamicQuery - 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)public List<SocialRelation> getInverseRelations(long userId, int type, 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.
getInverseRelations in interface SocialRelationLocalServiceuserId - the primary key of the usertype - the relation's typestart - the lower bound of the range of resultsend - the upper bound of the range of results (not inclusive)public List<SocialRelation> getRelations(long userId, int type, 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.
getRelations in interface SocialRelationLocalServiceuserId - the primary key of the usertype - the relation's typestart - the lower bound of the range of resultsend - the upper bound of the range of results (not inclusive)public List<SocialRelation> getRelations(long userId1, long userId2, 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.
getRelations in interface SocialRelationLocalServiceuserId1 - the user that is the subject of the relationuserId2 - the user at the other end of the relationstart - the lower bound of the range of resultsend - the upper bound of the range of results (not inclusive)public List<SocialRelation> getSocialRelations(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 and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.portlet.social.model.impl.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.
getSocialRelations in interface SocialRelationLocalServicestart - the lower bound of the range of social relationsend - the upper bound of the range of social relations (not inclusive)public long dynamicQueryCount(DynamicQuery dynamicQuery)
dynamicQueryCount in interface SocialRelationLocalServicedynamicQuery - the dynamic querypublic long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
dynamicQueryCount in interface SocialRelationLocalServicedynamicQuery - the dynamic queryprojection - the projection to apply to the querypublic void deleteRelation(SocialRelation relation) throws PortalException
deleteRelation in interface SocialRelationLocalServicerelation - the relation to be removedPortalExceptionpublic void deleteRelation(long relationId)
throws PortalException
deleteRelation in interface SocialRelationLocalServicerelationId - the primary key of the relationPortalExceptionpublic void deleteRelation(long userId1,
long userId2,
int type)
throws PortalException
deleteRelation in interface SocialRelationLocalServiceuserId1 - the user that is the subject of the relationuserId2 - the user at the other end of the relationtype - the relation's typePortalExceptionpublic void deleteRelations(long userId)
deleteRelations in interface SocialRelationLocalServiceuserId - the primary key of the userpublic void deleteRelations(long userId1,
long userId2)
throws PortalException
deleteRelations in interface SocialRelationLocalServiceuserId1 - the user that is the subject of the relationuserId2 - the user at the other end of the relationPortalExceptionpublic SocialRelationLocalService getWrappedService()
getWrappedService in interface ServiceWrapper<SocialRelationLocalService>public void setWrappedService(SocialRelationLocalService socialRelationLocalService)
setWrappedService in interface ServiceWrapper<SocialRelationLocalService>