Class SocialRelationLocalServiceWrapper
- All Implemented Interfaces:
BaseLocalService,CTService<SocialRelation>,PersistedModelLocalService,ServiceWrapper<SocialRelationLocalService>,SocialRelationLocalService
SocialRelationLocalService.- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Constructor Summary
ConstructorsConstructorDescriptionSocialRelationLocalServiceWrapper(SocialRelationLocalService socialRelationLocalService) -
Method Summary
Modifier and TypeMethodDescriptionaddRelation(long userId1, long userId2, int type) Adds a social relation between the two users to the database.addSocialRelation(SocialRelation socialRelation) Adds the social relation to the database.createPersistedModel(Serializable primaryKeyObj) createSocialRelation(long relationId) Creates a new social relation with the primary key.deletePersistedModel(PersistedModel persistedModel) voiddeleteRelation(long relationId) Removes the relation (and its inverse in case of a bidirectional relation) from the database.voiddeleteRelation(long userId1, long userId2, int type) Removes the matching relation (and its inverse in case of a bidirectional relation) from the database.voiddeleteRelation(SocialRelation relation) Removes the relation (and its inverse in case of a bidirectional relation) from the database.voiddeleteRelations(long userId) Removes all relations involving the user from the database.voiddeleteRelations(long userId1, long userId2) Removes all relations between User1 and User2.deleteSocialRelation(long relationId) Deletes the social relation with the primary key from the database.deleteSocialRelation(SocialRelation socialRelation) Deletes the social relation from the database.<T> TdslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) intdslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) <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.longdynamicQueryCount(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.longdynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.fetchSocialRelation(long relationId) fetchSocialRelationByUuidAndCompanyId(String uuid, long companyId) Returns the social relation with the matching UUID and company.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.intgetInverseRelationsCount(long userId, int type) Returns the number of inverse relations of the given type for which the user is User2 of the relation.Returns the OSGi service identifier.getPersistedModel(Serializable primaryKeyObj) getRelation(long relationId) Returns the relation identified by its primary key.getRelation(long userId1, long userId2, int type) Returns the relation of the given type between User1 and User2.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.getRelations(long userId1, long userId2, int start, int end) Returns a range of all the relations between User1 and User2.intgetRelationsCount(long userId, int type) Returns the number of relations of the given type where the user is the subject of the relation.intgetRelationsCount(long userId1, long userId2) Returns the number of relations between User1 and User2.getSocialRelation(long relationId) Returns the social relation with the primary key.getSocialRelationByUuidAndCompanyId(String uuid, long companyId) Returns the social relation with the matching UUID and company.getSocialRelations(int start, int end) Returns a range of all the social relations.intReturns the number of social relations.booleanhasRelation(long userId1, long userId2, int type) Returnstrueif a relation of the given type exists where the user with primary keyuserId1is User1 of the relation and the user with the primary keyuserId2is User2 of the relation.booleanisRelatable(long userId1, long userId2, int type) Returnstrueif the users can be in a relation of the given type where the user with primary keyuserId1is User1 of the relation and the user with the primary keyuserId2is User2 of the relation.voidsetWrappedService(SocialRelationLocalService socialRelationLocalService) updateSocialRelation(SocialRelation socialRelation) Updates the social relation in the database or adds it if it does not yet exist.<R,E extends Throwable>
RupdateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<SocialRelation>, R, E> updateUnsafeFunction) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
fetchPersistedModel
-
Constructor Details
-
SocialRelationLocalServiceWrapper
public SocialRelationLocalServiceWrapper() -
SocialRelationLocalServiceWrapper
-
-
Method Details
-
addRelation
Adds a social relation between the two users to the database.- Specified by:
addRelationin interfaceSocialRelationLocalService- Parameters:
userId1- the user that is the subject of the relationuserId2- the user at the other end of the relationtype- the type of the relation- Returns:
- the social relation
- Throws:
PortalException
-
addSocialRelation
Adds the social relation to the database. Also notifies the appropriate model listeners.Important: Inspect SocialRelationLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Specified by:
addSocialRelationin interfaceSocialRelationLocalService- Parameters:
socialRelation- the social relation- Returns:
- the social relation that was added
-
createPersistedModel
- Specified by:
createPersistedModelin interfacePersistedModelLocalService- Specified by:
createPersistedModelin interfaceSocialRelationLocalService- Throws:
PortalExceptionPortalException
-
createSocialRelation
Creates a new social relation with the primary key. Does not add the social relation to the database.- Specified by:
createSocialRelationin interfaceSocialRelationLocalService- Parameters:
relationId- the primary key for the new social relation- Returns:
- the new social relation
-
deletePersistedModel
- Specified by:
deletePersistedModelin interfacePersistedModelLocalService- Specified by:
deletePersistedModelin interfaceSocialRelationLocalService- Throws:
PortalExceptionPortalException
-
deleteRelation
Removes the relation (and its inverse in case of a bidirectional relation) from the database.- Specified by:
deleteRelationin interfaceSocialRelationLocalService- Parameters:
relationId- the primary key of the relation- Throws:
PortalException
-
deleteRelation
Removes the matching relation (and its inverse in case of a bidirectional relation) from the database.- Specified by:
deleteRelationin interfaceSocialRelationLocalService- Parameters:
userId1- the user that is the subject of the relationuserId2- the user at the other end of the relationtype- the relation's type- Throws:
PortalException
-
deleteRelation
Removes the relation (and its inverse in case of a bidirectional relation) from the database.- Specified by:
deleteRelationin interfaceSocialRelationLocalService- Parameters:
relation- the relation to be removed- Throws:
PortalException
-
deleteRelations
public void deleteRelations(long userId) Removes all relations involving the user from the database.- Specified by:
deleteRelationsin interfaceSocialRelationLocalService- Parameters:
userId- the primary key of the user
-
deleteRelations
Removes all relations between User1 and User2.- Specified by:
deleteRelationsin interfaceSocialRelationLocalService- Parameters:
userId1- the user that is the subject of the relationuserId2- the user at the other end of the relation- Throws:
PortalException
-
deleteSocialRelation
Deletes the social relation with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect SocialRelationLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Specified by:
deleteSocialRelationin interfaceSocialRelationLocalService- 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 foundPortalException
-
deleteSocialRelation
Deletes the social relation from the database. Also notifies the appropriate model listeners.Important: Inspect SocialRelationLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Specified by:
deleteSocialRelationin interfaceSocialRelationLocalService- Parameters:
socialRelation- the social relation- Returns:
- the social relation that was removed
-
dslQuery
public <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryin interfacePersistedModelLocalService- Specified by:
dslQueryin interfaceSocialRelationLocalService
-
dslQueryCount
public int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryCountin interfacePersistedModelLocalService- Specified by:
dslQueryCountin interfaceSocialRelationLocalService
-
dynamicQuery
- Specified by:
dynamicQueryin interfaceSocialRelationLocalService
-
dynamicQuery
Performs a dynamic query on the database and returns the matching rows.- Specified by:
dynamicQueryin interfaceSocialRelationLocalService- Parameters:
dynamicQuery- the dynamic query- Returns:
- the matching rows
-
dynamicQuery
Performs a dynamic query on the database and returns a range of the matching rows.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portlet.social.model.impl.SocialRelationModelImpl.- Specified by:
dynamicQueryin interfaceSocialRelationLocalService- Parameters:
dynamicQuery- the dynamic querystart- the lower bound of the range of model instancesend- the upper bound of the range of model instances (not inclusive)- Returns:
- the range of matching rows
-
dynamicQuery
public <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.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portlet.social.model.impl.SocialRelationModelImpl.- Specified by:
dynamicQueryin interfaceSocialRelationLocalService- Parameters:
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 (optionallynull)- Returns:
- the ordered range of matching rows
-
dynamicQueryCount
Returns the number of rows matching the dynamic query.- Specified by:
dynamicQueryCountin interfaceSocialRelationLocalService- Parameters:
dynamicQuery- the dynamic query- Returns:
- the number of rows matching the dynamic query
-
dynamicQueryCount
Returns the number of rows matching the dynamic query.- Specified by:
dynamicQueryCountin interfaceSocialRelationLocalService- Parameters:
dynamicQuery- the dynamic queryprojection- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
fetchSocialRelation
- Specified by:
fetchSocialRelationin interfaceSocialRelationLocalService
-
fetchSocialRelationByUuidAndCompanyId
Returns the social relation with the matching UUID and company.- Specified by:
fetchSocialRelationByUuidAndCompanyIdin interfaceSocialRelationLocalService- Parameters:
uuid- the social relation's UUIDcompanyId- the primary key of the company- Returns:
- the matching social relation, or
nullif a matching social relation could not be found
-
getActionableDynamicQuery
- Specified by:
getActionableDynamicQueryin interfaceSocialRelationLocalService
-
getIndexableActionableDynamicQuery
- Specified by:
getIndexableActionableDynamicQueryin interfaceSocialRelationLocalService
-
getInverseRelations
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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil.ALL_POSwill return the full result set.- Specified by:
getInverseRelationsin interfaceSocialRelationLocalService- Parameters:
userId- 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)- Returns:
- the range of matching relations
-
getInverseRelationsCount
public 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.- Specified by:
getInverseRelationsCountin interfaceSocialRelationLocalService- Parameters:
userId- the primary key of the usertype- the relation's type- Returns:
- the number of matching relations
-
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Specified by:
getOSGiServiceIdentifierin interfaceSocialRelationLocalService- Returns:
- the OSGi service identifier
-
getPersistedModel
- Specified by:
getPersistedModelin interfacePersistedModelLocalService- Specified by:
getPersistedModelin interfaceSocialRelationLocalService- Throws:
PortalExceptionPortalException
-
getRelation
Returns the relation identified by its primary key.- Specified by:
getRelationin interfaceSocialRelationLocalService- Parameters:
relationId- the primary key of the relation- Returns:
- Returns the relation
- Throws:
PortalException
-
getRelation
Returns the relation of the given type between User1 and User2.- Specified by:
getRelationin interfaceSocialRelationLocalService- Parameters:
userId1- the user that is the subject of the relationuserId2- the user at the other end of the relationtype- the relation's type- Returns:
- Returns the relation
- Throws:
PortalException
-
getRelations
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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil.ALL_POSwill return the full result set.- Specified by:
getRelationsin interfaceSocialRelationLocalService- Parameters:
userId- 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)- Returns:
- the range of relations
-
getRelations
Returns a range of all the relations between User1 and User2.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil.ALL_POSwill return the full result set.- Specified by:
getRelationsin interfaceSocialRelationLocalService- Parameters:
userId1- 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)- Returns:
- the range of relations
-
getRelationsCount
public int getRelationsCount(long userId, int type) Returns the number of relations of the given type where the user is the subject of the relation.- Specified by:
getRelationsCountin interfaceSocialRelationLocalService- Parameters:
userId- the primary key of the usertype- the relation's type- Returns:
- the number of relations
-
getRelationsCount
public int getRelationsCount(long userId1, long userId2) Returns the number of relations between User1 and User2.- Specified by:
getRelationsCountin interfaceSocialRelationLocalService- Parameters:
userId1- the user that is the subject of the relationuserId2- the user at the other end of the relation- Returns:
- the number of relations
-
getSocialRelation
Returns the social relation with the primary key.- Specified by:
getSocialRelationin interfaceSocialRelationLocalService- 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 foundPortalException
-
getSocialRelationByUuidAndCompanyId
public SocialRelation getSocialRelationByUuidAndCompanyId(String uuid, long companyId) throws PortalException Returns the social relation with the matching UUID and company.- Specified by:
getSocialRelationByUuidAndCompanyIdin interfaceSocialRelationLocalService- Parameters:
uuid- the social relation's UUIDcompanyId- the primary key of the company- Returns:
- the matching social relation
- Throws:
PortalException- if a matching social relation could not be foundPortalException
-
getSocialRelations
Returns a range of all the social relations.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portlet.social.model.impl.SocialRelationModelImpl.- Specified by:
getSocialRelationsin interfaceSocialRelationLocalService- Parameters:
start- the lower bound of the range of social relationsend- the upper bound of the range of social relations (not inclusive)- Returns:
- the range of social relations
-
getSocialRelationsCount
public int getSocialRelationsCount()Returns the number of social relations.- Specified by:
getSocialRelationsCountin interfaceSocialRelationLocalService- Returns:
- the number of social relations
-
hasRelation
public boolean hasRelation(long userId1, long userId2, int type) Returnstrueif a relation of the given type exists where the user with primary keyuserId1is User1 of the relation and the user with the primary keyuserId2is User2 of the relation.- Specified by:
hasRelationin interfaceSocialRelationLocalService- Parameters:
userId1- the user that is the subject of the relationuserId2- the user at the other end of the relationtype- the relation's type- Returns:
trueif the relation exists;falseotherwise
-
isRelatable
public boolean isRelatable(long userId1, long userId2, int type) Returnstrueif the users can be in a relation of the given type where the user with primary keyuserId1is User1 of the relation and the user with the primary keyuserId2is User2 of the relation.This method returns
falseif User1 and User2 are the same, if either user is the default user, or if a matching relation already exists.- Specified by:
isRelatablein interfaceSocialRelationLocalService- Parameters:
userId1- the user that is the subject of the relationuserId2- the user at the other end of the relationtype- the relation's type- Returns:
trueif the two users can be in a new relation of the given type;falseotherwise
-
updateSocialRelation
Updates the social relation in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect SocialRelationLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Specified by:
updateSocialRelationin interfaceSocialRelationLocalService- Parameters:
socialRelation- the social relation- Returns:
- the social relation that was updated
-
getBasePersistence
- Specified by:
getBasePersistencein interfacePersistedModelLocalService
-
getCTPersistence
- Specified by:
getCTPersistencein interfaceCTService<SocialRelation>- Specified by:
getCTPersistencein interfaceSocialRelationLocalService
-
getModelClass
- Specified by:
getModelClassin interfaceCTService<SocialRelation>- Specified by:
getModelClassin interfaceSocialRelationLocalService
-
updateWithUnsafeFunction
public <R,E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<SocialRelation>, R, throws EE> updateUnsafeFunction) - Specified by:
updateWithUnsafeFunctionin interfaceCTService<SocialRelation>- Specified by:
updateWithUnsafeFunctionin interfaceSocialRelationLocalService- Throws:
E extends Throwable
-
getWrappedService
- Specified by:
getWrappedServicein interfaceServiceWrapper<SocialRelationLocalService>
-
setWrappedService
- Specified by:
setWrappedServicein interfaceServiceWrapper<SocialRelationLocalService>
-