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