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.ResourceCode;
21
22 import java.util.List;
23
24
37 public class ResourceCodeUtil {
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 ResourceCode remove(ResourceCode resourceCode)
65 throws SystemException {
66 return getPersistence().remove(resourceCode);
67 }
68
69
72 public static ResourceCode update(ResourceCode resourceCode, boolean merge)
73 throws SystemException {
74 return getPersistence().update(resourceCode, merge);
75 }
76
77 public static void cacheResult(
78 com.liferay.portal.model.ResourceCode resourceCode) {
79 getPersistence().cacheResult(resourceCode);
80 }
81
82 public static void cacheResult(
83 java.util.List<com.liferay.portal.model.ResourceCode> resourceCodes) {
84 getPersistence().cacheResult(resourceCodes);
85 }
86
87 public static com.liferay.portal.model.ResourceCode create(long codeId) {
88 return getPersistence().create(codeId);
89 }
90
91 public static com.liferay.portal.model.ResourceCode remove(long codeId)
92 throws com.liferay.portal.NoSuchResourceCodeException,
93 com.liferay.portal.kernel.exception.SystemException {
94 return getPersistence().remove(codeId);
95 }
96
97 public static com.liferay.portal.model.ResourceCode updateImpl(
98 com.liferay.portal.model.ResourceCode resourceCode, boolean merge)
99 throws com.liferay.portal.kernel.exception.SystemException {
100 return getPersistence().updateImpl(resourceCode, merge);
101 }
102
103 public static com.liferay.portal.model.ResourceCode findByPrimaryKey(
104 long codeId)
105 throws com.liferay.portal.NoSuchResourceCodeException,
106 com.liferay.portal.kernel.exception.SystemException {
107 return getPersistence().findByPrimaryKey(codeId);
108 }
109
110 public static com.liferay.portal.model.ResourceCode fetchByPrimaryKey(
111 long codeId) throws com.liferay.portal.kernel.exception.SystemException {
112 return getPersistence().fetchByPrimaryKey(codeId);
113 }
114
115 public static java.util.List<com.liferay.portal.model.ResourceCode> findByCompanyId(
116 long companyId)
117 throws com.liferay.portal.kernel.exception.SystemException {
118 return getPersistence().findByCompanyId(companyId);
119 }
120
121 public static java.util.List<com.liferay.portal.model.ResourceCode> findByCompanyId(
122 long companyId, int start, int end)
123 throws com.liferay.portal.kernel.exception.SystemException {
124 return getPersistence().findByCompanyId(companyId, start, end);
125 }
126
127 public static java.util.List<com.liferay.portal.model.ResourceCode> findByCompanyId(
128 long companyId, int start, int end,
129 com.liferay.portal.kernel.util.OrderByComparator obc)
130 throws com.liferay.portal.kernel.exception.SystemException {
131 return getPersistence().findByCompanyId(companyId, start, end, obc);
132 }
133
134 public static com.liferay.portal.model.ResourceCode findByCompanyId_First(
135 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
136 throws com.liferay.portal.NoSuchResourceCodeException,
137 com.liferay.portal.kernel.exception.SystemException {
138 return getPersistence().findByCompanyId_First(companyId, obc);
139 }
140
141 public static com.liferay.portal.model.ResourceCode findByCompanyId_Last(
142 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
143 throws com.liferay.portal.NoSuchResourceCodeException,
144 com.liferay.portal.kernel.exception.SystemException {
145 return getPersistence().findByCompanyId_Last(companyId, obc);
146 }
147
148 public static com.liferay.portal.model.ResourceCode[] findByCompanyId_PrevAndNext(
149 long codeId, long companyId,
150 com.liferay.portal.kernel.util.OrderByComparator obc)
151 throws com.liferay.portal.NoSuchResourceCodeException,
152 com.liferay.portal.kernel.exception.SystemException {
153 return getPersistence()
154 .findByCompanyId_PrevAndNext(codeId, companyId, obc);
155 }
156
157 public static java.util.List<com.liferay.portal.model.ResourceCode> findByName(
158 java.lang.String name)
159 throws com.liferay.portal.kernel.exception.SystemException {
160 return getPersistence().findByName(name);
161 }
162
163 public static java.util.List<com.liferay.portal.model.ResourceCode> findByName(
164 java.lang.String name, int start, int end)
165 throws com.liferay.portal.kernel.exception.SystemException {
166 return getPersistence().findByName(name, start, end);
167 }
168
169 public static java.util.List<com.liferay.portal.model.ResourceCode> findByName(
170 java.lang.String name, int start, int end,
171 com.liferay.portal.kernel.util.OrderByComparator obc)
172 throws com.liferay.portal.kernel.exception.SystemException {
173 return getPersistence().findByName(name, start, end, obc);
174 }
175
176 public static com.liferay.portal.model.ResourceCode findByName_First(
177 java.lang.String name,
178 com.liferay.portal.kernel.util.OrderByComparator obc)
179 throws com.liferay.portal.NoSuchResourceCodeException,
180 com.liferay.portal.kernel.exception.SystemException {
181 return getPersistence().findByName_First(name, obc);
182 }
183
184 public static com.liferay.portal.model.ResourceCode findByName_Last(
185 java.lang.String name,
186 com.liferay.portal.kernel.util.OrderByComparator obc)
187 throws com.liferay.portal.NoSuchResourceCodeException,
188 com.liferay.portal.kernel.exception.SystemException {
189 return getPersistence().findByName_Last(name, obc);
190 }
191
192 public static com.liferay.portal.model.ResourceCode[] findByName_PrevAndNext(
193 long codeId, java.lang.String name,
194 com.liferay.portal.kernel.util.OrderByComparator obc)
195 throws com.liferay.portal.NoSuchResourceCodeException,
196 com.liferay.portal.kernel.exception.SystemException {
197 return getPersistence().findByName_PrevAndNext(codeId, name, obc);
198 }
199
200 public static com.liferay.portal.model.ResourceCode findByC_N_S(
201 long companyId, java.lang.String name, int scope)
202 throws com.liferay.portal.NoSuchResourceCodeException,
203 com.liferay.portal.kernel.exception.SystemException {
204 return getPersistence().findByC_N_S(companyId, name, scope);
205 }
206
207 public static com.liferay.portal.model.ResourceCode fetchByC_N_S(
208 long companyId, java.lang.String name, int scope)
209 throws com.liferay.portal.kernel.exception.SystemException {
210 return getPersistence().fetchByC_N_S(companyId, name, scope);
211 }
212
213 public static com.liferay.portal.model.ResourceCode fetchByC_N_S(
214 long companyId, java.lang.String name, int scope,
215 boolean retrieveFromCache)
216 throws com.liferay.portal.kernel.exception.SystemException {
217 return getPersistence()
218 .fetchByC_N_S(companyId, name, scope, retrieveFromCache);
219 }
220
221 public static java.util.List<com.liferay.portal.model.ResourceCode> findAll()
222 throws com.liferay.portal.kernel.exception.SystemException {
223 return getPersistence().findAll();
224 }
225
226 public static java.util.List<com.liferay.portal.model.ResourceCode> findAll(
227 int start, int end)
228 throws com.liferay.portal.kernel.exception.SystemException {
229 return getPersistence().findAll(start, end);
230 }
231
232 public static java.util.List<com.liferay.portal.model.ResourceCode> findAll(
233 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
234 throws com.liferay.portal.kernel.exception.SystemException {
235 return getPersistence().findAll(start, end, obc);
236 }
237
238 public static void removeByCompanyId(long companyId)
239 throws com.liferay.portal.kernel.exception.SystemException {
240 getPersistence().removeByCompanyId(companyId);
241 }
242
243 public static void removeByName(java.lang.String name)
244 throws com.liferay.portal.kernel.exception.SystemException {
245 getPersistence().removeByName(name);
246 }
247
248 public static void removeByC_N_S(long companyId, java.lang.String name,
249 int scope)
250 throws com.liferay.portal.NoSuchResourceCodeException,
251 com.liferay.portal.kernel.exception.SystemException {
252 getPersistence().removeByC_N_S(companyId, name, scope);
253 }
254
255 public static void removeAll()
256 throws com.liferay.portal.kernel.exception.SystemException {
257 getPersistence().removeAll();
258 }
259
260 public static int countByCompanyId(long companyId)
261 throws com.liferay.portal.kernel.exception.SystemException {
262 return getPersistence().countByCompanyId(companyId);
263 }
264
265 public static int countByName(java.lang.String name)
266 throws com.liferay.portal.kernel.exception.SystemException {
267 return getPersistence().countByName(name);
268 }
269
270 public static int countByC_N_S(long companyId, java.lang.String name,
271 int scope) throws com.liferay.portal.kernel.exception.SystemException {
272 return getPersistence().countByC_N_S(companyId, name, scope);
273 }
274
275 public static int countAll()
276 throws com.liferay.portal.kernel.exception.SystemException {
277 return getPersistence().countAll();
278 }
279
280 public static ResourceCodePersistence getPersistence() {
281 if (_persistence == null) {
282 _persistence = (ResourceCodePersistence)PortalBeanLocatorUtil.locate(ResourceCodePersistence.class.getName());
283 }
284
285 return _persistence;
286 }
287
288 public void setPersistence(ResourceCodePersistence persistence) {
289 _persistence = persistence;
290 }
291
292 private static ResourceCodePersistence _persistence;
293 }