1
19
20 package com.liferay.portal.service.persistence;
21
22
28 public class PortletUtil {
29 public static void cacheResult(com.liferay.portal.model.Portlet portlet) {
30 getPersistence().cacheResult(portlet);
31 }
32
33 public static void cacheResult(
34 java.util.List<com.liferay.portal.model.Portlet> portlets) {
35 getPersistence().cacheResult(portlets);
36 }
37
38 public static void clearCache() {
39 getPersistence().clearCache();
40 }
41
42 public static com.liferay.portal.model.Portlet create(long id) {
43 return getPersistence().create(id);
44 }
45
46 public static com.liferay.portal.model.Portlet remove(long id)
47 throws com.liferay.portal.NoSuchPortletException,
48 com.liferay.portal.SystemException {
49 return getPersistence().remove(id);
50 }
51
52 public static com.liferay.portal.model.Portlet remove(
53 com.liferay.portal.model.Portlet portlet)
54 throws com.liferay.portal.SystemException {
55 return getPersistence().remove(portlet);
56 }
57
58
61 public static com.liferay.portal.model.Portlet update(
62 com.liferay.portal.model.Portlet portlet)
63 throws com.liferay.portal.SystemException {
64 return getPersistence().update(portlet);
65 }
66
67
80 public static com.liferay.portal.model.Portlet update(
81 com.liferay.portal.model.Portlet portlet, boolean merge)
82 throws com.liferay.portal.SystemException {
83 return getPersistence().update(portlet, merge);
84 }
85
86 public static com.liferay.portal.model.Portlet updateImpl(
87 com.liferay.portal.model.Portlet portlet, boolean merge)
88 throws com.liferay.portal.SystemException {
89 return getPersistence().updateImpl(portlet, merge);
90 }
91
92 public static com.liferay.portal.model.Portlet findByPrimaryKey(long id)
93 throws com.liferay.portal.NoSuchPortletException,
94 com.liferay.portal.SystemException {
95 return getPersistence().findByPrimaryKey(id);
96 }
97
98 public static com.liferay.portal.model.Portlet fetchByPrimaryKey(long id)
99 throws com.liferay.portal.SystemException {
100 return getPersistence().fetchByPrimaryKey(id);
101 }
102
103 public static java.util.List<com.liferay.portal.model.Portlet> findByCompanyId(
104 long companyId) throws com.liferay.portal.SystemException {
105 return getPersistence().findByCompanyId(companyId);
106 }
107
108 public static java.util.List<com.liferay.portal.model.Portlet> findByCompanyId(
109 long companyId, int start, int end)
110 throws com.liferay.portal.SystemException {
111 return getPersistence().findByCompanyId(companyId, start, end);
112 }
113
114 public static java.util.List<com.liferay.portal.model.Portlet> findByCompanyId(
115 long companyId, int start, int end,
116 com.liferay.portal.kernel.util.OrderByComparator obc)
117 throws com.liferay.portal.SystemException {
118 return getPersistence().findByCompanyId(companyId, start, end, obc);
119 }
120
121 public static com.liferay.portal.model.Portlet findByCompanyId_First(
122 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
123 throws com.liferay.portal.NoSuchPortletException,
124 com.liferay.portal.SystemException {
125 return getPersistence().findByCompanyId_First(companyId, obc);
126 }
127
128 public static com.liferay.portal.model.Portlet findByCompanyId_Last(
129 long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
130 throws com.liferay.portal.NoSuchPortletException,
131 com.liferay.portal.SystemException {
132 return getPersistence().findByCompanyId_Last(companyId, obc);
133 }
134
135 public static com.liferay.portal.model.Portlet[] findByCompanyId_PrevAndNext(
136 long id, long companyId,
137 com.liferay.portal.kernel.util.OrderByComparator obc)
138 throws com.liferay.portal.NoSuchPortletException,
139 com.liferay.portal.SystemException {
140 return getPersistence().findByCompanyId_PrevAndNext(id, companyId, obc);
141 }
142
143 public static com.liferay.portal.model.Portlet findByC_P(long companyId,
144 java.lang.String portletId)
145 throws com.liferay.portal.NoSuchPortletException,
146 com.liferay.portal.SystemException {
147 return getPersistence().findByC_P(companyId, portletId);
148 }
149
150 public static com.liferay.portal.model.Portlet fetchByC_P(long companyId,
151 java.lang.String portletId) throws com.liferay.portal.SystemException {
152 return getPersistence().fetchByC_P(companyId, portletId);
153 }
154
155 public static com.liferay.portal.model.Portlet fetchByC_P(long companyId,
156 java.lang.String portletId, boolean retrieveFromCache)
157 throws com.liferay.portal.SystemException {
158 return getPersistence()
159 .fetchByC_P(companyId, portletId, retrieveFromCache);
160 }
161
162 public static java.util.List<Object> findWithDynamicQuery(
163 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
164 throws com.liferay.portal.SystemException {
165 return getPersistence().findWithDynamicQuery(dynamicQuery);
166 }
167
168 public static java.util.List<Object> findWithDynamicQuery(
169 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
170 int end) throws com.liferay.portal.SystemException {
171 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
172 }
173
174 public static java.util.List<com.liferay.portal.model.Portlet> findAll()
175 throws com.liferay.portal.SystemException {
176 return getPersistence().findAll();
177 }
178
179 public static java.util.List<com.liferay.portal.model.Portlet> findAll(
180 int start, int end) throws com.liferay.portal.SystemException {
181 return getPersistence().findAll(start, end);
182 }
183
184 public static java.util.List<com.liferay.portal.model.Portlet> findAll(
185 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
186 throws com.liferay.portal.SystemException {
187 return getPersistence().findAll(start, end, obc);
188 }
189
190 public static void removeByCompanyId(long companyId)
191 throws com.liferay.portal.SystemException {
192 getPersistence().removeByCompanyId(companyId);
193 }
194
195 public static void removeByC_P(long companyId, java.lang.String portletId)
196 throws com.liferay.portal.NoSuchPortletException,
197 com.liferay.portal.SystemException {
198 getPersistence().removeByC_P(companyId, portletId);
199 }
200
201 public static void removeAll() throws com.liferay.portal.SystemException {
202 getPersistence().removeAll();
203 }
204
205 public static int countByCompanyId(long companyId)
206 throws com.liferay.portal.SystemException {
207 return getPersistence().countByCompanyId(companyId);
208 }
209
210 public static int countByC_P(long companyId, java.lang.String portletId)
211 throws com.liferay.portal.SystemException {
212 return getPersistence().countByC_P(companyId, portletId);
213 }
214
215 public static int countAll() throws com.liferay.portal.SystemException {
216 return getPersistence().countAll();
217 }
218
219 public static PortletPersistence getPersistence() {
220 return _persistence;
221 }
222
223 public void setPersistence(PortletPersistence persistence) {
224 _persistence = persistence;
225 }
226
227 private static PortletPersistence _persistence;
228 }