/portal-service/src/com/liferay/portal/service/persistence/BrowserTrackerUtil.java

https://github.com/viktorkovacs/liferay-portal-trunk · Java · 353 lines · 144 code · 36 blank · 173 comment · 2 complexity · 388880aabea71674db05041da95d8887 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.portal.service.persistence;
  15. import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
  16. import com.liferay.portal.kernel.dao.orm.DynamicQuery;
  17. import com.liferay.portal.kernel.exception.SystemException;
  18. import com.liferay.portal.kernel.util.OrderByComparator;
  19. import com.liferay.portal.kernel.util.ReferenceRegistry;
  20. import com.liferay.portal.model.BrowserTracker;
  21. import com.liferay.portal.service.ServiceContext;
  22. import java.util.List;
  23. /**
  24. * The persistence utility for the browser tracker service. This utility wraps {@link BrowserTrackerPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
  25. *
  26. * <p>
  27. * Caching information and settings can be found in <code>portal.properties</code>
  28. * </p>
  29. *
  30. * @author Brian Wing Shun Chan
  31. * @see BrowserTrackerPersistence
  32. * @see BrowserTrackerPersistenceImpl
  33. * @generated
  34. */
  35. public class BrowserTrackerUtil {
  36. /*
  37. * NOTE FOR DEVELOPERS:
  38. *
  39. * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
  40. */
  41. /**
  42. * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
  43. */
  44. public static void clearCache() {
  45. getPersistence().clearCache();
  46. }
  47. /**
  48. * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
  49. */
  50. public static void clearCache(BrowserTracker browserTracker) {
  51. getPersistence().clearCache(browserTracker);
  52. }
  53. /**
  54. * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
  55. */
  56. public long countWithDynamicQuery(DynamicQuery dynamicQuery)
  57. throws SystemException {
  58. return getPersistence().countWithDynamicQuery(dynamicQuery);
  59. }
  60. /**
  61. * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
  62. */
  63. public static List<BrowserTracker> findWithDynamicQuery(
  64. DynamicQuery dynamicQuery) throws SystemException {
  65. return getPersistence().findWithDynamicQuery(dynamicQuery);
  66. }
  67. /**
  68. * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
  69. */
  70. public static List<BrowserTracker> findWithDynamicQuery(
  71. DynamicQuery dynamicQuery, int start, int end)
  72. throws SystemException {
  73. return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
  74. }
  75. /**
  76. * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
  77. */
  78. public static List<BrowserTracker> findWithDynamicQuery(
  79. DynamicQuery dynamicQuery, int start, int end,
  80. OrderByComparator orderByComparator) throws SystemException {
  81. return getPersistence()
  82. .findWithDynamicQuery(dynamicQuery, start, end,
  83. orderByComparator);
  84. }
  85. /**
  86. * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
  87. */
  88. public static BrowserTracker remove(BrowserTracker browserTracker)
  89. throws SystemException {
  90. return getPersistence().remove(browserTracker);
  91. }
  92. /**
  93. * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
  94. */
  95. public static BrowserTracker update(BrowserTracker browserTracker,
  96. boolean merge) throws SystemException {
  97. return getPersistence().update(browserTracker, merge);
  98. }
  99. /**
  100. * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
  101. */
  102. public static BrowserTracker update(BrowserTracker browserTracker,
  103. boolean merge, ServiceContext serviceContext) throws SystemException {
  104. return getPersistence().update(browserTracker, merge, serviceContext);
  105. }
  106. /**
  107. * Caches the browser tracker in the entity cache if it is enabled.
  108. *
  109. * @param browserTracker the browser tracker to cache
  110. */
  111. public static void cacheResult(
  112. com.liferay.portal.model.BrowserTracker browserTracker) {
  113. getPersistence().cacheResult(browserTracker);
  114. }
  115. /**
  116. * Caches the browser trackers in the entity cache if it is enabled.
  117. *
  118. * @param browserTrackers the browser trackers to cache
  119. */
  120. public static void cacheResult(
  121. java.util.List<com.liferay.portal.model.BrowserTracker> browserTrackers) {
  122. getPersistence().cacheResult(browserTrackers);
  123. }
  124. /**
  125. * Creates a new browser tracker with the primary key. Does not add the browser tracker to the database.
  126. *
  127. * @param browserTrackerId the primary key for the new browser tracker
  128. * @return the new browser tracker
  129. */
  130. public static com.liferay.portal.model.BrowserTracker create(
  131. long browserTrackerId) {
  132. return getPersistence().create(browserTrackerId);
  133. }
  134. /**
  135. * Removes the browser tracker with the primary key from the database. Also notifies the appropriate model listeners.
  136. *
  137. * @param browserTrackerId the primary key of the browser tracker to remove
  138. * @return the browser tracker that was removed
  139. * @throws com.liferay.portal.NoSuchBrowserTrackerException if a browser tracker with the primary key could not be found
  140. * @throws SystemException if a system exception occurred
  141. */
  142. public static com.liferay.portal.model.BrowserTracker remove(
  143. long browserTrackerId)
  144. throws com.liferay.portal.NoSuchBrowserTrackerException,
  145. com.liferay.portal.kernel.exception.SystemException {
  146. return getPersistence().remove(browserTrackerId);
  147. }
  148. public static com.liferay.portal.model.BrowserTracker updateImpl(
  149. com.liferay.portal.model.BrowserTracker browserTracker, boolean merge)
  150. throws com.liferay.portal.kernel.exception.SystemException {
  151. return getPersistence().updateImpl(browserTracker, merge);
  152. }
  153. /**
  154. * Finds the browser tracker with the primary key or throws a {@link com.liferay.portal.NoSuchBrowserTrackerException} if it could not be found.
  155. *
  156. * @param browserTrackerId the primary key of the browser tracker to find
  157. * @return the browser tracker
  158. * @throws com.liferay.portal.NoSuchBrowserTrackerException if a browser tracker with the primary key could not be found
  159. * @throws SystemException if a system exception occurred
  160. */
  161. public static com.liferay.portal.model.BrowserTracker findByPrimaryKey(
  162. long browserTrackerId)
  163. throws com.liferay.portal.NoSuchBrowserTrackerException,
  164. com.liferay.portal.kernel.exception.SystemException {
  165. return getPersistence().findByPrimaryKey(browserTrackerId);
  166. }
  167. /**
  168. * Finds the browser tracker with the primary key or returns <code>null</code> if it could not be found.
  169. *
  170. * @param browserTrackerId the primary key of the browser tracker to find
  171. * @return the browser tracker, or <code>null</code> if a browser tracker with the primary key could not be found
  172. * @throws SystemException if a system exception occurred
  173. */
  174. public static com.liferay.portal.model.BrowserTracker fetchByPrimaryKey(
  175. long browserTrackerId)
  176. throws com.liferay.portal.kernel.exception.SystemException {
  177. return getPersistence().fetchByPrimaryKey(browserTrackerId);
  178. }
  179. /**
  180. * Finds the browser tracker where userId = &#63; or throws a {@link com.liferay.portal.NoSuchBrowserTrackerException} if it could not be found.
  181. *
  182. * @param userId the user ID to search with
  183. * @return the matching browser tracker
  184. * @throws com.liferay.portal.NoSuchBrowserTrackerException if a matching browser tracker could not be found
  185. * @throws SystemException if a system exception occurred
  186. */
  187. public static com.liferay.portal.model.BrowserTracker findByUserId(
  188. long userId)
  189. throws com.liferay.portal.NoSuchBrowserTrackerException,
  190. com.liferay.portal.kernel.exception.SystemException {
  191. return getPersistence().findByUserId(userId);
  192. }
  193. /**
  194. * Finds the browser tracker where userId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
  195. *
  196. * @param userId the user ID to search with
  197. * @return the matching browser tracker, or <code>null</code> if a matching browser tracker could not be found
  198. * @throws SystemException if a system exception occurred
  199. */
  200. public static com.liferay.portal.model.BrowserTracker fetchByUserId(
  201. long userId) throws com.liferay.portal.kernel.exception.SystemException {
  202. return getPersistence().fetchByUserId(userId);
  203. }
  204. /**
  205. * Finds the browser tracker where userId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
  206. *
  207. * @param userId the user ID to search with
  208. * @return the matching browser tracker, or <code>null</code> if a matching browser tracker could not be found
  209. * @throws SystemException if a system exception occurred
  210. */
  211. public static com.liferay.portal.model.BrowserTracker fetchByUserId(
  212. long userId, boolean retrieveFromCache)
  213. throws com.liferay.portal.kernel.exception.SystemException {
  214. return getPersistence().fetchByUserId(userId, retrieveFromCache);
  215. }
  216. /**
  217. * Finds all the browser trackers.
  218. *
  219. * @return the browser trackers
  220. * @throws SystemException if a system exception occurred
  221. */
  222. public static java.util.List<com.liferay.portal.model.BrowserTracker> findAll()
  223. throws com.liferay.portal.kernel.exception.SystemException {
  224. return getPersistence().findAll();
  225. }
  226. /**
  227. * Finds a range of all the browser trackers.
  228. *
  229. * <p>
  230. * 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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
  231. * </p>
  232. *
  233. * @param start the lower bound of the range of browser trackers to return
  234. * @param end the upper bound of the range of browser trackers to return (not inclusive)
  235. * @return the range of browser trackers
  236. * @throws SystemException if a system exception occurred
  237. */
  238. public static java.util.List<com.liferay.portal.model.BrowserTracker> findAll(
  239. int start, int end)
  240. throws com.liferay.portal.kernel.exception.SystemException {
  241. return getPersistence().findAll(start, end);
  242. }
  243. /**
  244. * Finds an ordered range of all the browser trackers.
  245. *
  246. * <p>
  247. * 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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
  248. * </p>
  249. *
  250. * @param start the lower bound of the range of browser trackers to return
  251. * @param end the upper bound of the range of browser trackers to return (not inclusive)
  252. * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
  253. * @return the ordered range of browser trackers
  254. * @throws SystemException if a system exception occurred
  255. */
  256. public static java.util.List<com.liferay.portal.model.BrowserTracker> findAll(
  257. int start, int end,
  258. com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
  259. throws com.liferay.portal.kernel.exception.SystemException {
  260. return getPersistence().findAll(start, end, orderByComparator);
  261. }
  262. /**
  263. * Removes the browser tracker where userId = &#63; from the database.
  264. *
  265. * @param userId the user ID to search with
  266. * @throws SystemException if a system exception occurred
  267. */
  268. public static void removeByUserId(long userId)
  269. throws com.liferay.portal.NoSuchBrowserTrackerException,
  270. com.liferay.portal.kernel.exception.SystemException {
  271. getPersistence().removeByUserId(userId);
  272. }
  273. /**
  274. * Removes all the browser trackers from the database.
  275. *
  276. * @throws SystemException if a system exception occurred
  277. */
  278. public static void removeAll()
  279. throws com.liferay.portal.kernel.exception.SystemException {
  280. getPersistence().removeAll();
  281. }
  282. /**
  283. * Counts all the browser trackers where userId = &#63;.
  284. *
  285. * @param userId the user ID to search with
  286. * @return the number of matching browser trackers
  287. * @throws SystemException if a system exception occurred
  288. */
  289. public static int countByUserId(long userId)
  290. throws com.liferay.portal.kernel.exception.SystemException {
  291. return getPersistence().countByUserId(userId);
  292. }
  293. /**
  294. * Counts all the browser trackers.
  295. *
  296. * @return the number of browser trackers
  297. * @throws SystemException if a system exception occurred
  298. */
  299. public static int countAll()
  300. throws com.liferay.portal.kernel.exception.SystemException {
  301. return getPersistence().countAll();
  302. }
  303. public static BrowserTrackerPersistence getPersistence() {
  304. if (_persistence == null) {
  305. _persistence = (BrowserTrackerPersistence)PortalBeanLocatorUtil.locate(BrowserTrackerPersistence.class.getName());
  306. ReferenceRegistry.registerReference(BrowserTrackerUtil.class,
  307. "_persistence");
  308. }
  309. return _persistence;
  310. }
  311. public void setPersistence(BrowserTrackerPersistence persistence) {
  312. _persistence = persistence;
  313. ReferenceRegistry.registerReference(BrowserTrackerUtil.class,
  314. "_persistence");
  315. }
  316. private static BrowserTrackerPersistence _persistence;
  317. }