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 com.liferay.portlet.tags.model.TagsEntry findByC_N(
109         long companyId, java.lang.String name)
110         throws com.liferay.portal.SystemException,
111             com.liferay.portlet.tags.NoSuchEntryException {
112         return getPersistence().findByC_N(companyId, name);
113     }
114 
115     public static com.liferay.portlet.tags.model.TagsEntry fetchByC_N(
116         long companyId, java.lang.String name)
117         throws com.liferay.portal.SystemException {
118         return getPersistence().fetchByC_N(companyId, name);
119     }
120 
121     public static com.liferay.portlet.tags.model.TagsEntry fetchByC_N(
122         long companyId, java.lang.String name, boolean retrieveFromCache)
123         throws com.liferay.portal.SystemException {
124         return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
125     }
126 
127     public static java.util.List<Object> findWithDynamicQuery(
128         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
129         throws com.liferay.portal.SystemException {
130         return getPersistence().findWithDynamicQuery(dynamicQuery);
131     }
132 
133     public static java.util.List<Object> findWithDynamicQuery(
134         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
135         int end) throws com.liferay.portal.SystemException {
136         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
137     }
138 
139     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll()
140         throws com.liferay.portal.SystemException {
141         return getPersistence().findAll();
142     }
143 
144     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll(
145         int start, int end) throws com.liferay.portal.SystemException {
146         return getPersistence().findAll(start, end);
147     }
148 
149     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll(
150         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findAll(start, end, obc);
153     }
154 
155     public static void removeByC_N(long companyId, java.lang.String name)
156         throws com.liferay.portal.SystemException,
157             com.liferay.portlet.tags.NoSuchEntryException {
158         getPersistence().removeByC_N(companyId, name);
159     }
160 
161     public static void removeAll() throws com.liferay.portal.SystemException {
162         getPersistence().removeAll();
163     }
164 
165     public static int countByC_N(long companyId, java.lang.String name)
166         throws com.liferay.portal.SystemException {
167         return getPersistence().countByC_N(companyId, name);
168     }
169 
170     public static int countAll() throws com.liferay.portal.SystemException {
171         return getPersistence().countAll();
172     }
173 
174     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
175         long pk) throws com.liferay.portal.SystemException {
176         return getPersistence().getTagsAssets(pk);
177     }
178 
179     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
180         long pk, int start, int end) throws com.liferay.portal.SystemException {
181         return getPersistence().getTagsAssets(pk, start, end);
182     }
183 
184     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
185         long pk, int start, int end,
186         com.liferay.portal.kernel.util.OrderByComparator obc)
187         throws com.liferay.portal.SystemException {
188         return getPersistence().getTagsAssets(pk, start, end, obc);
189     }
190 
191     public static int getTagsAssetsSize(long pk)
192         throws com.liferay.portal.SystemException {
193         return getPersistence().getTagsAssetsSize(pk);
194     }
195 
196     public static boolean containsTagsAsset(long pk, long tagsAssetPK)
197         throws com.liferay.portal.SystemException {
198         return getPersistence().containsTagsAsset(pk, tagsAssetPK);
199     }
200 
201     public static boolean containsTagsAssets(long pk)
202         throws com.liferay.portal.SystemException {
203         return getPersistence().containsTagsAssets(pk);
204     }
205 
206     public static void addTagsAsset(long pk, long tagsAssetPK)
207         throws com.liferay.portal.SystemException {
208         getPersistence().addTagsAsset(pk, tagsAssetPK);
209     }
210 
211     public static void addTagsAsset(long pk,
212         com.liferay.portlet.tags.model.TagsAsset tagsAsset)
213         throws com.liferay.portal.SystemException {
214         getPersistence().addTagsAsset(pk, tagsAsset);
215     }
216 
217     public static void addTagsAssets(long pk, long[] tagsAssetPKs)
218         throws com.liferay.portal.SystemException {
219         getPersistence().addTagsAssets(pk, tagsAssetPKs);
220     }
221 
222     public static void addTagsAssets(long pk,
223         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
224         throws com.liferay.portal.SystemException {
225         getPersistence().addTagsAssets(pk, tagsAssets);
226     }
227 
228     public static void clearTagsAssets(long pk)
229         throws com.liferay.portal.SystemException {
230         getPersistence().clearTagsAssets(pk);
231     }
232 
233     public static void removeTagsAsset(long pk, long tagsAssetPK)
234         throws com.liferay.portal.SystemException {
235         getPersistence().removeTagsAsset(pk, tagsAssetPK);
236     }
237 
238     public static void removeTagsAsset(long pk,
239         com.liferay.portlet.tags.model.TagsAsset tagsAsset)
240         throws com.liferay.portal.SystemException {
241         getPersistence().removeTagsAsset(pk, tagsAsset);
242     }
243 
244     public static void removeTagsAssets(long pk, long[] tagsAssetPKs)
245         throws com.liferay.portal.SystemException {
246         getPersistence().removeTagsAssets(pk, tagsAssetPKs);
247     }
248 
249     public static void removeTagsAssets(long pk,
250         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
251         throws com.liferay.portal.SystemException {
252         getPersistence().removeTagsAssets(pk, tagsAssets);
253     }
254 
255     public static void setTagsAssets(long pk, long[] tagsAssetPKs)
256         throws com.liferay.portal.SystemException {
257         getPersistence().setTagsAssets(pk, tagsAssetPKs);
258     }
259 
260     public static void setTagsAssets(long pk,
261         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
262         throws com.liferay.portal.SystemException {
263         getPersistence().setTagsAssets(pk, tagsAssets);
264     }
265 
266     public static TagsEntryPersistence getPersistence() {
267         return _persistence;
268     }
269 
270     public void setPersistence(TagsEntryPersistence persistence) {
271         _persistence = persistence;
272     }
273 
274     private static TagsEntryPersistence _persistence;
275 }