1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.tags.service.persistence;
21  
22  /**
23   * <a href="TagsEntryUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class TagsEntryUtil {
29      public static void cacheResult(
30          com.liferay.portlet.tags.model.TagsEntry tagsEntry) {
31          getPersistence().cacheResult(tagsEntry);
32      }
33  
34      public static void cacheResult(
35          java.util.List<com.liferay.portlet.tags.model.TagsEntry> tagsEntries) {
36          getPersistence().cacheResult(tagsEntries);
37      }
38  
39      public static void clearCache() {
40          getPersistence().clearCache();
41      }
42  
43      public static com.liferay.portlet.tags.model.TagsEntry create(long entryId) {
44          return getPersistence().create(entryId);
45      }
46  
47      public static com.liferay.portlet.tags.model.TagsEntry remove(long entryId)
48          throws com.liferay.portal.SystemException,
49              com.liferay.portlet.tags.NoSuchEntryException {
50          return getPersistence().remove(entryId);
51      }
52  
53      public static com.liferay.portlet.tags.model.TagsEntry remove(
54          com.liferay.portlet.tags.model.TagsEntry tagsEntry)
55          throws com.liferay.portal.SystemException {
56          return getPersistence().remove(tagsEntry);
57      }
58  
59      /**
60       * @deprecated Use <code>update(TagsEntry tagsEntry, boolean merge)</code>.
61       */
62      public static com.liferay.portlet.tags.model.TagsEntry update(
63          com.liferay.portlet.tags.model.TagsEntry tagsEntry)
64          throws com.liferay.portal.SystemException {
65          return getPersistence().update(tagsEntry);
66      }
67  
68      /**
69       * Add, update, or merge, the entity. This method also calls the model
70       * listeners to trigger the proper events associated with adding, deleting,
71       * or updating an entity.
72       *
73       * @param        tagsEntry the entity to add, update, or merge
74       * @param        merge boolean value for whether to merge the entity. The
75       *                default value is false. Setting merge to true is more
76       *                expensive and should only be true when tagsEntry is
77       *                transient. See LEP-5473 for a detailed discussion of this
78       *                method.
79       * @return        true if the portlet can be displayed via Ajax
80       */
81      public static com.liferay.portlet.tags.model.TagsEntry update(
82          com.liferay.portlet.tags.model.TagsEntry tagsEntry, boolean merge)
83          throws com.liferay.portal.SystemException {
84          return getPersistence().update(tagsEntry, merge);
85      }
86  
87      public static com.liferay.portlet.tags.model.TagsEntry updateImpl(
88          com.liferay.portlet.tags.model.TagsEntry tagsEntry, boolean merge)
89          throws com.liferay.portal.SystemException {
90          return getPersistence().updateImpl(tagsEntry, merge);
91      }
92  
93      public static com.liferay.portlet.tags.model.TagsEntry findByPrimaryKey(
94          long entryId)
95          throws com.liferay.portal.SystemException,
96              com.liferay.portlet.tags.NoSuchEntryException {
97          return getPersistence().findByPrimaryKey(entryId);
98      }
99  
100     public static com.liferay.portlet.tags.model.TagsEntry fetchByPrimaryKey(
101         long entryId) throws com.liferay.portal.SystemException {
102         return getPersistence().fetchByPrimaryKey(entryId);
103     }
104 
105     public static com.liferay.portlet.tags.model.TagsEntry findByC_N(
106         long companyId, java.lang.String name)
107         throws com.liferay.portal.SystemException,
108             com.liferay.portlet.tags.NoSuchEntryException {
109         return getPersistence().findByC_N(companyId, name);
110     }
111 
112     public static com.liferay.portlet.tags.model.TagsEntry fetchByC_N(
113         long companyId, java.lang.String name)
114         throws com.liferay.portal.SystemException {
115         return getPersistence().fetchByC_N(companyId, name);
116     }
117 
118     public static com.liferay.portlet.tags.model.TagsEntry fetchByC_N(
119         long companyId, java.lang.String name, boolean retrieveFromCache)
120         throws com.liferay.portal.SystemException {
121         return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
122     }
123 
124     public static java.util.List<Object> findWithDynamicQuery(
125         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
126         throws com.liferay.portal.SystemException {
127         return getPersistence().findWithDynamicQuery(dynamicQuery);
128     }
129 
130     public static java.util.List<Object> findWithDynamicQuery(
131         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
132         int end) throws com.liferay.portal.SystemException {
133         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
134     }
135 
136     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll()
137         throws com.liferay.portal.SystemException {
138         return getPersistence().findAll();
139     }
140 
141     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll(
142         int start, int end) throws com.liferay.portal.SystemException {
143         return getPersistence().findAll(start, end);
144     }
145 
146     public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll(
147         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException {
149         return getPersistence().findAll(start, end, obc);
150     }
151 
152     public static void removeByC_N(long companyId, java.lang.String name)
153         throws com.liferay.portal.SystemException,
154             com.liferay.portlet.tags.NoSuchEntryException {
155         getPersistence().removeByC_N(companyId, name);
156     }
157 
158     public static void removeAll() throws com.liferay.portal.SystemException {
159         getPersistence().removeAll();
160     }
161 
162     public static int countByC_N(long companyId, java.lang.String name)
163         throws com.liferay.portal.SystemException {
164         return getPersistence().countByC_N(companyId, name);
165     }
166 
167     public static int countAll() throws com.liferay.portal.SystemException {
168         return getPersistence().countAll();
169     }
170 
171     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
172         long pk) throws com.liferay.portal.SystemException {
173         return getPersistence().getTagsAssets(pk);
174     }
175 
176     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
177         long pk, int start, int end) throws com.liferay.portal.SystemException {
178         return getPersistence().getTagsAssets(pk, start, end);
179     }
180 
181     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
182         long pk, int start, int end,
183         com.liferay.portal.kernel.util.OrderByComparator obc)
184         throws com.liferay.portal.SystemException {
185         return getPersistence().getTagsAssets(pk, start, end, obc);
186     }
187 
188     public static int getTagsAssetsSize(long pk)
189         throws com.liferay.portal.SystemException {
190         return getPersistence().getTagsAssetsSize(pk);
191     }
192 
193     public static boolean containsTagsAsset(long pk, long tagsAssetPK)
194         throws com.liferay.portal.SystemException {
195         return getPersistence().containsTagsAsset(pk, tagsAssetPK);
196     }
197 
198     public static boolean containsTagsAssets(long pk)
199         throws com.liferay.portal.SystemException {
200         return getPersistence().containsTagsAssets(pk);
201     }
202 
203     public static void addTagsAsset(long pk, long tagsAssetPK)
204         throws com.liferay.portal.SystemException {
205         getPersistence().addTagsAsset(pk, tagsAssetPK);
206     }
207 
208     public static void addTagsAsset(long pk,
209         com.liferay.portlet.tags.model.TagsAsset tagsAsset)
210         throws com.liferay.portal.SystemException {
211         getPersistence().addTagsAsset(pk, tagsAsset);
212     }
213 
214     public static void addTagsAssets(long pk, long[] tagsAssetPKs)
215         throws com.liferay.portal.SystemException {
216         getPersistence().addTagsAssets(pk, tagsAssetPKs);
217     }
218 
219     public static void addTagsAssets(long pk,
220         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
221         throws com.liferay.portal.SystemException {
222         getPersistence().addTagsAssets(pk, tagsAssets);
223     }
224 
225     public static void clearTagsAssets(long pk)
226         throws com.liferay.portal.SystemException {
227         getPersistence().clearTagsAssets(pk);
228     }
229 
230     public static void removeTagsAsset(long pk, long tagsAssetPK)
231         throws com.liferay.portal.SystemException {
232         getPersistence().removeTagsAsset(pk, tagsAssetPK);
233     }
234 
235     public static void removeTagsAsset(long pk,
236         com.liferay.portlet.tags.model.TagsAsset tagsAsset)
237         throws com.liferay.portal.SystemException {
238         getPersistence().removeTagsAsset(pk, tagsAsset);
239     }
240 
241     public static void removeTagsAssets(long pk, long[] tagsAssetPKs)
242         throws com.liferay.portal.SystemException {
243         getPersistence().removeTagsAssets(pk, tagsAssetPKs);
244     }
245 
246     public static void removeTagsAssets(long pk,
247         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
248         throws com.liferay.portal.SystemException {
249         getPersistence().removeTagsAssets(pk, tagsAssets);
250     }
251 
252     public static void setTagsAssets(long pk, long[] tagsAssetPKs)
253         throws com.liferay.portal.SystemException {
254         getPersistence().setTagsAssets(pk, tagsAssetPKs);
255     }
256 
257     public static void setTagsAssets(long pk,
258         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
259         throws com.liferay.portal.SystemException {
260         getPersistence().setTagsAssets(pk, tagsAssets);
261     }
262 
263     public static TagsEntryPersistence getPersistence() {
264         return _persistence;
265     }
266 
267     public void setPersistence(TagsEntryPersistence persistence) {
268         _persistence = persistence;
269     }
270 
271     private static TagsEntryPersistence _persistence;
272 }