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="TagsAssetUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class TagsAssetUtil {
32      public static com.liferay.portlet.tags.model.TagsAsset create(long assetId) {
33          return getPersistence().create(assetId);
34      }
35  
36      public static com.liferay.portlet.tags.model.TagsAsset remove(long assetId)
37          throws com.liferay.portal.SystemException,
38              com.liferay.portlet.tags.NoSuchAssetException {
39          return getPersistence().remove(assetId);
40      }
41  
42      public static com.liferay.portlet.tags.model.TagsAsset remove(
43          com.liferay.portlet.tags.model.TagsAsset tagsAsset)
44          throws com.liferay.portal.SystemException {
45          return getPersistence().remove(tagsAsset);
46      }
47  
48      /**
49       * @deprecated Use <code>update(TagsAsset tagsAsset, boolean merge)</code>.
50       */
51      public static com.liferay.portlet.tags.model.TagsAsset update(
52          com.liferay.portlet.tags.model.TagsAsset tagsAsset)
53          throws com.liferay.portal.SystemException {
54          return getPersistence().update(tagsAsset);
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        tagsAsset 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 tagsAsset 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.TagsAsset update(
71          com.liferay.portlet.tags.model.TagsAsset tagsAsset, boolean merge)
72          throws com.liferay.portal.SystemException {
73          return getPersistence().update(tagsAsset, merge);
74      }
75  
76      public static com.liferay.portlet.tags.model.TagsAsset updateImpl(
77          com.liferay.portlet.tags.model.TagsAsset tagsAsset, boolean merge)
78          throws com.liferay.portal.SystemException {
79          return getPersistence().updateImpl(tagsAsset, merge);
80      }
81  
82      public static com.liferay.portlet.tags.model.TagsAsset findByPrimaryKey(
83          long assetId)
84          throws com.liferay.portal.SystemException,
85              com.liferay.portlet.tags.NoSuchAssetException {
86          return getPersistence().findByPrimaryKey(assetId);
87      }
88  
89      public static com.liferay.portlet.tags.model.TagsAsset fetchByPrimaryKey(
90          long assetId) throws com.liferay.portal.SystemException {
91          return getPersistence().fetchByPrimaryKey(assetId);
92      }
93  
94      public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> findByCompanyId(
95          long companyId) throws com.liferay.portal.SystemException {
96          return getPersistence().findByCompanyId(companyId);
97      }
98  
99      public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> findByCompanyId(
100         long companyId, int start, int end)
101         throws com.liferay.portal.SystemException {
102         return getPersistence().findByCompanyId(companyId, start, end);
103     }
104 
105     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> findByCompanyId(
106         long companyId, int start, int end,
107         com.liferay.portal.kernel.util.OrderByComparator obc)
108         throws com.liferay.portal.SystemException {
109         return getPersistence().findByCompanyId(companyId, start, end, obc);
110     }
111 
112     public static com.liferay.portlet.tags.model.TagsAsset findByCompanyId_First(
113         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
114         throws com.liferay.portal.SystemException,
115             com.liferay.portlet.tags.NoSuchAssetException {
116         return getPersistence().findByCompanyId_First(companyId, obc);
117     }
118 
119     public static com.liferay.portlet.tags.model.TagsAsset findByCompanyId_Last(
120         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.SystemException,
122             com.liferay.portlet.tags.NoSuchAssetException {
123         return getPersistence().findByCompanyId_Last(companyId, obc);
124     }
125 
126     public static com.liferay.portlet.tags.model.TagsAsset[] findByCompanyId_PrevAndNext(
127         long assetId, long companyId,
128         com.liferay.portal.kernel.util.OrderByComparator obc)
129         throws com.liferay.portal.SystemException,
130             com.liferay.portlet.tags.NoSuchAssetException {
131         return getPersistence()
132                    .findByCompanyId_PrevAndNext(assetId, companyId, obc);
133     }
134 
135     public static com.liferay.portlet.tags.model.TagsAsset findByC_C(
136         long classNameId, long classPK)
137         throws com.liferay.portal.SystemException,
138             com.liferay.portlet.tags.NoSuchAssetException {
139         return getPersistence().findByC_C(classNameId, classPK);
140     }
141 
142     public static com.liferay.portlet.tags.model.TagsAsset fetchByC_C(
143         long classNameId, long classPK)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().fetchByC_C(classNameId, classPK);
146     }
147 
148     public static java.util.List<Object> findWithDynamicQuery(
149         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
150         throws com.liferay.portal.SystemException {
151         return getPersistence().findWithDynamicQuery(dynamicQuery);
152     }
153 
154     public static java.util.List<Object> findWithDynamicQuery(
155         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
156         int end) throws com.liferay.portal.SystemException {
157         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
158     }
159 
160     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> findAll()
161         throws com.liferay.portal.SystemException {
162         return getPersistence().findAll();
163     }
164 
165     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> findAll(
166         int start, int end) throws com.liferay.portal.SystemException {
167         return getPersistence().findAll(start, end);
168     }
169 
170     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> findAll(
171         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException {
173         return getPersistence().findAll(start, end, obc);
174     }
175 
176     public static void removeByCompanyId(long companyId)
177         throws com.liferay.portal.SystemException {
178         getPersistence().removeByCompanyId(companyId);
179     }
180 
181     public static void removeByC_C(long classNameId, long classPK)
182         throws com.liferay.portal.SystemException,
183             com.liferay.portlet.tags.NoSuchAssetException {
184         getPersistence().removeByC_C(classNameId, classPK);
185     }
186 
187     public static void removeAll() throws com.liferay.portal.SystemException {
188         getPersistence().removeAll();
189     }
190 
191     public static int countByCompanyId(long companyId)
192         throws com.liferay.portal.SystemException {
193         return getPersistence().countByCompanyId(companyId);
194     }
195 
196     public static int countByC_C(long classNameId, long classPK)
197         throws com.liferay.portal.SystemException {
198         return getPersistence().countByC_C(classNameId, classPK);
199     }
200 
201     public static int countAll() throws com.liferay.portal.SystemException {
202         return getPersistence().countAll();
203     }
204 
205     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getTagsEntries(
206         long pk) throws com.liferay.portal.SystemException {
207         return getPersistence().getTagsEntries(pk);
208     }
209 
210     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getTagsEntries(
211         long pk, int start, int end) throws com.liferay.portal.SystemException {
212         return getPersistence().getTagsEntries(pk, start, end);
213     }
214 
215     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getTagsEntries(
216         long pk, int start, int end,
217         com.liferay.portal.kernel.util.OrderByComparator obc)
218         throws com.liferay.portal.SystemException {
219         return getPersistence().getTagsEntries(pk, start, end, obc);
220     }
221 
222     public static int getTagsEntriesSize(long pk)
223         throws com.liferay.portal.SystemException {
224         return getPersistence().getTagsEntriesSize(pk);
225     }
226 
227     public static boolean containsTagsEntry(long pk, long tagsEntryPK)
228         throws com.liferay.portal.SystemException {
229         return getPersistence().containsTagsEntry(pk, tagsEntryPK);
230     }
231 
232     public static boolean containsTagsEntries(long pk)
233         throws com.liferay.portal.SystemException {
234         return getPersistence().containsTagsEntries(pk);
235     }
236 
237     public static void addTagsEntry(long pk, long tagsEntryPK)
238         throws com.liferay.portal.SystemException {
239         getPersistence().addTagsEntry(pk, tagsEntryPK);
240     }
241 
242     public static void addTagsEntry(long pk,
243         com.liferay.portlet.tags.model.TagsEntry tagsEntry)
244         throws com.liferay.portal.SystemException {
245         getPersistence().addTagsEntry(pk, tagsEntry);
246     }
247 
248     public static void addTagsEntries(long pk, long[] tagsEntryPKs)
249         throws com.liferay.portal.SystemException {
250         getPersistence().addTagsEntries(pk, tagsEntryPKs);
251     }
252 
253     public static void addTagsEntries(long pk,
254         java.util.List<com.liferay.portlet.tags.model.TagsEntry> tagsEntries)
255         throws com.liferay.portal.SystemException {
256         getPersistence().addTagsEntries(pk, tagsEntries);
257     }
258 
259     public static void clearTagsEntries(long pk)
260         throws com.liferay.portal.SystemException {
261         getPersistence().clearTagsEntries(pk);
262     }
263 
264     public static void removeTagsEntry(long pk, long tagsEntryPK)
265         throws com.liferay.portal.SystemException {
266         getPersistence().removeTagsEntry(pk, tagsEntryPK);
267     }
268 
269     public static void removeTagsEntry(long pk,
270         com.liferay.portlet.tags.model.TagsEntry tagsEntry)
271         throws com.liferay.portal.SystemException {
272         getPersistence().removeTagsEntry(pk, tagsEntry);
273     }
274 
275     public static void removeTagsEntries(long pk, long[] tagsEntryPKs)
276         throws com.liferay.portal.SystemException {
277         getPersistence().removeTagsEntries(pk, tagsEntryPKs);
278     }
279 
280     public static void removeTagsEntries(long pk,
281         java.util.List<com.liferay.portlet.tags.model.TagsEntry> tagsEntries)
282         throws com.liferay.portal.SystemException {
283         getPersistence().removeTagsEntries(pk, tagsEntries);
284     }
285 
286     public static void setTagsEntries(long pk, long[] tagsEntryPKs)
287         throws com.liferay.portal.SystemException {
288         getPersistence().setTagsEntries(pk, tagsEntryPKs);
289     }
290 
291     public static void setTagsEntries(long pk,
292         java.util.List<com.liferay.portlet.tags.model.TagsEntry> tagsEntries)
293         throws com.liferay.portal.SystemException {
294         getPersistence().setTagsEntries(pk, tagsEntries);
295     }
296 
297     public static TagsAssetPersistence getPersistence() {
298         return _persistence;
299     }
300 
301     public void setPersistence(TagsAssetPersistence persistence) {
302         _persistence = persistence;
303     }
304 
305     private static TagsAssetPersistence _persistence;
306 }