1
22
23 package com.liferay.portal.service.persistence;
24
25
31 public class PortletUtil {
32 public static void cacheResult(com.liferay.portal.model.Portlet portlet) {
33 getPersistence().cacheResult(portlet);
34 }
35
36 public static void cacheResult(
37 java.util.List<com.liferay.portal.model.Portlet> portlets) {
38 getPersistence().cacheResult(portlets);
39 }
40
41 public static void clearCache() {
42 getPersistence().clearCache();
43 }
44
45 public static com.liferay.portal.model.Portlet create(long id) {
46 return getPersistence().create(id);
47 }
48
49 public static com.liferay.portal.model.Portlet remove(long id)
50 throws com.liferay.portal.NoSuchPortletException,
51 com.liferay.portal.SystemException {
52 return getPersistence().remove(id);
53 }
54
55 public static com.liferay.portal.model.Portlet remove(
56 com.liferay.portal.model.Portlet portlet)
57 throws com.liferay.portal.SystemException {
58 return getPersistence().remove(portlet);
59 }
60
61
64 public static com.liferay.portal.model.Portlet update(
65 com.liferay.portal.model.Portlet portlet)
66 throws com.liferay.portal.SystemException {
67 return getPersistence().update(portlet);
68 }
69
70
83 public static com.liferay.portal.model.Portlet update(
84 com.liferay.portal.model.Portlet portlet, boolean merge)
85 throws com.liferay.portal.SystemException {
86 return getPersistence().update(portlet, merge);
87 }
88
89 public static com.liferay.portal.model.Portlet updateImpl(
90 com.liferay.portal.model.Portlet portlet, boolean merge)
91 throws com.liferay.portal.SystemException {
92 return getPersistence().updateImpl(portlet, merge);
93 }
94
95 public static com.liferay.portal.model.Portlet findByPrimaryKey(long id)
96 throws com.liferay.portal.NoSuchPortletException,
97 com.liferay.portal.SystemException {
98 return getPersistence().findByPrimaryKey(id);
99 }
100
101 public static com.liferay.portal.model.Portlet fetchByPrimaryKey(long id)
102 throws com.liferay.portal.SystemException {
103 return getPersistence().fetchByPrimaryKey(id);
104 }
105
106 public static java.util.List<com.liferay.portal.model.Portlet> findByCompanyId(
107 long companyId) throws com.liferay.portal.SystemException {
108 return getPersistence().findByCompanyId(companyId);
109 }
110
111 public static java.util.List<com.liferay.portal.model.Portlet> findByCompanyId(
112 long companyId, int start, int end)
113 throws com.liferay.portal.SystemException {
114 return getPersistence().findByCompanyId(companyId, start, end);
115 }
116
117 public static java.util.List<com.liferay.portal.model.Portlet> findByCompanyId(
118 long companyId, int start, int end,
119 com.liferay.portal.kernel.util.OrderByComparator obc)
120 throws com.liferay.portal.SystemException {
121 return getPersistence().findByCompanyId(companyId, start, end, obc);
122 }
123
124 public static com.liferay.portal.model.Portlet findByCompanyId_First(
125 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
126 throws com.liferay.portal.NoSuchPortletException,
127 com.liferay.portal.SystemException {
128 return getPersistence().findByCompanyId_First(companyId, obc);
129 }
130
131 public static com.liferay.portal.model.Portlet findByCompanyId_Last(
132 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
133 throws com.liferay.portal.NoSuchPortletException,
134 com.liferay.portal.SystemException {
135 return getPersistence().findByCompanyId_Last(companyId, obc);
136 }
137
138 public static com.liferay.portal.model.Portlet[] findByCompanyId_PrevAndNext(
139 long id, long companyId,
140 com.liferay.portal.kernel.util.OrderByComparator obc)
141 throws com.liferay.portal.NoSuchPortletException,
142 com.liferay.portal.SystemException {
143 return getPersistence().findByCompanyId_PrevAndNext(id, companyId, obc);
144 }
145
146 public static com.liferay.portal.model.Portlet findByC_P(long companyId,
147 java.lang.String portletId)
148 throws com.liferay.portal.NoSuchPortletException,
149 com.liferay.portal.SystemException {
150 return getPersistence().findByC_P(companyId, portletId);
151 }
152
153 public static com.liferay.portal.model.Portlet fetchByC_P(long companyId,
154 java.lang.String portletId) throws com.liferay.portal.SystemException {
155 return getPersistence().fetchByC_P(companyId, portletId);
156 }
157
158 public static com.liferay.portal.model.Portlet fetchByC_P(long companyId,
159 java.lang.String portletId, boolean retrieveFromCache)
160 throws com.liferay.portal.SystemException {
161 return getPersistence()
162 .fetchByC_P(companyId, portletId, 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.Portlet> findAll()
178 throws com.liferay.portal.SystemException {
179 return getPersistence().findAll();
180 }
181
182 public static java.util.List<com.liferay.portal.model.Portlet> 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.Portlet> 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 removeByCompanyId(long companyId)
194 throws com.liferay.portal.SystemException {
195 getPersistence().removeByCompanyId(companyId);
196 }
197
198 public static void removeByC_P(long companyId, java.lang.String portletId)
199 throws com.liferay.portal.NoSuchPortletException,
200 com.liferay.portal.SystemException {
201 getPersistence().removeByC_P(companyId, portletId);
202 }
203
204 public static void removeAll() throws com.liferay.portal.SystemException {
205 getPersistence().removeAll();
206 }
207
208 public static int countByCompanyId(long companyId)
209 throws com.liferay.portal.SystemException {
210 return getPersistence().countByCompanyId(companyId);
211 }
212
213 public static int countByC_P(long companyId, java.lang.String portletId)
214 throws com.liferay.portal.SystemException {
215 return getPersistence().countByC_P(companyId, portletId);
216 }
217
218 public static int countAll() throws com.liferay.portal.SystemException {
219 return getPersistence().countAll();
220 }
221
222 public static PortletPersistence getPersistence() {
223 return _persistence;
224 }
225
226 public void setPersistence(PortletPersistence persistence) {
227 _persistence = persistence;
228 }
229
230 private static PortletPersistence _persistence;
231 }