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 orderByComparator)
130 throws com.liferay.portal.kernel.exception.SystemException {
131 return getPersistence()
132 .findByCompanyId(companyId, start, end, orderByComparator);
133 }
134
135 public static com.liferay.portal.model.ResourceCode findByCompanyId_First(
136 long companyId,
137 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
138 throws com.liferay.portal.NoSuchResourceCodeException,
139 com.liferay.portal.kernel.exception.SystemException {
140 return getPersistence()
141 .findByCompanyId_First(companyId, orderByComparator);
142 }
143
144 public static com.liferay.portal.model.ResourceCode findByCompanyId_Last(
145 long companyId,
146 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
147 throws com.liferay.portal.NoSuchResourceCodeException,
148 com.liferay.portal.kernel.exception.SystemException {
149 return getPersistence()
150 .findByCompanyId_Last(companyId, orderByComparator);
151 }
152
153 public static com.liferay.portal.model.ResourceCode[] findByCompanyId_PrevAndNext(
154 long codeId, long companyId,
155 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156 throws com.liferay.portal.NoSuchResourceCodeException,
157 com.liferay.portal.kernel.exception.SystemException {
158 return getPersistence()
159 .findByCompanyId_PrevAndNext(codeId, companyId,
160 orderByComparator);
161 }
162
163 public static java.util.List<com.liferay.portal.model.ResourceCode> findByName(
164 java.lang.String name)
165 throws com.liferay.portal.kernel.exception.SystemException {
166 return getPersistence().findByName(name);
167 }
168
169 public static java.util.List<com.liferay.portal.model.ResourceCode> findByName(
170 java.lang.String name, int start, int end)
171 throws com.liferay.portal.kernel.exception.SystemException {
172 return getPersistence().findByName(name, start, end);
173 }
174
175 public static java.util.List<com.liferay.portal.model.ResourceCode> findByName(
176 java.lang.String name, int start, int end,
177 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178 throws com.liferay.portal.kernel.exception.SystemException {
179 return getPersistence().findByName(name, start, end, orderByComparator);
180 }
181
182 public static com.liferay.portal.model.ResourceCode findByName_First(
183 java.lang.String name,
184 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
185 throws com.liferay.portal.NoSuchResourceCodeException,
186 com.liferay.portal.kernel.exception.SystemException {
187 return getPersistence().findByName_First(name, orderByComparator);
188 }
189
190 public static com.liferay.portal.model.ResourceCode findByName_Last(
191 java.lang.String name,
192 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
193 throws com.liferay.portal.NoSuchResourceCodeException,
194 com.liferay.portal.kernel.exception.SystemException {
195 return getPersistence().findByName_Last(name, orderByComparator);
196 }
197
198 public static com.liferay.portal.model.ResourceCode[] findByName_PrevAndNext(
199 long codeId, java.lang.String name,
200 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
201 throws com.liferay.portal.NoSuchResourceCodeException,
202 com.liferay.portal.kernel.exception.SystemException {
203 return getPersistence()
204 .findByName_PrevAndNext(codeId, name, orderByComparator);
205 }
206
207 public static com.liferay.portal.model.ResourceCode findByC_N_S(
208 long companyId, java.lang.String name, int scope)
209 throws com.liferay.portal.NoSuchResourceCodeException,
210 com.liferay.portal.kernel.exception.SystemException {
211 return getPersistence().findByC_N_S(companyId, name, scope);
212 }
213
214 public static com.liferay.portal.model.ResourceCode fetchByC_N_S(
215 long companyId, java.lang.String name, int scope)
216 throws com.liferay.portal.kernel.exception.SystemException {
217 return getPersistence().fetchByC_N_S(companyId, name, scope);
218 }
219
220 public static com.liferay.portal.model.ResourceCode fetchByC_N_S(
221 long companyId, java.lang.String name, int scope,
222 boolean retrieveFromCache)
223 throws com.liferay.portal.kernel.exception.SystemException {
224 return getPersistence()
225 .fetchByC_N_S(companyId, name, scope, retrieveFromCache);
226 }
227
228 public static java.util.List<com.liferay.portal.model.ResourceCode> findAll()
229 throws com.liferay.portal.kernel.exception.SystemException {
230 return getPersistence().findAll();
231 }
232
233 public static java.util.List<com.liferay.portal.model.ResourceCode> findAll(
234 int start, int end)
235 throws com.liferay.portal.kernel.exception.SystemException {
236 return getPersistence().findAll(start, end);
237 }
238
239 public static java.util.List<com.liferay.portal.model.ResourceCode> findAll(
240 int start, int end,
241 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
242 throws com.liferay.portal.kernel.exception.SystemException {
243 return getPersistence().findAll(start, end, orderByComparator);
244 }
245
246 public static void removeByCompanyId(long companyId)
247 throws com.liferay.portal.kernel.exception.SystemException {
248 getPersistence().removeByCompanyId(companyId);
249 }
250
251 public static void removeByName(java.lang.String name)
252 throws com.liferay.portal.kernel.exception.SystemException {
253 getPersistence().removeByName(name);
254 }
255
256 public static void removeByC_N_S(long companyId, java.lang.String name,
257 int scope)
258 throws com.liferay.portal.NoSuchResourceCodeException,
259 com.liferay.portal.kernel.exception.SystemException {
260 getPersistence().removeByC_N_S(companyId, name, scope);
261 }
262
263 public static void removeAll()
264 throws com.liferay.portal.kernel.exception.SystemException {
265 getPersistence().removeAll();
266 }
267
268 public static int countByCompanyId(long companyId)
269 throws com.liferay.portal.kernel.exception.SystemException {
270 return getPersistence().countByCompanyId(companyId);
271 }
272
273 public static int countByName(java.lang.String name)
274 throws com.liferay.portal.kernel.exception.SystemException {
275 return getPersistence().countByName(name);
276 }
277
278 public static int countByC_N_S(long companyId, java.lang.String name,
279 int scope) throws com.liferay.portal.kernel.exception.SystemException {
280 return getPersistence().countByC_N_S(companyId, name, scope);
281 }
282
283 public static int countAll()
284 throws com.liferay.portal.kernel.exception.SystemException {
285 return getPersistence().countAll();
286 }
287
288 public static ResourceCodePersistence getPersistence() {
289 if (_persistence == null) {
290 _persistence = (ResourceCodePersistence)PortalBeanLocatorUtil.locate(ResourceCodePersistence.class.getName());
291 }
292
293 return _persistence;
294 }
295
296 public void setPersistence(ResourceCodePersistence persistence) {
297 _persistence = persistence;
298 }
299
300 private static ResourceCodePersistence _persistence;
301 }