1
22
23 package com.liferay.portal.service.persistence;
24
25 import com.liferay.portal.SystemException;
26 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28 import com.liferay.portal.model.Portlet;
29
30 import java.util.List;
31
32
45 public class PortletUtil {
46
49 public static void clearCache() {
50 getPersistence().clearCache();
51 }
52
53
56 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
57 throws SystemException {
58 return getPersistence().findWithDynamicQuery(dynamicQuery);
59 }
60
61
64 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
65 int start, int end) throws SystemException {
66 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
67 }
68
69
72 public static Portlet remove(Portlet portlet) throws SystemException {
73 return getPersistence().remove(portlet);
74 }
75
76
79 public static Portlet update(Portlet portlet, boolean merge)
80 throws SystemException {
81 return getPersistence().update(portlet, merge);
82 }
83
84 public static void cacheResult(com.liferay.portal.model.Portlet portlet) {
85 getPersistence().cacheResult(portlet);
86 }
87
88 public static void cacheResult(
89 java.util.List<com.liferay.portal.model.Portlet> portlets) {
90 getPersistence().cacheResult(portlets);
91 }
92
93 public static com.liferay.portal.model.Portlet create(long id) {
94 return getPersistence().create(id);
95 }
96
97 public static com.liferay.portal.model.Portlet remove(long id)
98 throws com.liferay.portal.NoSuchPortletException,
99 com.liferay.portal.SystemException {
100 return getPersistence().remove(id);
101 }
102
103
106 public static com.liferay.portal.model.Portlet update(
107 com.liferay.portal.model.Portlet portlet)
108 throws com.liferay.portal.SystemException {
109 return getPersistence().update(portlet);
110 }
111
112 public static com.liferay.portal.model.Portlet updateImpl(
113 com.liferay.portal.model.Portlet portlet, boolean merge)
114 throws com.liferay.portal.SystemException {
115 return getPersistence().updateImpl(portlet, merge);
116 }
117
118 public static com.liferay.portal.model.Portlet findByPrimaryKey(long id)
119 throws com.liferay.portal.NoSuchPortletException,
120 com.liferay.portal.SystemException {
121 return getPersistence().findByPrimaryKey(id);
122 }
123
124 public static com.liferay.portal.model.Portlet fetchByPrimaryKey(long id)
125 throws com.liferay.portal.SystemException {
126 return getPersistence().fetchByPrimaryKey(id);
127 }
128
129 public static java.util.List<com.liferay.portal.model.Portlet> findByCompanyId(
130 long companyId) throws com.liferay.portal.SystemException {
131 return getPersistence().findByCompanyId(companyId);
132 }
133
134 public static java.util.List<com.liferay.portal.model.Portlet> findByCompanyId(
135 long companyId, int start, int end)
136 throws com.liferay.portal.SystemException {
137 return getPersistence().findByCompanyId(companyId, start, end);
138 }
139
140 public static java.util.List<com.liferay.portal.model.Portlet> findByCompanyId(
141 long companyId, int start, int end,
142 com.liferay.portal.kernel.util.OrderByComparator obc)
143 throws com.liferay.portal.SystemException {
144 return getPersistence().findByCompanyId(companyId, start, end, obc);
145 }
146
147 public static com.liferay.portal.model.Portlet findByCompanyId_First(
148 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
149 throws com.liferay.portal.NoSuchPortletException,
150 com.liferay.portal.SystemException {
151 return getPersistence().findByCompanyId_First(companyId, obc);
152 }
153
154 public static com.liferay.portal.model.Portlet findByCompanyId_Last(
155 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
156 throws com.liferay.portal.NoSuchPortletException,
157 com.liferay.portal.SystemException {
158 return getPersistence().findByCompanyId_Last(companyId, obc);
159 }
160
161 public static com.liferay.portal.model.Portlet[] findByCompanyId_PrevAndNext(
162 long id, long companyId,
163 com.liferay.portal.kernel.util.OrderByComparator obc)
164 throws com.liferay.portal.NoSuchPortletException,
165 com.liferay.portal.SystemException {
166 return getPersistence().findByCompanyId_PrevAndNext(id, companyId, obc);
167 }
168
169 public static com.liferay.portal.model.Portlet findByC_P(long companyId,
170 java.lang.String portletId)
171 throws com.liferay.portal.NoSuchPortletException,
172 com.liferay.portal.SystemException {
173 return getPersistence().findByC_P(companyId, portletId);
174 }
175
176 public static com.liferay.portal.model.Portlet fetchByC_P(long companyId,
177 java.lang.String portletId) throws com.liferay.portal.SystemException {
178 return getPersistence().fetchByC_P(companyId, portletId);
179 }
180
181 public static com.liferay.portal.model.Portlet fetchByC_P(long companyId,
182 java.lang.String portletId, boolean retrieveFromCache)
183 throws com.liferay.portal.SystemException {
184 return getPersistence()
185 .fetchByC_P(companyId, portletId, retrieveFromCache);
186 }
187
188 public static java.util.List<com.liferay.portal.model.Portlet> findAll()
189 throws com.liferay.portal.SystemException {
190 return getPersistence().findAll();
191 }
192
193 public static java.util.List<com.liferay.portal.model.Portlet> findAll(
194 int start, int end) throws com.liferay.portal.SystemException {
195 return getPersistence().findAll(start, end);
196 }
197
198 public static java.util.List<com.liferay.portal.model.Portlet> findAll(
199 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
200 throws com.liferay.portal.SystemException {
201 return getPersistence().findAll(start, end, obc);
202 }
203
204 public static void removeByCompanyId(long companyId)
205 throws com.liferay.portal.SystemException {
206 getPersistence().removeByCompanyId(companyId);
207 }
208
209 public static void removeByC_P(long companyId, java.lang.String portletId)
210 throws com.liferay.portal.NoSuchPortletException,
211 com.liferay.portal.SystemException {
212 getPersistence().removeByC_P(companyId, portletId);
213 }
214
215 public static void removeAll() throws com.liferay.portal.SystemException {
216 getPersistence().removeAll();
217 }
218
219 public static int countByCompanyId(long companyId)
220 throws com.liferay.portal.SystemException {
221 return getPersistence().countByCompanyId(companyId);
222 }
223
224 public static int countByC_P(long companyId, java.lang.String portletId)
225 throws com.liferay.portal.SystemException {
226 return getPersistence().countByC_P(companyId, portletId);
227 }
228
229 public static int countAll() throws com.liferay.portal.SystemException {
230 return getPersistence().countAll();
231 }
232
233 public static PortletPersistence getPersistence() {
234 if (_persistence == null) {
235 _persistence = (PortletPersistence)PortalBeanLocatorUtil.locate(PortletPersistence.class.getName());
236 }
237
238 return _persistence;
239 }
240
241 public void setPersistence(PortletPersistence persistence) {
242 _persistence = persistence;
243 }
244
245 private static PortletPersistence _persistence;
246 }