1
14
15 package com.liferay.portal.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class AccountLocalServiceUtil {
42 public static com.liferay.portal.model.Account addAccount(
43 com.liferay.portal.model.Account account)
44 throws com.liferay.portal.SystemException {
45 return getService().addAccount(account);
46 }
47
48 public static com.liferay.portal.model.Account createAccount(long accountId) {
49 return getService().createAccount(accountId);
50 }
51
52 public static void deleteAccount(long accountId)
53 throws com.liferay.portal.PortalException,
54 com.liferay.portal.SystemException {
55 getService().deleteAccount(accountId);
56 }
57
58 public static void deleteAccount(com.liferay.portal.model.Account account)
59 throws com.liferay.portal.SystemException {
60 getService().deleteAccount(account);
61 }
62
63 @SuppressWarnings("rawtypes")
64 public static java.util.List dynamicQuery(
65 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66 throws com.liferay.portal.SystemException {
67 return getService().dynamicQuery(dynamicQuery);
68 }
69
70 @SuppressWarnings("rawtypes")
71 public static java.util.List dynamicQuery(
72 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73 int end) throws com.liferay.portal.SystemException {
74 return getService().dynamicQuery(dynamicQuery, start, end);
75 }
76
77 @SuppressWarnings("rawtypes")
78 public static java.util.List dynamicQuery(
79 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80 int end,
81 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82 throws com.liferay.portal.SystemException {
83 return getService()
84 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85 }
86
87 public static int dynamicQueryCount(
88 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89 throws com.liferay.portal.SystemException {
90 return getService().dynamicQueryCount(dynamicQuery);
91 }
92
93 public static com.liferay.portal.model.Account getAccount(long accountId)
94 throws com.liferay.portal.PortalException,
95 com.liferay.portal.SystemException {
96 return getService().getAccount(accountId);
97 }
98
99 public static java.util.List<com.liferay.portal.model.Account> getAccounts(
100 int start, int end) throws com.liferay.portal.SystemException {
101 return getService().getAccounts(start, end);
102 }
103
104 public static int getAccountsCount()
105 throws com.liferay.portal.SystemException {
106 return getService().getAccountsCount();
107 }
108
109 public static com.liferay.portal.model.Account updateAccount(
110 com.liferay.portal.model.Account account)
111 throws com.liferay.portal.SystemException {
112 return getService().updateAccount(account);
113 }
114
115 public static com.liferay.portal.model.Account updateAccount(
116 com.liferay.portal.model.Account account, boolean merge)
117 throws com.liferay.portal.SystemException {
118 return getService().updateAccount(account, merge);
119 }
120
121 public static com.liferay.portal.model.Account getAccount(long companyId,
122 long accountId)
123 throws com.liferay.portal.PortalException,
124 com.liferay.portal.SystemException {
125 return getService().getAccount(companyId, accountId);
126 }
127
128 public static AccountLocalService getService() {
129 if (_service == null) {
130 _service = (AccountLocalService)PortalBeanLocatorUtil.locate(AccountLocalService.class.getName());
131
132 ReferenceRegistry.registerReference(AccountLocalServiceUtil.class,
133 "_service");
134 MethodCache.remove(AccountLocalService.class);
135 }
136
137 return _service;
138 }
139
140 public void setService(AccountLocalService service) {
141 MethodCache.remove(AccountLocalService.class);
142
143 _service = service;
144
145 ReferenceRegistry.registerReference(AccountLocalServiceUtil.class,
146 "_service");
147 MethodCache.remove(AccountLocalService.class);
148 }
149
150 private static AccountLocalService _service;
151 }