1
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
37 public class AccountUtil {
38
41 public static void clearCache() {
42 getPersistence().clearCache();
43 }
44
45
48 public static void clearCache(Account account) {
49 getPersistence().clearCache(account);
50 }
51
52
55 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56 throws SystemException {
57 return getPersistence().countWithDynamicQuery(dynamicQuery);
58 }
59
60
63 public static List<Account> findWithDynamicQuery(DynamicQuery dynamicQuery)
64 throws SystemException {
65 return getPersistence().findWithDynamicQuery(dynamicQuery);
66 }
67
68
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
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.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 }