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 com.liferay.portlet.tags.model.TagsEntry create(long entryId) {
33          return getPersistence().create(entryId);
34      }
35  
36      public static com.liferay.portlet.tags.model.TagsEntry remove(long entryId)
37          throws com.liferay.portal.SystemException,
38              com.liferay.portlet.tags.NoSuchEntryException {
39          return getPersistence().remove(entryId);
40      }
41  
42      public static com.liferay.portlet.tags.model.TagsEntry remove(
43          com.liferay.portlet.tags.model.TagsEntry tagsEntry)
44          throws com.liferay.portal.SystemException {
45          return getPersistence().remove(tagsEntry);
46      }
47  
48      /**
49       * @deprecated Use <code>update(TagsEntry tagsEntry, boolean merge)</code>.
50       */
51      public static com.liferay.portlet.tags.model.TagsEntry update(
52          com.liferay.portlet.tags.model.TagsEntry tagsEntry)
53          throws com.liferay.portal.SystemException {
54          return getPersistence().update(tagsEntry);
55      }
56  
57      /**
58       * Add, update, or merge, the entity. This method also calls the model
59       * listeners to trigger the proper events associated with adding, deleting,
60       * or updating an entity.
61       *
62       * @param        tagsEntry the entity to add, update, or merge
63       * @param        merge boolean value for whether to merge the entity. The
64       *                default value is false. Setting merge to true is more
65       *                expensive and should only be true when tagsEntry is
66       *                transient. See LEP-5473 for a detailed discussion of this
67       *                method.
68       * @return        true if the portlet can be displayed via Ajax
69       */
70      public static com.liferay.portlet.tags.model.TagsEntry update(
71          com.liferay.portlet.tags.model.TagsEntry tagsEntry, boolean merge)
72          throws com.liferay.portal.SystemException {
73          return getPersistence().update(tagsEntry, merge);
74      }
75  
76      public static com.liferay.portlet.tags.model.TagsEntry updateImpl(
77          com.liferay.portlet.tags.model.TagsEntry tagsEntry, boolean merge)
78          throws com.liferay.portal.SystemException {
79          return getPersistence().updateImpl(tagsEntry, merge);
80      }
81  
82      public static com.liferay.portlet.tags.model.TagsEntry findByPrimaryKey(
83          long entryId)
84          throws com.liferay.portal.SystemException,
85              com.liferay.portlet.tags.NoSuchEntryException {
86          return getPersistence().findByPrimaryKey(entryId);
87      }
88  
89      public static com.liferay.portlet.tags.model.TagsEntry fetchByPrimaryKey(
90          long entryId) throws com.liferay.portal.SystemException {
91          return getPersistence().fetchByPrimaryKey(entryId);
92      }
93  
94      public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByVocabularyId(
95          long vocabularyId) throws com.liferay.portal.SystemException {
96          return getPersistence().findByVocabularyId(vocabularyId);
97      }
98  
99      public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByVocabularyId(
100         long vocabularyId, int start, int end)
101         throws com.liferay.portal.SystemException {
102         return getPersistence().findByVocabularyId(vocabularyId, start, end);
103     }
104 
105     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByVocabularyId(
106         long vocabularyId, int start, int end,
107         com.liferay.portal.kernel.util.OrderByComparator obc)
108         throws com.liferay.portal.SystemException {
109         return getPersistence().findByVocabularyId(vocabularyId, start, end, obc);
110     }
111 
112     public static com.liferay.portlet.tags.model.TagsEntry findByVocabularyId_First(
113         long vocabularyId, com.liferay.portal.kernel.util.OrderByComparator obc)
114         throws com.liferay.portal.SystemException,
115             com.liferay.portlet.tags.NoSuchEntryException {
116         return getPersistence().findByVocabularyId_First(vocabularyId, obc);
117     }
118 
119     public static com.liferay.portlet.tags.model.TagsEntry findByVocabularyId_Last(
120         long vocabularyId, com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.SystemException,
122             com.liferay.portlet.tags.NoSuchEntryException {
123         return getPersistence().findByVocabularyId_Last(vocabularyId, obc);
124     }
125 
126     public static com.liferay.portlet.tags.model.TagsEntry[] findByVocabularyId_PrevAndNext(
127         long entryId, long vocabularyId,
128         com.liferay.portal.kernel.util.OrderByComparator obc)
129         throws com.liferay.portal.SystemException,
130             com.liferay.portlet.tags.NoSuchEntryException {
131         return getPersistence()
132                    .findByVocabularyId_PrevAndNext(entryId, vocabularyId, obc);
133     }
134 
135     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByP_V(
136         long parentEntryId, long vocabularyId)
137         throws com.liferay.portal.SystemException {
138         return getPersistence().findByP_V(parentEntryId, vocabularyId);
139     }
140 
141     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByP_V(
142         long parentEntryId, long vocabularyId, int start, int end)
143         throws com.liferay.portal.SystemException {
144         return getPersistence()
145                    .findByP_V(parentEntryId, vocabularyId, start, end);
146     }
147 
148     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByP_V(
149         long parentEntryId, long vocabularyId, int start, int end,
150         com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.SystemException {
152         return getPersistence()
153                    .findByP_V(parentEntryId, vocabularyId, start, end, obc);
154     }
155 
156     public static com.liferay.portlet.tags.model.TagsEntry findByP_V_First(
157         long parentEntryId, long vocabularyId,
158         com.liferay.portal.kernel.util.OrderByComparator obc)
159         throws com.liferay.portal.SystemException,
160             com.liferay.portlet.tags.NoSuchEntryException {
161         return getPersistence().findByP_V_First(parentEntryId, vocabularyId, obc);
162     }
163 
164     public static com.liferay.portlet.tags.model.TagsEntry findByP_V_Last(
165         long parentEntryId, long vocabularyId,
166         com.liferay.portal.kernel.util.OrderByComparator obc)
167         throws com.liferay.portal.SystemException,
168             com.liferay.portlet.tags.NoSuchEntryException {
169         return getPersistence().findByP_V_Last(parentEntryId, vocabularyId, obc);
170     }
171 
172     public static com.liferay.portlet.tags.model.TagsEntry[] findByP_V_PrevAndNext(
173         long entryId, long parentEntryId, long vocabularyId,
174         com.liferay.portal.kernel.util.OrderByComparator obc)
175         throws com.liferay.portal.SystemException,
176             com.liferay.portlet.tags.NoSuchEntryException {
177         return getPersistence()
178                    .findByP_V_PrevAndNext(entryId, parentEntryId, vocabularyId,
179             obc);
180     }
181 
182     public static java.util.List<Object> findWithDynamicQuery(
183         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
184         throws com.liferay.portal.SystemException {
185         return getPersistence().findWithDynamicQuery(dynamicQuery);
186     }
187 
188     public static java.util.List<Object> findWithDynamicQuery(
189         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
190         int end) throws com.liferay.portal.SystemException {
191         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
192     }
193 
194     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll()
195         throws com.liferay.portal.SystemException {
196         return getPersistence().findAll();
197     }
198 
199     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll(
200         int start, int end) throws com.liferay.portal.SystemException {
201         return getPersistence().findAll(start, end);
202     }
203 
204     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll(
205         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
206         throws com.liferay.portal.SystemException {
207         return getPersistence().findAll(start, end, obc);
208     }
209 
210     public static void removeByVocabularyId(long vocabularyId)
211         throws com.liferay.portal.SystemException {
212         getPersistence().removeByVocabularyId(vocabularyId);
213     }
214 
215     public static void removeByP_V(long parentEntryId, long vocabularyId)
216         throws com.liferay.portal.SystemException {
217         getPersistence().removeByP_V(parentEntryId, vocabularyId);
218     }
219 
220     public static void removeAll() throws com.liferay.portal.SystemException {
221         getPersistence().removeAll();
222     }
223 
224     public static int countByVocabularyId(long vocabularyId)
225         throws com.liferay.portal.SystemException {
226         return getPersistence().countByVocabularyId(vocabularyId);
227     }
228 
229     public static int countByP_V(long parentEntryId, long vocabularyId)
230         throws com.liferay.portal.SystemException {
231         return getPersistence().countByP_V(parentEntryId, vocabularyId);
232     }
233 
234     public static int countAll() throws com.liferay.portal.SystemException {
235         return getPersistence().countAll();
236     }
237 
238     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
239         long pk) throws com.liferay.portal.SystemException {
240         return getPersistence().getTagsAssets(pk);
241     }
242 
243     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
244         long pk, int start, int end) throws com.liferay.portal.SystemException {
245         return getPersistence().getTagsAssets(pk, start, end);
246     }
247 
248     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
249         long pk, int start, int end,
250         com.liferay.portal.kernel.util.OrderByComparator obc)
251         throws com.liferay.portal.SystemException {
252         return getPersistence().getTagsAssets(pk, start, end, obc);
253     }
254 
255     public static int getTagsAssetsSize(long pk)
256         throws com.liferay.portal.SystemException {
257         return getPersistence().getTagsAssetsSize(pk);
258     }
259 
260     public static boolean containsTagsAsset(long pk, long tagsAssetPK)
261         throws com.liferay.portal.SystemException {
262         return getPersistence().containsTagsAsset(pk, tagsAssetPK);
263     }
264 
265     public static boolean containsTagsAssets(long pk)
266         throws com.liferay.portal.SystemException {
267         return getPersistence().containsTagsAssets(pk);
268     }
269 
270     public static void addTagsAsset(long pk, long tagsAssetPK)
271         throws com.liferay.portal.SystemException {
272         getPersistence().addTagsAsset(pk, tagsAssetPK);
273     }
274 
275     public static void addTagsAsset(long pk,
276         com.liferay.portlet.tags.model.TagsAsset tagsAsset)
277         throws com.liferay.portal.SystemException {
278         getPersistence().addTagsAsset(pk, tagsAsset);
279     }
280 
281     public static void addTagsAssets(long pk, long[] tagsAssetPKs)
282         throws com.liferay.portal.SystemException {
283         getPersistence().addTagsAssets(pk, tagsAssetPKs);
284     }
285 
286     public static void addTagsAssets(long pk,
287         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
288         throws com.liferay.portal.SystemException {
289         getPersistence().addTagsAssets(pk, tagsAssets);
290     }
291 
292     public static void clearTagsAssets(long pk)
293         throws com.liferay.portal.SystemException {
294         getPersistence().clearTagsAssets(pk);
295     }
296 
297     public static void removeTagsAsset(long pk, long tagsAssetPK)
298         throws com.liferay.portal.SystemException {
299         getPersistence().removeTagsAsset(pk, tagsAssetPK);
300     }
301 
302     public static void removeTagsAsset(long pk,
303         com.liferay.portlet.tags.model.TagsAsset tagsAsset)
304         throws com.liferay.portal.SystemException {
305         getPersistence().removeTagsAsset(pk, tagsAsset);
306     }
307 
308     public static void removeTagsAssets(long pk, long[] tagsAssetPKs)
309         throws com.liferay.portal.SystemException {
310         getPersistence().removeTagsAssets(pk, tagsAssetPKs);
311     }
312 
313     public static void removeTagsAssets(long pk,
314         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
315         throws com.liferay.portal.SystemException {
316         getPersistence().removeTagsAssets(pk, tagsAssets);
317     }
318 
319     public static void setTagsAssets(long pk, long[] tagsAssetPKs)
320         throws com.liferay.portal.SystemException {
321         getPersistence().setTagsAssets(pk, tagsAssetPKs);
322     }
323 
324     public static void setTagsAssets(long pk,
325         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
326         throws com.liferay.portal.SystemException {
327         getPersistence().setTagsAssets(pk, tagsAssets);
328     }
329 
330     public static TagsEntryPersistence getPersistence() {
331         return _persistence;
332     }
333 
334     public void setPersistence(TagsEntryPersistence persistence) {
335         _persistence = persistence;
336     }
337 
338     private static TagsEntryPersistence _persistence;
339 }