1
14
15 package com.liferay.portlet.social.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
39 public class SocialRelationLocalServiceUtil {
40 public static com.liferay.portlet.social.model.SocialRelation addSocialRelation(
41 com.liferay.portlet.social.model.SocialRelation socialRelation)
42 throws com.liferay.portal.kernel.exception.SystemException {
43 return getService().addSocialRelation(socialRelation);
44 }
45
46 public static com.liferay.portlet.social.model.SocialRelation createSocialRelation(
47 long relationId) {
48 return getService().createSocialRelation(relationId);
49 }
50
51 public static void deleteSocialRelation(long relationId)
52 throws com.liferay.portal.kernel.exception.PortalException,
53 com.liferay.portal.kernel.exception.SystemException {
54 getService().deleteSocialRelation(relationId);
55 }
56
57 public static void deleteSocialRelation(
58 com.liferay.portlet.social.model.SocialRelation socialRelation)
59 throws com.liferay.portal.kernel.exception.SystemException {
60 getService().deleteSocialRelation(socialRelation);
61 }
62
63 public static java.util.List<Object> dynamicQuery(
64 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65 throws com.liferay.portal.kernel.exception.SystemException {
66 return getService().dynamicQuery(dynamicQuery);
67 }
68
69 public static java.util.List<Object> dynamicQuery(
70 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71 int end) throws com.liferay.portal.kernel.exception.SystemException {
72 return getService().dynamicQuery(dynamicQuery, start, end);
73 }
74
75 public static com.liferay.portlet.social.model.SocialRelation getSocialRelation(
76 long relationId)
77 throws com.liferay.portal.kernel.exception.PortalException,
78 com.liferay.portal.kernel.exception.SystemException {
79 return getService().getSocialRelation(relationId);
80 }
81
82 public static java.util.List<com.liferay.portlet.social.model.SocialRelation> getSocialRelations(
83 int start, int end)
84 throws com.liferay.portal.kernel.exception.SystemException {
85 return getService().getSocialRelations(start, end);
86 }
87
88 public static int getSocialRelationsCount()
89 throws com.liferay.portal.kernel.exception.SystemException {
90 return getService().getSocialRelationsCount();
91 }
92
93 public static com.liferay.portlet.social.model.SocialRelation updateSocialRelation(
94 com.liferay.portlet.social.model.SocialRelation socialRelation)
95 throws com.liferay.portal.kernel.exception.SystemException {
96 return getService().updateSocialRelation(socialRelation);
97 }
98
99 public static com.liferay.portlet.social.model.SocialRelation updateSocialRelation(
100 com.liferay.portlet.social.model.SocialRelation socialRelation,
101 boolean merge)
102 throws com.liferay.portal.kernel.exception.SystemException {
103 return getService().updateSocialRelation(socialRelation, merge);
104 }
105
106 public static com.liferay.portlet.social.model.SocialRelation addRelation(
107 long userId1, long userId2, int type)
108 throws com.liferay.portal.kernel.exception.PortalException,
109 com.liferay.portal.kernel.exception.SystemException {
110 return getService().addRelation(userId1, userId2, type);
111 }
112
113 public static void deleteRelation(long relationId)
114 throws com.liferay.portal.kernel.exception.PortalException,
115 com.liferay.portal.kernel.exception.SystemException {
116 getService().deleteRelation(relationId);
117 }
118
119 public static void deleteRelation(long userId1, long userId2, int type)
120 throws com.liferay.portal.kernel.exception.PortalException,
121 com.liferay.portal.kernel.exception.SystemException {
122 getService().deleteRelation(userId1, userId2, type);
123 }
124
125 public static void deleteRelation(
126 com.liferay.portlet.social.model.SocialRelation relation)
127 throws com.liferay.portal.kernel.exception.PortalException,
128 com.liferay.portal.kernel.exception.SystemException {
129 getService().deleteRelation(relation);
130 }
131
132 public static void deleteRelations(long userId)
133 throws com.liferay.portal.kernel.exception.SystemException {
134 getService().deleteRelations(userId);
135 }
136
137 public static com.liferay.portlet.social.model.SocialRelation getRelation(
138 long relationId)
139 throws com.liferay.portal.kernel.exception.PortalException,
140 com.liferay.portal.kernel.exception.SystemException {
141 return getService().getRelation(relationId);
142 }
143
144 public static com.liferay.portlet.social.model.SocialRelation getRelation(
145 long userId1, long userId2, int type)
146 throws com.liferay.portal.kernel.exception.PortalException,
147 com.liferay.portal.kernel.exception.SystemException {
148 return getService().getRelation(userId1, userId2, type);
149 }
150
151 public static java.util.List<com.liferay.portlet.social.model.SocialRelation> getRelations(
152 long userId, int type, int start, int end)
153 throws com.liferay.portal.kernel.exception.SystemException {
154 return getService().getRelations(userId, type, start, end);
155 }
156
157 public static int getRelationsCount(long userId, int type)
158 throws com.liferay.portal.kernel.exception.SystemException {
159 return getService().getRelationsCount(userId, type);
160 }
161
162 public static boolean hasRelation(long userId1, long userId2, int type)
163 throws com.liferay.portal.kernel.exception.SystemException {
164 return getService().hasRelation(userId1, userId2, type);
165 }
166
167 public static boolean isRelatable(long userId1, long userId2, int type)
168 throws com.liferay.portal.kernel.exception.SystemException {
169 return getService().isRelatable(userId1, userId2, type);
170 }
171
172 public static SocialRelationLocalService getService() {
173 if (_service == null) {
174 _service = (SocialRelationLocalService)PortalBeanLocatorUtil.locate(SocialRelationLocalService.class.getName());
175 }
176
177 return _service;
178 }
179
180 public void setService(SocialRelationLocalService service) {
181 _service = service;
182 }
183
184 private static SocialRelationLocalService _service;
185 }