1   /**
2    * Copyright (c) 2000-2008 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      public static com.liferay.portlet.tags.model.TagsAsset update(
49          com.liferay.portlet.tags.model.TagsAsset tagsAsset)
50          throws com.liferay.portal.SystemException {
51          return getPersistence().update(tagsAsset);
52      }
53  
54      public static com.liferay.portlet.tags.model.TagsAsset update(
55          com.liferay.portlet.tags.model.TagsAsset tagsAsset, boolean merge)
56          throws com.liferay.portal.SystemException {
57          return getPersistence().update(tagsAsset, merge);
58      }
59  
60      public static com.liferay.portlet.tags.model.TagsAsset updateImpl(
61          com.liferay.portlet.tags.model.TagsAsset tagsAsset, boolean merge)
62          throws com.liferay.portal.SystemException {
63          return getPersistence().updateImpl(tagsAsset, merge);
64      }
65  
66      public static com.liferay.portlet.tags.model.TagsAsset findByPrimaryKey(
67          long assetId)
68          throws com.liferay.portal.SystemException, 
69              com.liferay.portlet.tags.NoSuchAssetException {
70          return getPersistence().findByPrimaryKey(assetId);
71      }
72  
73      public static com.liferay.portlet.tags.model.TagsAsset fetchByPrimaryKey(
74          long assetId) throws com.liferay.portal.SystemException {
75          return getPersistence().fetchByPrimaryKey(assetId);
76      }
77  
78      public static java.util.List findByCompanyId(long companyId)
79          throws com.liferay.portal.SystemException {
80          return getPersistence().findByCompanyId(companyId);
81      }
82  
83      public static java.util.List findByCompanyId(long companyId, int begin,
84          int end) throws com.liferay.portal.SystemException {
85          return getPersistence().findByCompanyId(companyId, begin, end);
86      }
87  
88      public static java.util.List findByCompanyId(long companyId, int begin,
89          int end, com.liferay.portal.kernel.util.OrderByComparator obc)
90          throws com.liferay.portal.SystemException {
91          return getPersistence().findByCompanyId(companyId, begin, end, obc);
92      }
93  
94      public static com.liferay.portlet.tags.model.TagsAsset findByCompanyId_First(
95          long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
96          throws com.liferay.portal.SystemException, 
97              com.liferay.portlet.tags.NoSuchAssetException {
98          return getPersistence().findByCompanyId_First(companyId, obc);
99      }
100 
101     public static com.liferay.portlet.tags.model.TagsAsset findByCompanyId_Last(
102         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.SystemException, 
104             com.liferay.portlet.tags.NoSuchAssetException {
105         return getPersistence().findByCompanyId_Last(companyId, obc);
106     }
107 
108     public static com.liferay.portlet.tags.model.TagsAsset[] findByCompanyId_PrevAndNext(
109         long assetId, long companyId,
110         com.liferay.portal.kernel.util.OrderByComparator obc)
111         throws com.liferay.portal.SystemException, 
112             com.liferay.portlet.tags.NoSuchAssetException {
113         return getPersistence().findByCompanyId_PrevAndNext(assetId, companyId,
114             obc);
115     }
116 
117     public static com.liferay.portlet.tags.model.TagsAsset findByC_C(
118         long classNameId, long classPK)
119         throws com.liferay.portal.SystemException, 
120             com.liferay.portlet.tags.NoSuchAssetException {
121         return getPersistence().findByC_C(classNameId, classPK);
122     }
123 
124     public static com.liferay.portlet.tags.model.TagsAsset fetchByC_C(
125         long classNameId, long classPK)
126         throws com.liferay.portal.SystemException {
127         return getPersistence().fetchByC_C(classNameId, classPK);
128     }
129 
130     public static java.util.List findWithDynamicQuery(
131         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
132         throws com.liferay.portal.SystemException {
133         return getPersistence().findWithDynamicQuery(queryInitializer);
134     }
135 
136     public static java.util.List findWithDynamicQuery(
137         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
138         int begin, int end) throws com.liferay.portal.SystemException {
139         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
140             end);
141     }
142 
143     public static java.util.List findAll()
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findAll();
146     }
147 
148     public static java.util.List findAll(int begin, int end)
149         throws com.liferay.portal.SystemException {
150         return getPersistence().findAll(begin, end);
151     }
152 
153     public static java.util.List findAll(int begin, int end,
154         com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException {
156         return getPersistence().findAll(begin, end, obc);
157     }
158 
159     public static void removeByCompanyId(long companyId)
160         throws com.liferay.portal.SystemException {
161         getPersistence().removeByCompanyId(companyId);
162     }
163 
164     public static void removeByC_C(long classNameId, long classPK)
165         throws com.liferay.portal.SystemException, 
166             com.liferay.portlet.tags.NoSuchAssetException {
167         getPersistence().removeByC_C(classNameId, classPK);
168     }
169 
170     public static void removeAll() throws com.liferay.portal.SystemException {
171         getPersistence().removeAll();
172     }
173 
174     public static int countByCompanyId(long companyId)
175         throws com.liferay.portal.SystemException {
176         return getPersistence().countByCompanyId(companyId);
177     }
178 
179     public static int countByC_C(long classNameId, long classPK)
180         throws com.liferay.portal.SystemException {
181         return getPersistence().countByC_C(classNameId, classPK);
182     }
183 
184     public static int countAll() throws com.liferay.portal.SystemException {
185         return getPersistence().countAll();
186     }
187 
188     public static java.util.List getTagsEntries(long pk)
189         throws com.liferay.portal.SystemException, 
190             com.liferay.portlet.tags.NoSuchAssetException {
191         return getPersistence().getTagsEntries(pk);
192     }
193 
194     public static java.util.List getTagsEntries(long pk, int begin, int end)
195         throws com.liferay.portal.SystemException, 
196             com.liferay.portlet.tags.NoSuchAssetException {
197         return getPersistence().getTagsEntries(pk, begin, end);
198     }
199 
200     public static java.util.List getTagsEntries(long pk, int begin, int end,
201         com.liferay.portal.kernel.util.OrderByComparator obc)
202         throws com.liferay.portal.SystemException, 
203             com.liferay.portlet.tags.NoSuchAssetException {
204         return getPersistence().getTagsEntries(pk, begin, end, obc);
205     }
206 
207     public static int getTagsEntriesSize(long pk)
208         throws com.liferay.portal.SystemException {
209         return getPersistence().getTagsEntriesSize(pk);
210     }
211 
212     public static boolean containsTagsEntry(long pk, long tagsEntryPK)
213         throws com.liferay.portal.SystemException {
214         return getPersistence().containsTagsEntry(pk, tagsEntryPK);
215     }
216 
217     public static boolean containsTagsEntries(long pk)
218         throws com.liferay.portal.SystemException {
219         return getPersistence().containsTagsEntries(pk);
220     }
221 
222     public static void addTagsEntry(long pk, long tagsEntryPK)
223         throws com.liferay.portal.SystemException, 
224             com.liferay.portlet.tags.NoSuchAssetException, 
225             com.liferay.portlet.tags.NoSuchEntryException {
226         getPersistence().addTagsEntry(pk, tagsEntryPK);
227     }
228 
229     public static void addTagsEntry(long pk,
230         com.liferay.portlet.tags.model.TagsEntry tagsEntry)
231         throws com.liferay.portal.SystemException, 
232             com.liferay.portlet.tags.NoSuchAssetException, 
233             com.liferay.portlet.tags.NoSuchEntryException {
234         getPersistence().addTagsEntry(pk, tagsEntry);
235     }
236 
237     public static void addTagsEntries(long pk, long[] tagsEntryPKs)
238         throws com.liferay.portal.SystemException, 
239             com.liferay.portlet.tags.NoSuchAssetException, 
240             com.liferay.portlet.tags.NoSuchEntryException {
241         getPersistence().addTagsEntries(pk, tagsEntryPKs);
242     }
243 
244     public static void addTagsEntries(long pk, java.util.List tagsEntries)
245         throws com.liferay.portal.SystemException, 
246             com.liferay.portlet.tags.NoSuchAssetException, 
247             com.liferay.portlet.tags.NoSuchEntryException {
248         getPersistence().addTagsEntries(pk, tagsEntries);
249     }
250 
251     public static void clearTagsEntries(long pk)
252         throws com.liferay.portal.SystemException, 
253             com.liferay.portlet.tags.NoSuchAssetException {
254         getPersistence().clearTagsEntries(pk);
255     }
256 
257     public static void removeTagsEntry(long pk, long tagsEntryPK)
258         throws com.liferay.portal.SystemException, 
259             com.liferay.portlet.tags.NoSuchAssetException, 
260             com.liferay.portlet.tags.NoSuchEntryException {
261         getPersistence().removeTagsEntry(pk, tagsEntryPK);
262     }
263 
264     public static void removeTagsEntry(long pk,
265         com.liferay.portlet.tags.model.TagsEntry tagsEntry)
266         throws com.liferay.portal.SystemException, 
267             com.liferay.portlet.tags.NoSuchAssetException, 
268             com.liferay.portlet.tags.NoSuchEntryException {
269         getPersistence().removeTagsEntry(pk, tagsEntry);
270     }
271 
272     public static void removeTagsEntries(long pk, long[] tagsEntryPKs)
273         throws com.liferay.portal.SystemException, 
274             com.liferay.portlet.tags.NoSuchAssetException, 
275             com.liferay.portlet.tags.NoSuchEntryException {
276         getPersistence().removeTagsEntries(pk, tagsEntryPKs);
277     }
278 
279     public static void removeTagsEntries(long pk, java.util.List tagsEntries)
280         throws com.liferay.portal.SystemException, 
281             com.liferay.portlet.tags.NoSuchAssetException, 
282             com.liferay.portlet.tags.NoSuchEntryException {
283         getPersistence().removeTagsEntries(pk, tagsEntries);
284     }
285 
286     public static void setTagsEntries(long pk, long[] tagsEntryPKs)
287         throws com.liferay.portal.SystemException, 
288             com.liferay.portlet.tags.NoSuchAssetException, 
289             com.liferay.portlet.tags.NoSuchEntryException {
290         getPersistence().setTagsEntries(pk, tagsEntryPKs);
291     }
292 
293     public static void setTagsEntries(long pk, java.util.List tagsEntries)
294         throws com.liferay.portal.SystemException, 
295             com.liferay.portlet.tags.NoSuchAssetException, 
296             com.liferay.portlet.tags.NoSuchEntryException {
297         getPersistence().setTagsEntries(pk, tagsEntries);
298     }
299 
300     public static TagsAssetPersistence getPersistence() {
301         return _getUtil()._persistence;
302     }
303 
304     public void setPersistence(TagsAssetPersistence persistence) {
305         _persistence = persistence;
306     }
307 
308     private static TagsAssetUtil _getUtil() {
309         if (_util == null) {
310             _util = (TagsAssetUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
311         }
312 
313         return _util;
314     }
315 
316     private static final String _UTIL = TagsAssetUtil.class.getName();
317     private static TagsAssetUtil _util;
318     private TagsAssetPersistence _persistence;
319 }