1
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.kernel.util.ReferenceRegistry;
21 import com.liferay.portal.model.Account;
22
23 import java.util.List;
24
25
38 public class AccountUtil {
39
42 public static void clearCache() {
43 getPersistence().clearCache();
44 }
45
46
49 public static void clearCache(Account account) {
50 getPersistence().clearCache(account);
51 }
52
53
56 public int countWithDynamicQuery(DynamicQuery dynamicQuery)
57 throws SystemException {
58 return getPersistence().countWithDynamicQuery(dynamicQuery);
59 }
60
61
64 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
65 throws SystemException {
66 return getPersistence().findWithDynamicQuery(dynamicQuery);
67 }
68
69
72 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
73 int start, int end) throws SystemException {
74 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75 }
76
77
80 public static Account remove(Account account) throws SystemException {
81 return getPersistence().remove(account);
82 }
83
84
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.SystemException {
108 return getPersistence().remove(accountId);
109 }
110
111
114 public static com.liferay.portal.model.Account update(
115 com.liferay.portal.model.Account account)
116 throws com.liferay.portal.SystemException {
117 return getPersistence().update(account);
118 }
119
120 public static com.liferay.portal.model.Account updateImpl(
121 com.liferay.portal.model.Account account, boolean merge)
122 throws com.liferay.portal.SystemException {
123 return getPersistence().updateImpl(account, merge);
124 }
125
126 public static com.liferay.portal.model.Account findByPrimaryKey(
127 long accountId)
128 throws com.liferay.portal.NoSuchAccountException,
129 com.liferay.portal.SystemException {
130 return getPersistence().findByPrimaryKey(accountId);
131 }
132
133 public static com.liferay.portal.model.Account fetchByPrimaryKey(
134 long accountId) throws com.liferay.portal.SystemException {
135 return getPersistence().fetchByPrimaryKey(accountId);
136 }
137
138 public static java.util.List<com.liferay.portal.model.Account> findAll()
139 throws com.liferay.portal.SystemException {
140 return getPersistence().findAll();
141 }
142
143 public static java.util.List<com.liferay.portal.model.Account> findAll(
144 int start, int end) throws com.liferay.portal.SystemException {
145 return getPersistence().findAll(start, end);
146 }
147
148 public static java.util.List<com.liferay.portal.model.Account> findAll(
149 int start, int end,
150 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151 throws com.liferay.portal.SystemException {
152 return getPersistence().findAll(start, end, orderByComparator);
153 }
154
155 public static void removeAll() throws com.liferay.portal.SystemException {
156 getPersistence().removeAll();
157 }
158
159 public static int countAll() throws com.liferay.portal.SystemException {
160 return getPersistence().countAll();
161 }
162
163 public static AccountPersistence getPersistence() {
164 if (_persistence == null) {
165 _persistence = (AccountPersistence)PortalBeanLocatorUtil.locate(AccountPersistence.class.getName());
166
167 ReferenceRegistry.registerReference(AccountUtil.class,
168 "_persistence");
169 }
170
171 return _persistence;
172 }
173
174 public void setPersistence(AccountPersistence persistence) {
175 _persistence = persistence;
176
177 ReferenceRegistry.registerReference(AccountUtil.class, "_persistence");
178 }
179
180 private static AccountPersistence _persistence;
181 }