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 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.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,
127 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
128 throws com.liferay.portal.kernel.exception.SystemException {
129 return getPersistence().findAll(start, end, orderByComparator);
130 }
131
132 public static void removeAll()
133 throws com.liferay.portal.kernel.exception.SystemException {
134 getPersistence().removeAll();
135 }
136
137 public static int countAll()
138 throws com.liferay.portal.kernel.exception.SystemException {
139 return getPersistence().countAll();
140 }
141
142 public static AccountPersistence getPersistence() {
143 if (_persistence == null) {
144 _persistence = (AccountPersistence)PortalBeanLocatorUtil.locate(AccountPersistence.class.getName());
145 }
146
147 return _persistence;
148 }
149
150 public void setPersistence(AccountPersistence persistence) {
151 _persistence = persistence;
152 }
153
154 private static AccountPersistence _persistence;
155 }