1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.tags.service.persistence;
24  
25  /**
26   * <a href="TagsEntryUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class TagsEntryUtil {
32      public static void cacheResult(
33          com.liferay.portlet.tags.model.TagsEntry tagsEntry) {
34          getPersistence().cacheResult(tagsEntry);
35      }
36  
37      public static void cacheResult(
38          java.util.List<com.liferay.portlet.tags.model.TagsEntry> tagsEntries) {
39          getPersistence().cacheResult(tagsEntries);
40      }
41  
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      public static com.liferay.portlet.tags.model.TagsEntry create(long entryId) {
47          return getPersistence().create(entryId);
48      }
49  
50      public static com.liferay.portlet.tags.model.TagsEntry remove(long entryId)
51          throws com.liferay.portal.SystemException,
52              com.liferay.portlet.tags.NoSuchEntryException {
53          return getPersistence().remove(entryId);
54      }
55  
56      public static com.liferay.portlet.tags.model.TagsEntry remove(
57          com.liferay.portlet.tags.model.TagsEntry tagsEntry)
58          throws com.liferay.portal.SystemException {
59          return getPersistence().remove(tagsEntry);
60      }
61  
62      /**
63       * @deprecated Use <code>update(TagsEntry tagsEntry, boolean merge)</code>.
64       */
65      public static com.liferay.portlet.tags.model.TagsEntry update(
66          com.liferay.portlet.tags.model.TagsEntry tagsEntry)
67          throws com.liferay.portal.SystemException {
68          return getPersistence().update(tagsEntry);
69      }
70  
71      /**
72       * Add, update, or merge, the entity. This method also calls the model
73       * listeners to trigger the proper events associated with adding, deleting,
74       * or updating an entity.
75       *
76       * @param        tagsEntry the entity to add, update, or merge
77       * @param        merge boolean value for whether to merge the entity. The
78       *                default value is false. Setting merge to true is more
79       *                expensive and should only be true when tagsEntry is
80       *                transient. See LEP-5473 for a detailed discussion of this
81       *                method.
82       * @return        true if the portlet can be displayed via Ajax
83       */
84      public static com.liferay.portlet.tags.model.TagsEntry update(
85          com.liferay.portlet.tags.model.TagsEntry tagsEntry, boolean merge)
86          throws com.liferay.portal.SystemException {
87          return getPersistence().update(tagsEntry, merge);
88      }
89  
90      public static com.liferay.portlet.tags.model.TagsEntry updateImpl(
91          com.liferay.portlet.tags.model.TagsEntry tagsEntry, boolean merge)
92          throws com.liferay.portal.SystemException {
93          return getPersistence().updateImpl(tagsEntry, merge);
94      }
95  
96      public static com.liferay.portlet.tags.model.TagsEntry findByPrimaryKey(
97          long entryId)
98          throws com.liferay.portal.SystemException,
99              com.liferay.portlet.tags.NoSuchEntryException {
100         return getPersistence().findByPrimaryKey(entryId);
101     }
102 
103     public static com.liferay.portlet.tags.model.TagsEntry fetchByPrimaryKey(
104         long entryId) throws com.liferay.portal.SystemException {
105         return getPersistence().fetchByPrimaryKey(entryId);
106     }
107 
108     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByVocabularyId(
109         long vocabularyId) throws com.liferay.portal.SystemException {
110         return getPersistence().findByVocabularyId(vocabularyId);
111     }
112 
113     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByVocabularyId(
114         long vocabularyId, int start, int end)
115         throws com.liferay.portal.SystemException {
116         return getPersistence().findByVocabularyId(vocabularyId, start, end);
117     }
118 
119     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByVocabularyId(
120         long vocabularyId, int start, int end,
121         com.liferay.portal.kernel.util.OrderByComparator obc)
122         throws com.liferay.portal.SystemException {
123         return getPersistence().findByVocabularyId(vocabularyId, start, end, obc);
124     }
125 
126     public static com.liferay.portlet.tags.model.TagsEntry findByVocabularyId_First(
127         long vocabularyId, com.liferay.portal.kernel.util.OrderByComparator obc)
128         throws com.liferay.portal.SystemException,
129             com.liferay.portlet.tags.NoSuchEntryException {
130         return getPersistence().findByVocabularyId_First(vocabularyId, obc);
131     }
132 
133     public static com.liferay.portlet.tags.model.TagsEntry findByVocabularyId_Last(
134         long vocabularyId, com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.SystemException,
136             com.liferay.portlet.tags.NoSuchEntryException {
137         return getPersistence().findByVocabularyId_Last(vocabularyId, obc);
138     }
139 
140     public static com.liferay.portlet.tags.model.TagsEntry[] findByVocabularyId_PrevAndNext(
141         long entryId, long vocabularyId,
142         com.liferay.portal.kernel.util.OrderByComparator obc)
143         throws com.liferay.portal.SystemException,
144             com.liferay.portlet.tags.NoSuchEntryException {
145         return getPersistence()
146                    .findByVocabularyId_PrevAndNext(entryId, vocabularyId, obc);
147     }
148 
149     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByP_V(
150         long parentEntryId, long vocabularyId)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findByP_V(parentEntryId, vocabularyId);
153     }
154 
155     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByP_V(
156         long parentEntryId, long vocabularyId, int start, int end)
157         throws com.liferay.portal.SystemException {
158         return getPersistence()
159                    .findByP_V(parentEntryId, vocabularyId, start, end);
160     }
161 
162     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByP_V(
163         long parentEntryId, long vocabularyId, int start, int end,
164         com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.SystemException {
166         return getPersistence()
167                    .findByP_V(parentEntryId, vocabularyId, start, end, obc);
168     }
169 
170     public static com.liferay.portlet.tags.model.TagsEntry findByP_V_First(
171         long parentEntryId, long vocabularyId,
172         com.liferay.portal.kernel.util.OrderByComparator obc)
173         throws com.liferay.portal.SystemException,
174             com.liferay.portlet.tags.NoSuchEntryException {
175         return getPersistence().findByP_V_First(parentEntryId, vocabularyId, obc);
176     }
177 
178     public static com.liferay.portlet.tags.model.TagsEntry findByP_V_Last(
179         long parentEntryId, long vocabularyId,
180         com.liferay.portal.kernel.util.OrderByComparator obc)
181         throws com.liferay.portal.SystemException,
182             com.liferay.portlet.tags.NoSuchEntryException {
183         return getPersistence().findByP_V_Last(parentEntryId, vocabularyId, obc);
184     }
185 
186     public static com.liferay.portlet.tags.model.TagsEntry[] findByP_V_PrevAndNext(
187         long entryId, long parentEntryId, long vocabularyId,
188         com.liferay.portal.kernel.util.OrderByComparator obc)
189         throws com.liferay.portal.SystemException,
190             com.liferay.portlet.tags.NoSuchEntryException {
191         return getPersistence()
192                    .findByP_V_PrevAndNext(entryId, parentEntryId, vocabularyId,
193             obc);
194     }
195 
196     public static java.util.List<Object> findWithDynamicQuery(
197         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
198         throws com.liferay.portal.SystemException {
199         return getPersistence().findWithDynamicQuery(dynamicQuery);
200     }
201 
202     public static java.util.List<Object> findWithDynamicQuery(
203         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
204         int end) throws com.liferay.portal.SystemException {
205         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
206     }
207 
208     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll()
209         throws com.liferay.portal.SystemException {
210         return getPersistence().findAll();
211     }
212 
213     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll(
214         int start, int end) throws com.liferay.portal.SystemException {
215         return getPersistence().findAll(start, end);
216     }
217 
218     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll(
219         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
220         throws com.liferay.portal.SystemException {
221         return getPersistence().findAll(start, end, obc);
222     }
223 
224     public static void removeByVocabularyId(long vocabularyId)
225         throws com.liferay.portal.SystemException {
226         getPersistence().removeByVocabularyId(vocabularyId);
227     }
228 
229     public static void removeByP_V(long parentEntryId, long vocabularyId)
230         throws com.liferay.portal.SystemException {
231         getPersistence().removeByP_V(parentEntryId, vocabularyId);
232     }
233 
234     public static void removeAll() throws com.liferay.portal.SystemException {
235         getPersistence().removeAll();
236     }
237 
238     public static int countByVocabularyId(long vocabularyId)
239         throws com.liferay.portal.SystemException {
240         return getPersistence().countByVocabularyId(vocabularyId);
241     }
242 
243     public static int countByP_V(long parentEntryId, long vocabularyId)
244         throws com.liferay.portal.SystemException {
245         return getPersistence().countByP_V(parentEntryId, vocabularyId);
246     }
247 
248     public static int countAll() throws com.liferay.portal.SystemException {
249         return getPersistence().countAll();
250     }
251 
252     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
253         long pk) throws com.liferay.portal.SystemException {
254         return getPersistence().getTagsAssets(pk);
255     }
256 
257     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
258         long pk, int start, int end) throws com.liferay.portal.SystemException {
259         return getPersistence().getTagsAssets(pk, start, end);
260     }
261 
262     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
263         long pk, int start, int end,
264         com.liferay.portal.kernel.util.OrderByComparator obc)
265         throws com.liferay.portal.SystemException {
266         return getPersistence().getTagsAssets(pk, start, end, obc);
267     }
268 
269     public static int getTagsAssetsSize(long pk)
270         throws com.liferay.portal.SystemException {
271         return getPersistence().getTagsAssetsSize(pk);
272     }
273 
274     public static boolean containsTagsAsset(long pk, long tagsAssetPK)
275         throws com.liferay.portal.SystemException {
276         return getPersistence().containsTagsAsset(pk, tagsAssetPK);
277     }
278 
279     public static boolean containsTagsAssets(long pk)
280         throws com.liferay.portal.SystemException {
281         return getPersistence().containsTagsAssets(pk);
282     }
283 
284     public static void addTagsAsset(long pk, long tagsAssetPK)
285         throws com.liferay.portal.SystemException {
286         getPersistence().addTagsAsset(pk, tagsAssetPK);
287     }
288 
289     public static void addTagsAsset(long pk,
290         com.liferay.portlet.tags.model.TagsAsset tagsAsset)
291         throws com.liferay.portal.SystemException {
292         getPersistence().addTagsAsset(pk, tagsAsset);
293     }
294 
295     public static void addTagsAssets(long pk, long[] tagsAssetPKs)
296         throws com.liferay.portal.SystemException {
297         getPersistence().addTagsAssets(pk, tagsAssetPKs);
298     }
299 
300     public static void addTagsAssets(long pk,
301         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
302         throws com.liferay.portal.SystemException {
303         getPersistence().addTagsAssets(pk, tagsAssets);
304     }
305 
306     public static void clearTagsAssets(long pk)
307         throws com.liferay.portal.SystemException {
308         getPersistence().clearTagsAssets(pk);
309     }
310 
311     public static void removeTagsAsset(long pk, long tagsAssetPK)
312         throws com.liferay.portal.SystemException {
313         getPersistence().removeTagsAsset(pk, tagsAssetPK);
314     }
315 
316     public static void removeTagsAsset(long pk,
317         com.liferay.portlet.tags.model.TagsAsset tagsAsset)
318         throws com.liferay.portal.SystemException {
319         getPersistence().removeTagsAsset(pk, tagsAsset);
320     }
321 
322     public static void removeTagsAssets(long pk, long[] tagsAssetPKs)
323         throws com.liferay.portal.SystemException {
324         getPersistence().removeTagsAssets(pk, tagsAssetPKs);
325     }
326 
327     public static void removeTagsAssets(long pk,
328         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
329         throws com.liferay.portal.SystemException {
330         getPersistence().removeTagsAssets(pk, tagsAssets);
331     }
332 
333     public static void setTagsAssets(long pk, long[] tagsAssetPKs)
334         throws com.liferay.portal.SystemException {
335         getPersistence().setTagsAssets(pk, tagsAssetPKs);
336     }
337 
338     public static void setTagsAssets(long pk,
339         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
340         throws com.liferay.portal.SystemException {
341         getPersistence().setTagsAssets(pk, tagsAssets);
342     }
343 
344     public static TagsEntryPersistence getPersistence() {
345         return _persistence;
346     }
347 
348     public void setPersistence(TagsEntryPersistence persistence) {
349         _persistence = persistence;
350     }
351 
352     private static TagsEntryPersistence _persistence;
353 }