/portal-kernel/src/com/liferay/portal/kernel/service/CompanyInfoLocalServiceUtil.java

https://github.com/danielreuther/liferay-portal · Java · 304 lines · 103 code · 43 blank · 158 comment · 0 complexity · 980dd3472357557cb2ad77062661aa14 MD5 · raw file

  1. /**
  2. * Copyright (c) 2000-present 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.portal.kernel.service;
  15. import com.liferay.petra.sql.dsl.query.DSLQuery;
  16. import com.liferay.portal.kernel.dao.orm.DynamicQuery;
  17. import com.liferay.portal.kernel.exception.PortalException;
  18. import com.liferay.portal.kernel.model.CompanyInfo;
  19. import com.liferay.portal.kernel.model.PersistedModel;
  20. import com.liferay.portal.kernel.util.OrderByComparator;
  21. import java.io.Serializable;
  22. import java.util.List;
  23. /**
  24. * Provides the local service utility for CompanyInfo. This utility wraps
  25. * <code>com.liferay.portal.service.impl.CompanyInfoLocalServiceImpl</code> and
  26. * is an access point for service operations in application layer code running
  27. * on the local server. Methods of this service will not have security checks
  28. * based on the propagated JAAS credentials because this service can only be
  29. * accessed from within the same VM.
  30. *
  31. * @author Brian Wing Shun Chan
  32. * @see CompanyInfoLocalService
  33. * @generated
  34. */
  35. public class CompanyInfoLocalServiceUtil {
  36. /*
  37. * NOTE FOR DEVELOPERS:
  38. *
  39. * Never modify this class directly. Add custom service methods to <code>com.liferay.portal.service.impl.CompanyInfoLocalServiceImpl</code> and rerun ServiceBuilder to regenerate this class.
  40. */
  41. /**
  42. * Adds the company info to the database. Also notifies the appropriate model listeners.
  43. *
  44. * <p>
  45. * <strong>Important:</strong> Inspect CompanyInfoLocalServiceImpl 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.
  46. * </p>
  47. *
  48. * @param companyInfo the company info
  49. * @return the company info that was added
  50. */
  51. public static CompanyInfo addCompanyInfo(CompanyInfo companyInfo) {
  52. return getService().addCompanyInfo(companyInfo);
  53. }
  54. /**
  55. * Creates a new company info with the primary key. Does not add the company info to the database.
  56. *
  57. * @param companyInfoId the primary key for the new company info
  58. * @return the new company info
  59. */
  60. public static CompanyInfo createCompanyInfo(long companyInfoId) {
  61. return getService().createCompanyInfo(companyInfoId);
  62. }
  63. /**
  64. * @throws PortalException
  65. */
  66. public static PersistedModel createPersistedModel(
  67. Serializable primaryKeyObj)
  68. throws PortalException {
  69. return getService().createPersistedModel(primaryKeyObj);
  70. }
  71. /**
  72. * Deletes the company info from the database. Also notifies the appropriate model listeners.
  73. *
  74. * <p>
  75. * <strong>Important:</strong> Inspect CompanyInfoLocalServiceImpl 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.
  76. * </p>
  77. *
  78. * @param companyInfo the company info
  79. * @return the company info that was removed
  80. */
  81. public static CompanyInfo deleteCompanyInfo(CompanyInfo companyInfo) {
  82. return getService().deleteCompanyInfo(companyInfo);
  83. }
  84. /**
  85. * Deletes the company info with the primary key from the database. Also notifies the appropriate model listeners.
  86. *
  87. * <p>
  88. * <strong>Important:</strong> Inspect CompanyInfoLocalServiceImpl 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.
  89. * </p>
  90. *
  91. * @param companyInfoId the primary key of the company info
  92. * @return the company info that was removed
  93. * @throws PortalException if a company info with the primary key could not be found
  94. */
  95. public static CompanyInfo deleteCompanyInfo(long companyInfoId)
  96. throws PortalException {
  97. return getService().deleteCompanyInfo(companyInfoId);
  98. }
  99. /**
  100. * @throws PortalException
  101. */
  102. public static PersistedModel deletePersistedModel(
  103. PersistedModel persistedModel)
  104. throws PortalException {
  105. return getService().deletePersistedModel(persistedModel);
  106. }
  107. public static <T> T dslQuery(DSLQuery dslQuery) {
  108. return getService().dslQuery(dslQuery);
  109. }
  110. public static int dslQueryCount(DSLQuery dslQuery) {
  111. return getService().dslQueryCount(dslQuery);
  112. }
  113. public static DynamicQuery dynamicQuery() {
  114. return getService().dynamicQuery();
  115. }
  116. /**
  117. * Performs a dynamic query on the database and returns the matching rows.
  118. *
  119. * @param dynamicQuery the dynamic query
  120. * @return the matching rows
  121. */
  122. public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
  123. return getService().dynamicQuery(dynamicQuery);
  124. }
  125. /**
  126. * Performs a dynamic query on the database and returns a range of the matching rows.
  127. *
  128. * <p>
  129. * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent, then the query will include the default ORDER BY logic from <code>com.liferay.portal.model.impl.CompanyInfoModelImpl</code>.
  130. * </p>
  131. *
  132. * @param dynamicQuery the dynamic query
  133. * @param start the lower bound of the range of model instances
  134. * @param end the upper bound of the range of model instances (not inclusive)
  135. * @return the range of matching rows
  136. */
  137. public static <T> List<T> dynamicQuery(
  138. DynamicQuery dynamicQuery, int start, int end) {
  139. return getService().dynamicQuery(dynamicQuery, start, end);
  140. }
  141. /**
  142. * Performs a dynamic query on the database and returns an ordered range of the matching rows.
  143. *
  144. * <p>
  145. * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent, then the query will include the default ORDER BY logic from <code>com.liferay.portal.model.impl.CompanyInfoModelImpl</code>.
  146. * </p>
  147. *
  148. * @param dynamicQuery the dynamic query
  149. * @param start the lower bound of the range of model instances
  150. * @param end the upper bound of the range of model instances (not inclusive)
  151. * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
  152. * @return the ordered range of matching rows
  153. */
  154. public static <T> List<T> dynamicQuery(
  155. DynamicQuery dynamicQuery, int start, int end,
  156. OrderByComparator<T> orderByComparator) {
  157. return getService().dynamicQuery(
  158. dynamicQuery, start, end, orderByComparator);
  159. }
  160. /**
  161. * Returns the number of rows matching the dynamic query.
  162. *
  163. * @param dynamicQuery the dynamic query
  164. * @return the number of rows matching the dynamic query
  165. */
  166. public static long dynamicQueryCount(DynamicQuery dynamicQuery) {
  167. return getService().dynamicQueryCount(dynamicQuery);
  168. }
  169. /**
  170. * Returns the number of rows matching the dynamic query.
  171. *
  172. * @param dynamicQuery the dynamic query
  173. * @param projection the projection to apply to the query
  174. * @return the number of rows matching the dynamic query
  175. */
  176. public static long dynamicQueryCount(
  177. DynamicQuery dynamicQuery,
  178. com.liferay.portal.kernel.dao.orm.Projection projection) {
  179. return getService().dynamicQueryCount(dynamicQuery, projection);
  180. }
  181. public static CompanyInfo fetchCompany(long companyId) {
  182. return getService().fetchCompany(companyId);
  183. }
  184. public static CompanyInfo fetchCompanyInfo(long companyInfoId) {
  185. return getService().fetchCompanyInfo(companyInfoId);
  186. }
  187. public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
  188. getActionableDynamicQuery() {
  189. return getService().getActionableDynamicQuery();
  190. }
  191. /**
  192. * Returns the company info with the primary key.
  193. *
  194. * @param companyInfoId the primary key of the company info
  195. * @return the company info
  196. * @throws PortalException if a company info with the primary key could not be found
  197. */
  198. public static CompanyInfo getCompanyInfo(long companyInfoId)
  199. throws PortalException {
  200. return getService().getCompanyInfo(companyInfoId);
  201. }
  202. /**
  203. * Returns a range of all the company infos.
  204. *
  205. * <p>
  206. * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to <code>com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS</code> will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent, then the query will include the default ORDER BY logic from <code>com.liferay.portal.model.impl.CompanyInfoModelImpl</code>.
  207. * </p>
  208. *
  209. * @param start the lower bound of the range of company infos
  210. * @param end the upper bound of the range of company infos (not inclusive)
  211. * @return the range of company infos
  212. */
  213. public static List<CompanyInfo> getCompanyInfos(int start, int end) {
  214. return getService().getCompanyInfos(start, end);
  215. }
  216. /**
  217. * Returns the number of company infos.
  218. *
  219. * @return the number of company infos
  220. */
  221. public static int getCompanyInfosCount() {
  222. return getService().getCompanyInfosCount();
  223. }
  224. public static
  225. com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
  226. getIndexableActionableDynamicQuery() {
  227. return getService().getIndexableActionableDynamicQuery();
  228. }
  229. /**
  230. * Returns the OSGi service identifier.
  231. *
  232. * @return the OSGi service identifier
  233. */
  234. public static String getOSGiServiceIdentifier() {
  235. return getService().getOSGiServiceIdentifier();
  236. }
  237. /**
  238. * @throws PortalException
  239. */
  240. public static PersistedModel getPersistedModel(Serializable primaryKeyObj)
  241. throws PortalException {
  242. return getService().getPersistedModel(primaryKeyObj);
  243. }
  244. /**
  245. * Updates the company info in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
  246. *
  247. * <p>
  248. * <strong>Important:</strong> Inspect CompanyInfoLocalServiceImpl 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.
  249. * </p>
  250. *
  251. * @param companyInfo the company info
  252. * @return the company info that was updated
  253. */
  254. public static CompanyInfo updateCompanyInfo(CompanyInfo companyInfo) {
  255. return getService().updateCompanyInfo(companyInfo);
  256. }
  257. public static CompanyInfoLocalService getService() {
  258. return _service;
  259. }
  260. private static volatile CompanyInfoLocalService _service;
  261. }