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