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