|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portlet.social.service.SocialRelationLocalServiceWrapper
public class SocialRelationLocalServiceWrapper
This class is a wrapper for SocialRelationLocalService
.
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. |
SocialRelation |
fetchSocialRelation(long relationId)
|
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. |
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. Renamed to 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. Renamed to 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. |
SocialRelation |
updateSocialRelation(SocialRelation socialRelation,
boolean merge)
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 |
---|
public SocialRelationLocalServiceWrapper(SocialRelationLocalService socialRelationLocalService)
Method Detail |
---|
public SocialRelation addSocialRelation(SocialRelation socialRelation) throws SystemException
addSocialRelation
in interface SocialRelationLocalService
socialRelation
- the social relation
SystemException
- if a system exception occurredpublic SocialRelation createSocialRelation(long relationId)
createSocialRelation
in interface SocialRelationLocalService
relationId
- the primary key for the new social relation
public SocialRelation deleteSocialRelation(long relationId) throws PortalException, SystemException
deleteSocialRelation
in interface SocialRelationLocalService
relationId
- the primary key of the social relation
PortalException
- if a social relation with the primary key could not be found
SystemException
- if a system exception occurredpublic SocialRelation deleteSocialRelation(SocialRelation socialRelation) throws SystemException
deleteSocialRelation
in interface SocialRelationLocalService
socialRelation
- the social relation
SystemException
- if a system exception occurredpublic DynamicQuery dynamicQuery()
dynamicQuery
in interface SocialRelationLocalService
public List dynamicQuery(DynamicQuery dynamicQuery) throws SystemException
dynamicQuery
in interface SocialRelationLocalService
dynamicQuery
- the dynamic query
SystemException
- if a system exception occurredpublic 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.
dynamicQuery
in interface SocialRelationLocalService
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 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.
dynamicQuery
in interface SocialRelationLocalService
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 long dynamicQueryCount(DynamicQuery dynamicQuery) throws SystemException
dynamicQueryCount
in interface SocialRelationLocalService
dynamicQuery
- the dynamic query
SystemException
- if a system exception occurredpublic SocialRelation fetchSocialRelation(long relationId) throws SystemException
fetchSocialRelation
in interface SocialRelationLocalService
SystemException
public SocialRelation getSocialRelation(long relationId) throws PortalException, SystemException
getSocialRelation
in interface SocialRelationLocalService
relationId
- the primary key of the social relation
PortalException
- if a social relation with the primary key could not be found
SystemException
- if a system exception occurredpublic PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException, SystemException
getPersistedModel
in interface PersistedModelLocalService
getPersistedModel
in interface SocialRelationLocalService
PortalException
SystemException
public List<SocialRelation> getSocialRelations(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.
getSocialRelations
in interface SocialRelationLocalService
start
- the lower bound of the range of social relationsend
- the upper bound of the range of social relations (not inclusive)
SystemException
- if a system exception occurredpublic int getSocialRelationsCount() throws SystemException
getSocialRelationsCount
in interface SocialRelationLocalService
SystemException
- if a system exception occurredpublic SocialRelation updateSocialRelation(SocialRelation socialRelation) throws SystemException
updateSocialRelation
in interface SocialRelationLocalService
socialRelation
- the social relation
SystemException
- if a system exception occurredpublic SocialRelation updateSocialRelation(SocialRelation socialRelation, boolean merge) throws SystemException
updateSocialRelation
in interface SocialRelationLocalService
socialRelation
- the social relationmerge
- whether to merge the social relation with the current session. See BatchSession.update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)
for an explanation.
SystemException
- if a system exception occurredpublic String getBeanIdentifier()
getBeanIdentifier
in interface SocialRelationLocalService
public void setBeanIdentifier(String beanIdentifier)
setBeanIdentifier
in interface SocialRelationLocalService
beanIdentifier
- the Spring bean ID for this beanpublic SocialRelation addRelation(long userId1, long userId2, int type) throws PortalException, SystemException
addRelation
in interface SocialRelationLocalService
userId1
- the user that is the subject of the relationuserId2
- the user at the other end of the relationtype
- the type of the relation
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 occurredpublic void deleteRelation(long relationId) throws PortalException, SystemException
deleteRelation
in interface SocialRelationLocalService
relationId
- the primary key of the relation
PortalException
- if the relation could not be found
SystemException
- if a system exception occurredpublic void deleteRelation(long userId1, long userId2, int type) throws PortalException, SystemException
deleteRelation
in interface SocialRelationLocalService
userId1
- the user that is the subject of the relationuserId2
- the user at the other end of the relationtype
- the relation's type
PortalException
- if the relation or its inverse relation (if
applicable) could not be found
SystemException
- if a system exception occurredpublic void deleteRelation(SocialRelation relation) throws PortalException, SystemException
deleteRelation
in interface SocialRelationLocalService
relation
- the relation to be removed
PortalException
- if the relation is bidirectional and its inverse
relation could not be found
SystemException
- if a system exception occurredpublic void deleteRelations(long userId) throws SystemException
deleteRelations
in interface SocialRelationLocalService
userId
- the primary key of the user
SystemException
- if a system exception occurredpublic void deleteRelations(long userId1, long userId2) throws PortalException, SystemException
deleteRelations
in interface SocialRelationLocalService
userId1
- the user that is the subject of the relationuserId2
- the user at the other end of the relation
PortalException
- if the inverse relation could not be found
SystemException
- if a system exception occurredpublic List<SocialRelation> getInverseRelations(long userId, int type, 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.
getInverseRelations
in interface SocialRelationLocalService
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)
SystemException
- if a system exception occurredpublic int getInverseRelationsCount(long userId, int type) throws SystemException
getInverseRelationsCount
in interface SocialRelationLocalService
userId
- the primary key of the usertype
- the relation's type
SystemException
- if a system exception occurredpublic SocialRelation getRelation(long relationId) throws PortalException, SystemException
getRelation
in interface SocialRelationLocalService
relationId
- the primary key of the relation
PortalException
- if the relation could not be found
SystemException
- if a system exception occurredpublic SocialRelation getRelation(long userId1, long userId2, int type) throws PortalException, SystemException
getRelation
in interface SocialRelationLocalService
userId1
- the user that is the subject of the relationuserId2
- the user at the other end of the relationtype
- the relation's type
PortalException
- if the relation could not be found
SystemException
- if a system exception occurredpublic List<SocialRelation> getRelations(long userId, int type, 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.
getRelations
in interface SocialRelationLocalService
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)
SystemException
- if a system exception occurredpublic List<SocialRelation> getRelations(long userId1, long userId2, 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.
getRelations
in interface SocialRelationLocalService
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)
SystemException
- if a system exception occurredpublic int getRelationsCount(long userId, int type) throws SystemException
getRelationsCount
in interface SocialRelationLocalService
userId
- the primary key of the usertype
- the relation's type
SystemException
- if a system exception occurredpublic int getRelationsCount(long userId1, long userId2) throws SystemException
getRelationsCount
in interface SocialRelationLocalService
userId1
- the user that is the subject of the relationuserId2
- the user at the other end of the relation
SystemException
- if a system exception occurredpublic boolean hasRelation(long userId1, long userId2, int type) throws SystemException
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 SocialRelationLocalService
userId1
- the user that is the subject of the relationuserId2
- the user at the other end of the relationtype
- the relation's type
true
if the relation exists; false
otherwise
SystemException
- if a system exception occurredpublic boolean isRelatable(long userId1, long userId2, int type) throws SystemException
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 SocialRelationLocalService
userId1
- the user that is the subject of the relationuserId2
- the user at the other end of the relationtype
- the relation's type
true
if the two users can be in a new relation of
the given type; false
otherwise
SystemException
- if a system exception occurredpublic SocialRelationLocalService getWrappedSocialRelationLocalService()
getWrappedService()
public void setWrappedSocialRelationLocalService(SocialRelationLocalService socialRelationLocalService)
setWrappedService(com.liferay.portlet.social.service.SocialRelationLocalService)
public SocialRelationLocalService getWrappedService()
getWrappedService
in interface ServiceWrapper<SocialRelationLocalService>
public void setWrappedService(SocialRelationLocalService socialRelationLocalService)
setWrappedService
in interface ServiceWrapper<SocialRelationLocalService>
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |