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 @SuppressWarnings("unchecked")
64 public static java.util.List dynamicQuery(
65 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66 throws com.liferay.portal.kernel.exception.SystemException {
67 return getService().dynamicQuery(dynamicQuery);
68 }
69
70 @SuppressWarnings("unchecked")
71 public static java.util.List dynamicQuery(
72 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73 int end) throws com.liferay.portal.kernel.exception.SystemException {
74 return getService().dynamicQuery(dynamicQuery, start, end);
75 }
76
77 @SuppressWarnings("unchecked")
78 public static java.util.List dynamicQuery(
79 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80 int end,
81 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82 throws com.liferay.portal.kernel.exception.SystemException {
83 return getService()
84 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85 }
86
87 public static long dynamicQueryCount(
88 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89 throws com.liferay.portal.kernel.exception.SystemException {
90 return getService().dynamicQueryCount(dynamicQuery);
91 }
92
93 public static com.liferay.portlet.social.model.SocialRelation getSocialRelation(
94 long relationId)
95 throws com.liferay.portal.kernel.exception.PortalException,
96 com.liferay.portal.kernel.exception.SystemException {
97 return getService().getSocialRelation(relationId);
98 }
99
100 public static java.util.List<com.liferay.portlet.social.model.SocialRelation> getSocialRelations(
101 int start, int end)
102 throws com.liferay.portal.kernel.exception.SystemException {
103 return getService().getSocialRelations(start, end);
104 }
105
106 public static int getSocialRelationsCount()
107 throws com.liferay.portal.kernel.exception.SystemException {
108 return getService().getSocialRelationsCount();
109 }
110
111 public static com.liferay.portlet.social.model.SocialRelation updateSocialRelation(
112 com.liferay.portlet.social.model.SocialRelation socialRelation)
113 throws com.liferay.portal.kernel.exception.SystemException {
114 return getService().updateSocialRelation(socialRelation);
115 }
116
117 public static com.liferay.portlet.social.model.SocialRelation updateSocialRelation(
118 com.liferay.portlet.social.model.SocialRelation socialRelation,
119 boolean merge)
120 throws com.liferay.portal.kernel.exception.SystemException {
121 return getService().updateSocialRelation(socialRelation, merge);
122 }
123
124 public static com.liferay.portlet.social.model.SocialRelation addRelation(
125 long userId1, long userId2, int type)
126 throws com.liferay.portal.kernel.exception.PortalException,
127 com.liferay.portal.kernel.exception.SystemException {
128 return getService().addRelation(userId1, userId2, type);
129 }
130
131 public static void deleteRelation(long relationId)
132 throws com.liferay.portal.kernel.exception.PortalException,
133 com.liferay.portal.kernel.exception.SystemException {
134 getService().deleteRelation(relationId);
135 }
136
137 public static void deleteRelation(long userId1, long userId2, int type)
138 throws com.liferay.portal.kernel.exception.PortalException,
139 com.liferay.portal.kernel.exception.SystemException {
140 getService().deleteRelation(userId1, userId2, type);
141 }
142
143 public static void deleteRelation(
144 com.liferay.portlet.social.model.SocialRelation relation)
145 throws com.liferay.portal.kernel.exception.PortalException,
146 com.liferay.portal.kernel.exception.SystemException {
147 getService().deleteRelation(relation);
148 }
149
150 public static void deleteRelations(long userId)
151 throws com.liferay.portal.kernel.exception.SystemException {
152 getService().deleteRelations(userId);
153 }
154
155 public static com.liferay.portlet.social.model.SocialRelation getRelation(
156 long relationId)
157 throws com.liferay.portal.kernel.exception.PortalException,
158 com.liferay.portal.kernel.exception.SystemException {
159 return getService().getRelation(relationId);
160 }
161
162 public static com.liferay.portlet.social.model.SocialRelation getRelation(
163 long userId1, long userId2, int type)
164 throws com.liferay.portal.kernel.exception.PortalException,
165 com.liferay.portal.kernel.exception.SystemException {
166 return getService().getRelation(userId1, userId2, type);
167 }
168
169 public static java.util.List<com.liferay.portlet.social.model.SocialRelation> getRelations(
170 long userId, int type, int start, int end)
171 throws com.liferay.portal.kernel.exception.SystemException {
172 return getService().getRelations(userId, type, start, end);
173 }
174
175 public static int getRelationsCount(long userId, int type)
176 throws com.liferay.portal.kernel.exception.SystemException {
177 return getService().getRelationsCount(userId, type);
178 }
179
180 public static boolean hasRelation(long userId1, long userId2, int type)
181 throws com.liferay.portal.kernel.exception.SystemException {
182 return getService().hasRelation(userId1, userId2, type);
183 }
184
185 public static boolean isRelatable(long userId1, long userId2, int type)
186 throws com.liferay.portal.kernel.exception.SystemException {
187 return getService().isRelatable(userId1, userId2, type);
188 }
189
190 public static SocialRelationLocalService getService() {
191 if (_service == null) {
192 _service = (SocialRelationLocalService)PortalBeanLocatorUtil.locate(SocialRelationLocalService.class.getName());
193 }
194
195 return _service;
196 }
197
198 public void setService(SocialRelationLocalService service) {
199 _service = service;
200 }
201
202 private static SocialRelationLocalService _service;
203 }