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