1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.journal.service.persistence;
21  
22  /**
23   * <a href="JournalStructureUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class JournalStructureUtil {
29      public static com.liferay.portlet.journal.model.JournalStructure create(
30          long id) {
31          return getPersistence().create(id);
32      }
33  
34      public static com.liferay.portlet.journal.model.JournalStructure remove(
35          long id)
36          throws com.liferay.portal.SystemException,
37              com.liferay.portlet.journal.NoSuchStructureException {
38          return getPersistence().remove(id);
39      }
40  
41      public static com.liferay.portlet.journal.model.JournalStructure remove(
42          com.liferay.portlet.journal.model.JournalStructure journalStructure)
43          throws com.liferay.portal.SystemException {
44          return getPersistence().remove(journalStructure);
45      }
46  
47      /**
48       * @deprecated Use <code>update(JournalStructure journalStructure, boolean merge)</code>.
49       */
50      public static com.liferay.portlet.journal.model.JournalStructure update(
51          com.liferay.portlet.journal.model.JournalStructure journalStructure)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(journalStructure);
54      }
55  
56      /**
57       * Add, update, or merge, the entity. This method also calls the model
58       * listeners to trigger the proper events associated with adding, deleting,
59       * or updating an entity.
60       *
61       * @param        journalStructure the entity to add, update, or merge
62       * @param        merge boolean value for whether to merge the entity. The
63       *                default value is false. Setting merge to true is more
64       *                expensive and should only be true when journalStructure is
65       *                transient. See LEP-5473 for a detailed discussion of this
66       *                method.
67       * @return        true if the portlet can be displayed via Ajax
68       */
69      public static com.liferay.portlet.journal.model.JournalStructure update(
70          com.liferay.portlet.journal.model.JournalStructure journalStructure,
71          boolean merge) throws com.liferay.portal.SystemException {
72          return getPersistence().update(journalStructure, merge);
73      }
74  
75      public static com.liferay.portlet.journal.model.JournalStructure updateImpl(
76          com.liferay.portlet.journal.model.JournalStructure journalStructure,
77          boolean merge) throws com.liferay.portal.SystemException {
78          return getPersistence().updateImpl(journalStructure, merge);
79      }
80  
81      public static com.liferay.portlet.journal.model.JournalStructure findByPrimaryKey(
82          long id)
83          throws com.liferay.portal.SystemException,
84              com.liferay.portlet.journal.NoSuchStructureException {
85          return getPersistence().findByPrimaryKey(id);
86      }
87  
88      public static com.liferay.portlet.journal.model.JournalStructure fetchByPrimaryKey(
89          long id) throws com.liferay.portal.SystemException {
90          return getPersistence().fetchByPrimaryKey(id);
91      }
92  
93      public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> findByUuid(
94          java.lang.String uuid) throws com.liferay.portal.SystemException {
95          return getPersistence().findByUuid(uuid);
96      }
97  
98      public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> findByUuid(
99          java.lang.String uuid, int start, int end)
100         throws com.liferay.portal.SystemException {
101         return getPersistence().findByUuid(uuid, start, end);
102     }
103 
104     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> findByUuid(
105         java.lang.String uuid, int start, int end,
106         com.liferay.portal.kernel.util.OrderByComparator obc)
107         throws com.liferay.portal.SystemException {
108         return getPersistence().findByUuid(uuid, start, end, obc);
109     }
110 
111     public static com.liferay.portlet.journal.model.JournalStructure findByUuid_First(
112         java.lang.String uuid,
113         com.liferay.portal.kernel.util.OrderByComparator obc)
114         throws com.liferay.portal.SystemException,
115             com.liferay.portlet.journal.NoSuchStructureException {
116         return getPersistence().findByUuid_First(uuid, obc);
117     }
118 
119     public static com.liferay.portlet.journal.model.JournalStructure findByUuid_Last(
120         java.lang.String uuid,
121         com.liferay.portal.kernel.util.OrderByComparator obc)
122         throws com.liferay.portal.SystemException,
123             com.liferay.portlet.journal.NoSuchStructureException {
124         return getPersistence().findByUuid_Last(uuid, obc);
125     }
126 
127     public static com.liferay.portlet.journal.model.JournalStructure[] findByUuid_PrevAndNext(
128         long id, java.lang.String uuid,
129         com.liferay.portal.kernel.util.OrderByComparator obc)
130         throws com.liferay.portal.SystemException,
131             com.liferay.portlet.journal.NoSuchStructureException {
132         return getPersistence().findByUuid_PrevAndNext(id, uuid, obc);
133     }
134 
135     public static com.liferay.portlet.journal.model.JournalStructure findByUUID_G(
136         java.lang.String uuid, long groupId)
137         throws com.liferay.portal.SystemException,
138             com.liferay.portlet.journal.NoSuchStructureException {
139         return getPersistence().findByUUID_G(uuid, groupId);
140     }
141 
142     public static com.liferay.portlet.journal.model.JournalStructure fetchByUUID_G(
143         java.lang.String uuid, long groupId)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().fetchByUUID_G(uuid, groupId);
146     }
147 
148     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> findByGroupId(
149         long groupId) throws com.liferay.portal.SystemException {
150         return getPersistence().findByGroupId(groupId);
151     }
152 
153     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> findByGroupId(
154         long groupId, int start, int end)
155         throws com.liferay.portal.SystemException {
156         return getPersistence().findByGroupId(groupId, start, end);
157     }
158 
159     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> findByGroupId(
160         long groupId, int start, int end,
161         com.liferay.portal.kernel.util.OrderByComparator obc)
162         throws com.liferay.portal.SystemException {
163         return getPersistence().findByGroupId(groupId, start, end, obc);
164     }
165 
166     public static com.liferay.portlet.journal.model.JournalStructure findByGroupId_First(
167         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
168         throws com.liferay.portal.SystemException,
169             com.liferay.portlet.journal.NoSuchStructureException {
170         return getPersistence().findByGroupId_First(groupId, obc);
171     }
172 
173     public static com.liferay.portlet.journal.model.JournalStructure findByGroupId_Last(
174         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
175         throws com.liferay.portal.SystemException,
176             com.liferay.portlet.journal.NoSuchStructureException {
177         return getPersistence().findByGroupId_Last(groupId, obc);
178     }
179 
180     public static com.liferay.portlet.journal.model.JournalStructure[] findByGroupId_PrevAndNext(
181         long id, long groupId,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException,
184             com.liferay.portlet.journal.NoSuchStructureException {
185         return getPersistence().findByGroupId_PrevAndNext(id, groupId, obc);
186     }
187 
188     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> findByStructureId(
189         java.lang.String structureId) throws com.liferay.portal.SystemException {
190         return getPersistence().findByStructureId(structureId);
191     }
192 
193     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> findByStructureId(
194         java.lang.String structureId, int start, int end)
195         throws com.liferay.portal.SystemException {
196         return getPersistence().findByStructureId(structureId, start, end);
197     }
198 
199     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> findByStructureId(
200         java.lang.String structureId, int start, int end,
201         com.liferay.portal.kernel.util.OrderByComparator obc)
202         throws com.liferay.portal.SystemException {
203         return getPersistence().findByStructureId(structureId, start, end, obc);
204     }
205 
206     public static com.liferay.portlet.journal.model.JournalStructure findByStructureId_First(
207         java.lang.String structureId,
208         com.liferay.portal.kernel.util.OrderByComparator obc)
209         throws com.liferay.portal.SystemException,
210             com.liferay.portlet.journal.NoSuchStructureException {
211         return getPersistence().findByStructureId_First(structureId, obc);
212     }
213 
214     public static com.liferay.portlet.journal.model.JournalStructure findByStructureId_Last(
215         java.lang.String structureId,
216         com.liferay.portal.kernel.util.OrderByComparator obc)
217         throws com.liferay.portal.SystemException,
218             com.liferay.portlet.journal.NoSuchStructureException {
219         return getPersistence().findByStructureId_Last(structureId, obc);
220     }
221 
222     public static com.liferay.portlet.journal.model.JournalStructure[] findByStructureId_PrevAndNext(
223         long id, java.lang.String structureId,
224         com.liferay.portal.kernel.util.OrderByComparator obc)
225         throws com.liferay.portal.SystemException,
226             com.liferay.portlet.journal.NoSuchStructureException {
227         return getPersistence()
228                    .findByStructureId_PrevAndNext(id, structureId, obc);
229     }
230 
231     public static com.liferay.portlet.journal.model.JournalStructure findByG_S(
232         long groupId, java.lang.String structureId)
233         throws com.liferay.portal.SystemException,
234             com.liferay.portlet.journal.NoSuchStructureException {
235         return getPersistence().findByG_S(groupId, structureId);
236     }
237 
238     public static com.liferay.portlet.journal.model.JournalStructure fetchByG_S(
239         long groupId, java.lang.String structureId)
240         throws com.liferay.portal.SystemException {
241         return getPersistence().fetchByG_S(groupId, structureId);
242     }
243 
244     public static java.util.List<Object> findWithDynamicQuery(
245         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
246         throws com.liferay.portal.SystemException {
247         return getPersistence().findWithDynamicQuery(dynamicQuery);
248     }
249 
250     public static java.util.List<Object> findWithDynamicQuery(
251         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
252         int end) throws com.liferay.portal.SystemException {
253         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
254     }
255 
256     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> findAll()
257         throws com.liferay.portal.SystemException {
258         return getPersistence().findAll();
259     }
260 
261     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> findAll(
262         int start, int end) throws com.liferay.portal.SystemException {
263         return getPersistence().findAll(start, end);
264     }
265 
266     public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> findAll(
267         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
268         throws com.liferay.portal.SystemException {
269         return getPersistence().findAll(start, end, obc);
270     }
271 
272     public static void removeByUuid(java.lang.String uuid)
273         throws com.liferay.portal.SystemException {
274         getPersistence().removeByUuid(uuid);
275     }
276 
277     public static void removeByUUID_G(java.lang.String uuid, long groupId)
278         throws com.liferay.portal.SystemException,
279             com.liferay.portlet.journal.NoSuchStructureException {
280         getPersistence().removeByUUID_G(uuid, groupId);
281     }
282 
283     public static void removeByGroupId(long groupId)
284         throws com.liferay.portal.SystemException {
285         getPersistence().removeByGroupId(groupId);
286     }
287 
288     public static void removeByStructureId(java.lang.String structureId)
289         throws com.liferay.portal.SystemException {
290         getPersistence().removeByStructureId(structureId);
291     }
292 
293     public static void removeByG_S(long groupId, java.lang.String structureId)
294         throws com.liferay.portal.SystemException,
295             com.liferay.portlet.journal.NoSuchStructureException {
296         getPersistence().removeByG_S(groupId, structureId);
297     }
298 
299     public static void removeAll() throws com.liferay.portal.SystemException {
300         getPersistence().removeAll();
301     }
302 
303     public static int countByUuid(java.lang.String uuid)
304         throws com.liferay.portal.SystemException {
305         return getPersistence().countByUuid(uuid);
306     }
307 
308     public static int countByUUID_G(java.lang.String uuid, long groupId)
309         throws com.liferay.portal.SystemException {
310         return getPersistence().countByUUID_G(uuid, groupId);
311     }
312 
313     public static int countByGroupId(long groupId)
314         throws com.liferay.portal.SystemException {
315         return getPersistence().countByGroupId(groupId);
316     }
317 
318     public static int countByStructureId(java.lang.String structureId)
319         throws com.liferay.portal.SystemException {
320         return getPersistence().countByStructureId(structureId);
321     }
322 
323     public static int countByG_S(long groupId, java.lang.String structureId)
324         throws com.liferay.portal.SystemException {
325         return getPersistence().countByG_S(groupId, structureId);
326     }
327 
328     public static int countAll() throws com.liferay.portal.SystemException {
329         return getPersistence().countAll();
330     }
331 
332     public static JournalStructurePersistence getPersistence() {
333         return _persistence;
334     }
335 
336     public void setPersistence(JournalStructurePersistence persistence) {
337         _persistence = persistence;
338     }
339 
340     private static JournalStructurePersistence _persistence;
341 }