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#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.kernel.exception.SystemException {
92          return getPersistence().remove(accountId);
93      }
94  
95      public static com.liferay.portal.model.Account updateImpl(
96          com.liferay.portal.model.Account account, boolean merge)
97          throws com.liferay.portal.kernel.exception.SystemException {
98          return getPersistence().updateImpl(account, merge);
99      }
100 
101     public static com.liferay.portal.model.Account findByPrimaryKey(
102         long accountId)
103         throws com.liferay.portal.NoSuchAccountException,
104             com.liferay.portal.kernel.exception.SystemException {
105         return getPersistence().findByPrimaryKey(accountId);
106     }
107 
108     public static com.liferay.portal.model.Account fetchByPrimaryKey(
109         long accountId)
110         throws com.liferay.portal.kernel.exception.SystemException {
111         return getPersistence().fetchByPrimaryKey(accountId);
112     }
113 
114     public static java.util.List<com.liferay.portal.model.Account> findAll()
115         throws com.liferay.portal.kernel.exception.SystemException {
116         return getPersistence().findAll();
117     }
118 
119     public static java.util.List<com.liferay.portal.model.Account> findAll(
120         int start, int end)
121         throws com.liferay.portal.kernel.exception.SystemException {
122         return getPersistence().findAll(start, end);
123     }
124 
125     public static java.util.List<com.liferay.portal.model.Account> findAll(
126         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
127         throws com.liferay.portal.kernel.exception.SystemException {
128         return getPersistence().findAll(start, end, obc);
129     }
130 
131     public static void removeAll()
132         throws com.liferay.portal.kernel.exception.SystemException {
133         getPersistence().removeAll();
134     }
135 
136     public static int countAll()
137         throws com.liferay.portal.kernel.exception.SystemException {
138         return getPersistence().countAll();
139     }
140 
141     public static AccountPersistence getPersistence() {
142         if (_persistence == null) {
143             _persistence = (AccountPersistence)PortalBeanLocatorUtil.locate(AccountPersistence.class.getName());
144         }
145 
146         return _persistence;
147     }
148 
149     public void setPersistence(AccountPersistence persistence) {
150         _persistence = persistence;
151     }
152 
153     private static AccountPersistence _persistence;
154 }