1   /**
2    * Copyright (c) 2000-2010 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  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  import com.liferay.portal.model.Account;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="AccountUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       AccountPersistence
34   * @see       AccountPersistenceImpl
35   * @generated
36   */
37  public class AccountUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(Account)
47       */
48      public static void clearCache(Account account) {
49          getPersistence().clearCache(account);
50      }
51  
52      /**
53       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
54       */
55      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56          throws SystemException {
57          return getPersistence().countWithDynamicQuery(dynamicQuery);
58      }
59  
60      /**
61       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
62       */
63      public static List<Account> findWithDynamicQuery(DynamicQuery dynamicQuery)
64          throws SystemException {
65          return getPersistence().findWithDynamicQuery(dynamicQuery);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
70       */
71      public static List<Account> findWithDynamicQuery(
72          DynamicQuery dynamicQuery, int start, int end)
73          throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static Account remove(Account account) throws SystemException {
81          return getPersistence().remove(account);
82      }
83  
84      /**
85       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
86       */
87      public static Account update(Account account, boolean merge)
88          throws SystemException {
89          return getPersistence().update(account, merge);
90      }
91  
92      public static void cacheResult(com.liferay.portal.model.Account account) {
93          getPersistence().cacheResult(account);
94      }
95  
96      public static void cacheResult(
97          java.util.List<com.liferay.portal.model.Account> accounts) {
98          getPersistence().cacheResult(accounts);
99      }
100 
101     public static com.liferay.portal.model.Account create(long accountId) {
102         return getPersistence().create(accountId);
103     }
104 
105     public static com.liferay.portal.model.Account remove(long accountId)
106         throws com.liferay.portal.NoSuchAccountException,
107             com.liferay.portal.kernel.exception.SystemException {
108         return getPersistence().remove(accountId);
109     }
110 
111     public static com.liferay.portal.model.Account updateImpl(
112         com.liferay.portal.model.Account account, boolean merge)
113         throws com.liferay.portal.kernel.exception.SystemException {
114         return getPersistence().updateImpl(account, merge);
115     }
116 
117     public static com.liferay.portal.model.Account findByPrimaryKey(
118         long accountId)
119         throws com.liferay.portal.NoSuchAccountException,
120             com.liferay.portal.kernel.exception.SystemException {
121         return getPersistence().findByPrimaryKey(accountId);
122     }
123 
124     public static com.liferay.portal.model.Account fetchByPrimaryKey(
125         long accountId)
126         throws com.liferay.portal.kernel.exception.SystemException {
127         return getPersistence().fetchByPrimaryKey(accountId);
128     }
129 
130     public static java.util.List<com.liferay.portal.model.Account> findAll()
131         throws com.liferay.portal.kernel.exception.SystemException {
132         return getPersistence().findAll();
133     }
134 
135     public static java.util.List<com.liferay.portal.model.Account> findAll(
136         int start, int end)
137         throws com.liferay.portal.kernel.exception.SystemException {
138         return getPersistence().findAll(start, end);
139     }
140 
141     public static java.util.List<com.liferay.portal.model.Account> findAll(
142         int start, int end,
143         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
144         throws com.liferay.portal.kernel.exception.SystemException {
145         return getPersistence().findAll(start, end, orderByComparator);
146     }
147 
148     public static void removeAll()
149         throws com.liferay.portal.kernel.exception.SystemException {
150         getPersistence().removeAll();
151     }
152 
153     public static int countAll()
154         throws com.liferay.portal.kernel.exception.SystemException {
155         return getPersistence().countAll();
156     }
157 
158     public static AccountPersistence getPersistence() {
159         if (_persistence == null) {
160             _persistence = (AccountPersistence)PortalBeanLocatorUtil.locate(AccountPersistence.class.getName());
161         }
162 
163         return _persistence;
164     }
165 
166     public void setPersistence(AccountPersistence persistence) {
167         _persistence = persistence;
168     }
169 
170     private static AccountPersistence _persistence;
171 }