1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
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#findWithDynamicQuery(DynamicQuery)
47       */
48      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49          throws SystemException {
50          return getPersistence().findWithDynamicQuery(dynamicQuery);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57          int start, int end) throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
63       */
64      public static Account remove(Account account) throws SystemException {
65          return getPersistence().remove(account);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
70       */
71      public static Account update(Account account, boolean merge)
72          throws SystemException {
73          return getPersistence().update(account, merge);
74      }
75  
76      public static void cacheResult(com.liferay.portal.model.Account account) {
77          getPersistence().cacheResult(account);
78      }
79  
80      public static void cacheResult(
81          java.util.List<com.liferay.portal.model.Account> accounts) {
82          getPersistence().cacheResult(accounts);
83      }
84  
85      public static com.liferay.portal.model.Account create(long accountId) {
86          return getPersistence().create(accountId);
87      }
88  
89      public static com.liferay.portal.model.Account remove(long accountId)
90          throws com.liferay.portal.NoSuchAccountException,
91              com.liferay.portal.SystemException {
92          return getPersistence().remove(accountId);
93      }
94  
95      /**
96       * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
97       */
98      public static com.liferay.portal.model.Account update(
99          com.liferay.portal.model.Account account)
100         throws com.liferay.portal.SystemException {
101         return getPersistence().update(account);
102     }
103 
104     public static com.liferay.portal.model.Account updateImpl(
105         com.liferay.portal.model.Account account, boolean merge)
106         throws com.liferay.portal.SystemException {
107         return getPersistence().updateImpl(account, merge);
108     }
109 
110     public static com.liferay.portal.model.Account findByPrimaryKey(
111         long accountId)
112         throws com.liferay.portal.NoSuchAccountException,
113             com.liferay.portal.SystemException {
114         return getPersistence().findByPrimaryKey(accountId);
115     }
116 
117     public static com.liferay.portal.model.Account fetchByPrimaryKey(
118         long accountId) throws com.liferay.portal.SystemException {
119         return getPersistence().fetchByPrimaryKey(accountId);
120     }
121 
122     public static java.util.List<com.liferay.portal.model.Account> findAll()
123         throws com.liferay.portal.SystemException {
124         return getPersistence().findAll();
125     }
126 
127     public static java.util.List<com.liferay.portal.model.Account> findAll(
128         int start, int end) throws com.liferay.portal.SystemException {
129         return getPersistence().findAll(start, end);
130     }
131 
132     public static java.util.List<com.liferay.portal.model.Account> findAll(
133         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.SystemException {
135         return getPersistence().findAll(start, end, obc);
136     }
137 
138     public static void removeAll() throws com.liferay.portal.SystemException {
139         getPersistence().removeAll();
140     }
141 
142     public static int countAll() throws com.liferay.portal.SystemException {
143         return getPersistence().countAll();
144     }
145 
146     public static AccountPersistence getPersistence() {
147         if (_persistence == null) {
148             _persistence = (AccountPersistence)PortalBeanLocatorUtil.locate(AccountPersistence.class.getName());
149         }
150 
151         return _persistence;
152     }
153 
154     public void setPersistence(AccountPersistence persistence) {
155         _persistence = persistence;
156     }
157 
158     private static AccountPersistence _persistence;
159 }