PageRenderTime 26ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/portlets/opensocial-portlet/docroot/WEB-INF/src/com/liferay/opensocial/service/base/GadgetServiceBaseImpl.java

https://github.com/l15k4/liferay-plugins
Java | 400 lines | 171 code | 44 blank | 185 comment | 0 complexity | a9b1891842c35b87796db1ba6b626087 MD5 | raw file
  1. /**
  2. * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
  3. *
  4. * This library is free software; you can redistribute it and/or modify it under
  5. * the terms of the GNU Lesser General Public License as published by the Free
  6. * Software Foundation; either version 2.1 of the License, or (at your option)
  7. * any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  11. * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  12. * details.
  13. */
  14. package com.liferay.opensocial.service.base;
  15. import com.liferay.counter.service.CounterLocalService;
  16. import com.liferay.opensocial.model.Gadget;
  17. import com.liferay.opensocial.service.GadgetLocalService;
  18. import com.liferay.opensocial.service.GadgetService;
  19. import com.liferay.opensocial.service.OAuthConsumerLocalService;
  20. import com.liferay.opensocial.service.OAuthTokenLocalService;
  21. import com.liferay.opensocial.service.persistence.GadgetPersistence;
  22. import com.liferay.opensocial.service.persistence.OAuthConsumerPersistence;
  23. import com.liferay.opensocial.service.persistence.OAuthTokenPersistence;
  24. import com.liferay.portal.kernel.bean.BeanReference;
  25. import com.liferay.portal.kernel.bean.IdentifiableBean;
  26. import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
  27. import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
  28. import com.liferay.portal.kernel.exception.SystemException;
  29. import com.liferay.portal.service.ResourceLocalService;
  30. import com.liferay.portal.service.ResourceService;
  31. import com.liferay.portal.service.UserLocalService;
  32. import com.liferay.portal.service.UserService;
  33. import com.liferay.portal.service.base.PrincipalBean;
  34. import com.liferay.portal.service.persistence.ResourcePersistence;
  35. import com.liferay.portal.service.persistence.UserPersistence;
  36. import javax.sql.DataSource;
  37. /**
  38. * The base implementation of the gadget remote service.
  39. *
  40. * <p>
  41. * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.opensocial.service.impl.GadgetServiceImpl}.
  42. * </p>
  43. *
  44. * @author Brian Wing Shun Chan
  45. * @see com.liferay.opensocial.service.impl.GadgetServiceImpl
  46. * @see com.liferay.opensocial.service.GadgetServiceUtil
  47. * @generated
  48. */
  49. public abstract class GadgetServiceBaseImpl extends PrincipalBean
  50. implements GadgetService, IdentifiableBean {
  51. /*
  52. * NOTE FOR DEVELOPERS:
  53. *
  54. * Never modify or reference this class directly. Always use {@link com.liferay.opensocial.service.GadgetServiceUtil} to access the gadget remote service.
  55. */
  56. /**
  57. * Returns the gadget local service.
  58. *
  59. * @return the gadget local service
  60. */
  61. public GadgetLocalService getGadgetLocalService() {
  62. return gadgetLocalService;
  63. }
  64. /**
  65. * Sets the gadget local service.
  66. *
  67. * @param gadgetLocalService the gadget local service
  68. */
  69. public void setGadgetLocalService(GadgetLocalService gadgetLocalService) {
  70. this.gadgetLocalService = gadgetLocalService;
  71. }
  72. /**
  73. * Returns the gadget remote service.
  74. *
  75. * @return the gadget remote service
  76. */
  77. public GadgetService getGadgetService() {
  78. return gadgetService;
  79. }
  80. /**
  81. * Sets the gadget remote service.
  82. *
  83. * @param gadgetService the gadget remote service
  84. */
  85. public void setGadgetService(GadgetService gadgetService) {
  86. this.gadgetService = gadgetService;
  87. }
  88. /**
  89. * Returns the gadget persistence.
  90. *
  91. * @return the gadget persistence
  92. */
  93. public GadgetPersistence getGadgetPersistence() {
  94. return gadgetPersistence;
  95. }
  96. /**
  97. * Sets the gadget persistence.
  98. *
  99. * @param gadgetPersistence the gadget persistence
  100. */
  101. public void setGadgetPersistence(GadgetPersistence gadgetPersistence) {
  102. this.gadgetPersistence = gadgetPersistence;
  103. }
  104. /**
  105. * Returns the o auth consumer local service.
  106. *
  107. * @return the o auth consumer local service
  108. */
  109. public OAuthConsumerLocalService getOAuthConsumerLocalService() {
  110. return oAuthConsumerLocalService;
  111. }
  112. /**
  113. * Sets the o auth consumer local service.
  114. *
  115. * @param oAuthConsumerLocalService the o auth consumer local service
  116. */
  117. public void setOAuthConsumerLocalService(
  118. OAuthConsumerLocalService oAuthConsumerLocalService) {
  119. this.oAuthConsumerLocalService = oAuthConsumerLocalService;
  120. }
  121. /**
  122. * Returns the o auth consumer persistence.
  123. *
  124. * @return the o auth consumer persistence
  125. */
  126. public OAuthConsumerPersistence getOAuthConsumerPersistence() {
  127. return oAuthConsumerPersistence;
  128. }
  129. /**
  130. * Sets the o auth consumer persistence.
  131. *
  132. * @param oAuthConsumerPersistence the o auth consumer persistence
  133. */
  134. public void setOAuthConsumerPersistence(
  135. OAuthConsumerPersistence oAuthConsumerPersistence) {
  136. this.oAuthConsumerPersistence = oAuthConsumerPersistence;
  137. }
  138. /**
  139. * Returns the o auth token local service.
  140. *
  141. * @return the o auth token local service
  142. */
  143. public OAuthTokenLocalService getOAuthTokenLocalService() {
  144. return oAuthTokenLocalService;
  145. }
  146. /**
  147. * Sets the o auth token local service.
  148. *
  149. * @param oAuthTokenLocalService the o auth token local service
  150. */
  151. public void setOAuthTokenLocalService(
  152. OAuthTokenLocalService oAuthTokenLocalService) {
  153. this.oAuthTokenLocalService = oAuthTokenLocalService;
  154. }
  155. /**
  156. * Returns the o auth token persistence.
  157. *
  158. * @return the o auth token persistence
  159. */
  160. public OAuthTokenPersistence getOAuthTokenPersistence() {
  161. return oAuthTokenPersistence;
  162. }
  163. /**
  164. * Sets the o auth token persistence.
  165. *
  166. * @param oAuthTokenPersistence the o auth token persistence
  167. */
  168. public void setOAuthTokenPersistence(
  169. OAuthTokenPersistence oAuthTokenPersistence) {
  170. this.oAuthTokenPersistence = oAuthTokenPersistence;
  171. }
  172. /**
  173. * Returns the counter local service.
  174. *
  175. * @return the counter local service
  176. */
  177. public CounterLocalService getCounterLocalService() {
  178. return counterLocalService;
  179. }
  180. /**
  181. * Sets the counter local service.
  182. *
  183. * @param counterLocalService the counter local service
  184. */
  185. public void setCounterLocalService(CounterLocalService counterLocalService) {
  186. this.counterLocalService = counterLocalService;
  187. }
  188. /**
  189. * Returns the resource local service.
  190. *
  191. * @return the resource local service
  192. */
  193. public ResourceLocalService getResourceLocalService() {
  194. return resourceLocalService;
  195. }
  196. /**
  197. * Sets the resource local service.
  198. *
  199. * @param resourceLocalService the resource local service
  200. */
  201. public void setResourceLocalService(
  202. ResourceLocalService resourceLocalService) {
  203. this.resourceLocalService = resourceLocalService;
  204. }
  205. /**
  206. * Returns the resource remote service.
  207. *
  208. * @return the resource remote service
  209. */
  210. public ResourceService getResourceService() {
  211. return resourceService;
  212. }
  213. /**
  214. * Sets the resource remote service.
  215. *
  216. * @param resourceService the resource remote service
  217. */
  218. public void setResourceService(ResourceService resourceService) {
  219. this.resourceService = resourceService;
  220. }
  221. /**
  222. * Returns the resource persistence.
  223. *
  224. * @return the resource persistence
  225. */
  226. public ResourcePersistence getResourcePersistence() {
  227. return resourcePersistence;
  228. }
  229. /**
  230. * Sets the resource persistence.
  231. *
  232. * @param resourcePersistence the resource persistence
  233. */
  234. public void setResourcePersistence(ResourcePersistence resourcePersistence) {
  235. this.resourcePersistence = resourcePersistence;
  236. }
  237. /**
  238. * Returns the user local service.
  239. *
  240. * @return the user local service
  241. */
  242. public UserLocalService getUserLocalService() {
  243. return userLocalService;
  244. }
  245. /**
  246. * Sets the user local service.
  247. *
  248. * @param userLocalService the user local service
  249. */
  250. public void setUserLocalService(UserLocalService userLocalService) {
  251. this.userLocalService = userLocalService;
  252. }
  253. /**
  254. * Returns the user remote service.
  255. *
  256. * @return the user remote service
  257. */
  258. public UserService getUserService() {
  259. return userService;
  260. }
  261. /**
  262. * Sets the user remote service.
  263. *
  264. * @param userService the user remote service
  265. */
  266. public void setUserService(UserService userService) {
  267. this.userService = userService;
  268. }
  269. /**
  270. * Returns the user persistence.
  271. *
  272. * @return the user persistence
  273. */
  274. public UserPersistence getUserPersistence() {
  275. return userPersistence;
  276. }
  277. /**
  278. * Sets the user persistence.
  279. *
  280. * @param userPersistence the user persistence
  281. */
  282. public void setUserPersistence(UserPersistence userPersistence) {
  283. this.userPersistence = userPersistence;
  284. }
  285. public void afterPropertiesSet() {
  286. }
  287. public void destroy() {
  288. }
  289. /**
  290. * Returns the Spring bean ID for this bean.
  291. *
  292. * @return the Spring bean ID for this bean
  293. */
  294. public String getBeanIdentifier() {
  295. return _beanIdentifier;
  296. }
  297. /**
  298. * Sets the Spring bean ID for this bean.
  299. *
  300. * @param beanIdentifier the Spring bean ID for this bean
  301. */
  302. public void setBeanIdentifier(String beanIdentifier) {
  303. _beanIdentifier = beanIdentifier;
  304. }
  305. protected Class<?> getModelClass() {
  306. return Gadget.class;
  307. }
  308. protected String getModelClassName() {
  309. return Gadget.class.getName();
  310. }
  311. /**
  312. * Performs an SQL query.
  313. *
  314. * @param sql the sql query
  315. */
  316. protected void runSQL(String sql) throws SystemException {
  317. try {
  318. DataSource dataSource = gadgetPersistence.getDataSource();
  319. SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
  320. sql, new int[0]);
  321. sqlUpdate.update();
  322. }
  323. catch (Exception e) {
  324. throw new SystemException(e);
  325. }
  326. }
  327. @BeanReference(type = GadgetLocalService.class)
  328. protected GadgetLocalService gadgetLocalService;
  329. @BeanReference(type = GadgetService.class)
  330. protected GadgetService gadgetService;
  331. @BeanReference(type = GadgetPersistence.class)
  332. protected GadgetPersistence gadgetPersistence;
  333. @BeanReference(type = OAuthConsumerLocalService.class)
  334. protected OAuthConsumerLocalService oAuthConsumerLocalService;
  335. @BeanReference(type = OAuthConsumerPersistence.class)
  336. protected OAuthConsumerPersistence oAuthConsumerPersistence;
  337. @BeanReference(type = OAuthTokenLocalService.class)
  338. protected OAuthTokenLocalService oAuthTokenLocalService;
  339. @BeanReference(type = OAuthTokenPersistence.class)
  340. protected OAuthTokenPersistence oAuthTokenPersistence;
  341. @BeanReference(type = CounterLocalService.class)
  342. protected CounterLocalService counterLocalService;
  343. @BeanReference(type = ResourceLocalService.class)
  344. protected ResourceLocalService resourceLocalService;
  345. @BeanReference(type = ResourceService.class)
  346. protected ResourceService resourceService;
  347. @BeanReference(type = ResourcePersistence.class)
  348. protected ResourcePersistence resourcePersistence;
  349. @BeanReference(type = UserLocalService.class)
  350. protected UserLocalService userLocalService;
  351. @BeanReference(type = UserService.class)
  352. protected UserService userService;
  353. @BeanReference(type = UserPersistence.class)
  354. protected UserPersistence userPersistence;
  355. private String _beanIdentifier;
  356. }