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.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 List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49 throws SystemException {
50 return getPersistence().findWithDynamicQuery(dynamicQuery);
51 }
52
53
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
64 public static Account remove(Account account) throws SystemException {
65 return getPersistence().remove(account);
66 }
67
68
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
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 }