1
22
23 package com.liferay.portal.service.persistence;
24
25
26
39 public class ResourceUtil {
40 public static void cacheResult(com.liferay.portal.model.Resource resource) {
41 getPersistence().cacheResult(resource);
42 }
43
44 public static void cacheResult(
45 java.util.List<com.liferay.portal.model.Resource> resources) {
46 getPersistence().cacheResult(resources);
47 }
48
49 public static void clearCache() {
50 getPersistence().clearCache();
51 }
52
53 public static com.liferay.portal.model.Resource create(long resourceId) {
54 return getPersistence().create(resourceId);
55 }
56
57 public static com.liferay.portal.model.Resource remove(long resourceId)
58 throws com.liferay.portal.NoSuchResourceException,
59 com.liferay.portal.SystemException {
60 return getPersistence().remove(resourceId);
61 }
62
63 public static com.liferay.portal.model.Resource remove(
64 com.liferay.portal.model.Resource resource)
65 throws com.liferay.portal.SystemException {
66 return getPersistence().remove(resource);
67 }
68
69
72 public static com.liferay.portal.model.Resource update(
73 com.liferay.portal.model.Resource resource)
74 throws com.liferay.portal.SystemException {
75 return getPersistence().update(resource);
76 }
77
78
90 public static com.liferay.portal.model.Resource update(
91 com.liferay.portal.model.Resource resource, boolean merge)
92 throws com.liferay.portal.SystemException {
93 return getPersistence().update(resource, merge);
94 }
95
96 public static com.liferay.portal.model.Resource updateImpl(
97 com.liferay.portal.model.Resource resource, boolean merge)
98 throws com.liferay.portal.SystemException {
99 return getPersistence().updateImpl(resource, merge);
100 }
101
102 public static com.liferay.portal.model.Resource findByPrimaryKey(
103 long resourceId)
104 throws com.liferay.portal.NoSuchResourceException,
105 com.liferay.portal.SystemException {
106 return getPersistence().findByPrimaryKey(resourceId);
107 }
108
109 public static com.liferay.portal.model.Resource fetchByPrimaryKey(
110 long resourceId) throws com.liferay.portal.SystemException {
111 return getPersistence().fetchByPrimaryKey(resourceId);
112 }
113
114 public static java.util.List<com.liferay.portal.model.Resource> findByCodeId(
115 long codeId) throws com.liferay.portal.SystemException {
116 return getPersistence().findByCodeId(codeId);
117 }
118
119 public static java.util.List<com.liferay.portal.model.Resource> findByCodeId(
120 long codeId, int start, int end)
121 throws com.liferay.portal.SystemException {
122 return getPersistence().findByCodeId(codeId, start, end);
123 }
124
125 public static java.util.List<com.liferay.portal.model.Resource> findByCodeId(
126 long codeId, int start, int end,
127 com.liferay.portal.kernel.util.OrderByComparator obc)
128 throws com.liferay.portal.SystemException {
129 return getPersistence().findByCodeId(codeId, start, end, obc);
130 }
131
132 public static com.liferay.portal.model.Resource findByCodeId_First(
133 long codeId, com.liferay.portal.kernel.util.OrderByComparator obc)
134 throws com.liferay.portal.NoSuchResourceException,
135 com.liferay.portal.SystemException {
136 return getPersistence().findByCodeId_First(codeId, obc);
137 }
138
139 public static com.liferay.portal.model.Resource findByCodeId_Last(
140 long codeId, com.liferay.portal.kernel.util.OrderByComparator obc)
141 throws com.liferay.portal.NoSuchResourceException,
142 com.liferay.portal.SystemException {
143 return getPersistence().findByCodeId_Last(codeId, obc);
144 }
145
146 public static com.liferay.portal.model.Resource[] findByCodeId_PrevAndNext(
147 long resourceId, long codeId,
148 com.liferay.portal.kernel.util.OrderByComparator obc)
149 throws com.liferay.portal.NoSuchResourceException,
150 com.liferay.portal.SystemException {
151 return getPersistence().findByCodeId_PrevAndNext(resourceId, codeId, obc);
152 }
153
154 public static com.liferay.portal.model.Resource findByC_P(long codeId,
155 java.lang.String primKey)
156 throws com.liferay.portal.NoSuchResourceException,
157 com.liferay.portal.SystemException {
158 return getPersistence().findByC_P(codeId, primKey);
159 }
160
161 public static com.liferay.portal.model.Resource fetchByC_P(long codeId,
162 java.lang.String primKey) throws com.liferay.portal.SystemException {
163 return getPersistence().fetchByC_P(codeId, primKey);
164 }
165
166 public static com.liferay.portal.model.Resource fetchByC_P(long codeId,
167 java.lang.String primKey, boolean retrieveFromCache)
168 throws com.liferay.portal.SystemException {
169 return getPersistence().fetchByC_P(codeId, primKey, retrieveFromCache);
170 }
171
172 public static java.util.List<Object> findWithDynamicQuery(
173 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
174 throws com.liferay.portal.SystemException {
175 return getPersistence().findWithDynamicQuery(dynamicQuery);
176 }
177
178 public static java.util.List<Object> findWithDynamicQuery(
179 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
180 int end) throws com.liferay.portal.SystemException {
181 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
182 }
183
184 public static java.util.List<com.liferay.portal.model.Resource> findAll()
185 throws com.liferay.portal.SystemException {
186 return getPersistence().findAll();
187 }
188
189 public static java.util.List<com.liferay.portal.model.Resource> findAll(
190 int start, int end) throws com.liferay.portal.SystemException {
191 return getPersistence().findAll(start, end);
192 }
193
194 public static java.util.List<com.liferay.portal.model.Resource> findAll(
195 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
196 throws com.liferay.portal.SystemException {
197 return getPersistence().findAll(start, end, obc);
198 }
199
200 public static void removeByCodeId(long codeId)
201 throws com.liferay.portal.SystemException {
202 getPersistence().removeByCodeId(codeId);
203 }
204
205 public static void removeByC_P(long codeId, java.lang.String primKey)
206 throws com.liferay.portal.NoSuchResourceException,
207 com.liferay.portal.SystemException {
208 getPersistence().removeByC_P(codeId, primKey);
209 }
210
211 public static void removeAll() throws com.liferay.portal.SystemException {
212 getPersistence().removeAll();
213 }
214
215 public static int countByCodeId(long codeId)
216 throws com.liferay.portal.SystemException {
217 return getPersistence().countByCodeId(codeId);
218 }
219
220 public static int countByC_P(long codeId, java.lang.String primKey)
221 throws com.liferay.portal.SystemException {
222 return getPersistence().countByC_P(codeId, primKey);
223 }
224
225 public static int countAll() throws com.liferay.portal.SystemException {
226 return getPersistence().countAll();
227 }
228
229 public static ResourcePersistence getPersistence() {
230 return _persistence;
231 }
232
233 public void setPersistence(ResourcePersistence persistence) {
234 _persistence = persistence;
235 }
236
237 private static ResourcePersistence _persistence;
238 }