1
19
20 package com.liferay.portal.service.persistence;
21
22
28 public class ResourceUtil {
29 public static com.liferay.portal.model.Resource create(long resourceId) {
30 return getPersistence().create(resourceId);
31 }
32
33 public static com.liferay.portal.model.Resource remove(long resourceId)
34 throws com.liferay.portal.NoSuchResourceException,
35 com.liferay.portal.SystemException {
36 return getPersistence().remove(resourceId);
37 }
38
39 public static com.liferay.portal.model.Resource remove(
40 com.liferay.portal.model.Resource resource)
41 throws com.liferay.portal.SystemException {
42 return getPersistence().remove(resource);
43 }
44
45
48 public static com.liferay.portal.model.Resource update(
49 com.liferay.portal.model.Resource resource)
50 throws com.liferay.portal.SystemException {
51 return getPersistence().update(resource);
52 }
53
54
67 public static com.liferay.portal.model.Resource update(
68 com.liferay.portal.model.Resource resource, boolean merge)
69 throws com.liferay.portal.SystemException {
70 return getPersistence().update(resource, merge);
71 }
72
73 public static com.liferay.portal.model.Resource updateImpl(
74 com.liferay.portal.model.Resource resource, boolean merge)
75 throws com.liferay.portal.SystemException {
76 return getPersistence().updateImpl(resource, merge);
77 }
78
79 public static com.liferay.portal.model.Resource findByPrimaryKey(
80 long resourceId)
81 throws com.liferay.portal.NoSuchResourceException,
82 com.liferay.portal.SystemException {
83 return getPersistence().findByPrimaryKey(resourceId);
84 }
85
86 public static com.liferay.portal.model.Resource fetchByPrimaryKey(
87 long resourceId) throws com.liferay.portal.SystemException {
88 return getPersistence().fetchByPrimaryKey(resourceId);
89 }
90
91 public static java.util.List<com.liferay.portal.model.Resource> findByCodeId(
92 long codeId) throws com.liferay.portal.SystemException {
93 return getPersistence().findByCodeId(codeId);
94 }
95
96 public static java.util.List<com.liferay.portal.model.Resource> findByCodeId(
97 long codeId, int start, int end)
98 throws com.liferay.portal.SystemException {
99 return getPersistence().findByCodeId(codeId, start, end);
100 }
101
102 public static java.util.List<com.liferay.portal.model.Resource> findByCodeId(
103 long codeId, int start, int end,
104 com.liferay.portal.kernel.util.OrderByComparator obc)
105 throws com.liferay.portal.SystemException {
106 return getPersistence().findByCodeId(codeId, start, end, obc);
107 }
108
109 public static com.liferay.portal.model.Resource findByCodeId_First(
110 long codeId, com.liferay.portal.kernel.util.OrderByComparator obc)
111 throws com.liferay.portal.NoSuchResourceException,
112 com.liferay.portal.SystemException {
113 return getPersistence().findByCodeId_First(codeId, obc);
114 }
115
116 public static com.liferay.portal.model.Resource findByCodeId_Last(
117 long codeId, com.liferay.portal.kernel.util.OrderByComparator obc)
118 throws com.liferay.portal.NoSuchResourceException,
119 com.liferay.portal.SystemException {
120 return getPersistence().findByCodeId_Last(codeId, obc);
121 }
122
123 public static com.liferay.portal.model.Resource[] findByCodeId_PrevAndNext(
124 long resourceId, long codeId,
125 com.liferay.portal.kernel.util.OrderByComparator obc)
126 throws com.liferay.portal.NoSuchResourceException,
127 com.liferay.portal.SystemException {
128 return getPersistence().findByCodeId_PrevAndNext(resourceId, codeId, obc);
129 }
130
131 public static com.liferay.portal.model.Resource findByC_P(long codeId,
132 java.lang.String primKey)
133 throws com.liferay.portal.NoSuchResourceException,
134 com.liferay.portal.SystemException {
135 return getPersistence().findByC_P(codeId, primKey);
136 }
137
138 public static com.liferay.portal.model.Resource fetchByC_P(long codeId,
139 java.lang.String primKey) throws com.liferay.portal.SystemException {
140 return getPersistence().fetchByC_P(codeId, primKey);
141 }
142
143 public static java.util.List<Object> findWithDynamicQuery(
144 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
145 throws com.liferay.portal.SystemException {
146 return getPersistence().findWithDynamicQuery(dynamicQuery);
147 }
148
149 public static java.util.List<Object> findWithDynamicQuery(
150 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
151 int end) throws com.liferay.portal.SystemException {
152 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
153 }
154
155 public static java.util.List<com.liferay.portal.model.Resource> findAll()
156 throws com.liferay.portal.SystemException {
157 return getPersistence().findAll();
158 }
159
160 public static java.util.List<com.liferay.portal.model.Resource> findAll(
161 int start, int end) throws com.liferay.portal.SystemException {
162 return getPersistence().findAll(start, end);
163 }
164
165 public static java.util.List<com.liferay.portal.model.Resource> findAll(
166 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
167 throws com.liferay.portal.SystemException {
168 return getPersistence().findAll(start, end, obc);
169 }
170
171 public static void removeByCodeId(long codeId)
172 throws com.liferay.portal.SystemException {
173 getPersistence().removeByCodeId(codeId);
174 }
175
176 public static void removeByC_P(long codeId, java.lang.String primKey)
177 throws com.liferay.portal.NoSuchResourceException,
178 com.liferay.portal.SystemException {
179 getPersistence().removeByC_P(codeId, primKey);
180 }
181
182 public static void removeAll() throws com.liferay.portal.SystemException {
183 getPersistence().removeAll();
184 }
185
186 public static int countByCodeId(long codeId)
187 throws com.liferay.portal.SystemException {
188 return getPersistence().countByCodeId(codeId);
189 }
190
191 public static int countByC_P(long codeId, java.lang.String primKey)
192 throws com.liferay.portal.SystemException {
193 return getPersistence().countByC_P(codeId, primKey);
194 }
195
196 public static int countAll() throws com.liferay.portal.SystemException {
197 return getPersistence().countAll();
198 }
199
200 public static ResourcePersistence getPersistence() {
201 return _persistence;
202 }
203
204 public void setPersistence(ResourcePersistence persistence) {
205 _persistence = persistence;
206 }
207
208 private static ResourcePersistence _persistence;
209 }