1
22
23 package com.liferay.portal.service.persistence;
24
25 import com.liferay.portal.SystemException;
26 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28 import com.liferay.portal.model.Account;
29
30 import java.util.List;
31
32
45 public class AccountUtil {
46
49 public static void clearCache() {
50 getPersistence().clearCache();
51 }
52
53
56 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
57 throws SystemException {
58 return getPersistence().findWithDynamicQuery(dynamicQuery);
59 }
60
61
64 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
65 int start, int end) throws SystemException {
66 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
67 }
68
69
72 public static Account remove(Account account) throws SystemException {
73 return getPersistence().remove(account);
74 }
75
76
79 public static Account update(Account account, boolean merge)
80 throws SystemException {
81 return getPersistence().update(account, merge);
82 }
83
84 public static void cacheResult(com.liferay.portal.model.Account account) {
85 getPersistence().cacheResult(account);
86 }
87
88 public static void cacheResult(
89 java.util.List<com.liferay.portal.model.Account> accounts) {
90 getPersistence().cacheResult(accounts);
91 }
92
93 public static com.liferay.portal.model.Account create(long accountId) {
94 return getPersistence().create(accountId);
95 }
96
97 public static com.liferay.portal.model.Account remove(long accountId)
98 throws com.liferay.portal.NoSuchAccountException,
99 com.liferay.portal.SystemException {
100 return getPersistence().remove(accountId);
101 }
102
103
106 public static com.liferay.portal.model.Account update(
107 com.liferay.portal.model.Account account)
108 throws com.liferay.portal.SystemException {
109 return getPersistence().update(account);
110 }
111
112 public static com.liferay.portal.model.Account updateImpl(
113 com.liferay.portal.model.Account account, boolean merge)
114 throws com.liferay.portal.SystemException {
115 return getPersistence().updateImpl(account, merge);
116 }
117
118 public static com.liferay.portal.model.Account findByPrimaryKey(
119 long accountId)
120 throws com.liferay.portal.NoSuchAccountException,
121 com.liferay.portal.SystemException {
122 return getPersistence().findByPrimaryKey(accountId);
123 }
124
125 public static com.liferay.portal.model.Account fetchByPrimaryKey(
126 long accountId) throws com.liferay.portal.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.SystemException {
132 return getPersistence().findAll();
133 }
134
135 public static java.util.List<com.liferay.portal.model.Account> findAll(
136 int start, int end) throws com.liferay.portal.SystemException {
137 return getPersistence().findAll(start, end);
138 }
139
140 public static java.util.List<com.liferay.portal.model.Account> findAll(
141 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
142 throws com.liferay.portal.SystemException {
143 return getPersistence().findAll(start, end, obc);
144 }
145
146 public static void removeAll() throws com.liferay.portal.SystemException {
147 getPersistence().removeAll();
148 }
149
150 public static int countAll() throws com.liferay.portal.SystemException {
151 return getPersistence().countAll();
152 }
153
154 public static AccountPersistence getPersistence() {
155 if (_persistence == null) {
156 _persistence = (AccountPersistence)PortalBeanLocatorUtil.locate(AccountPersistence.class.getName());
157 }
158
159 return _persistence;
160 }
161
162 public void setPersistence(AccountPersistence persistence) {
163 _persistence = persistence;
164 }
165
166 private static AccountPersistence _persistence;
167 }