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="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 begin, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByCompanyId(companyId, begin, end);
105     }
106 
107     public static java.util.List<com.liferay.portlet.tags.model.TagsProperty> findByCompanyId(
108         long companyId, int begin, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().findByCompanyId(companyId, begin, 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 begin, int end)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findByEntryId(entryId, begin, end);
146     }
147 
148     public static java.util.List<com.liferay.portlet.tags.model.TagsProperty> findByEntryId(
149         long entryId, int begin, int end,
150         com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findByEntryId(entryId, begin, 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 begin, int end)
186         throws com.liferay.portal.SystemException {
187         return getPersistence().findByC_K(companyId, key, begin, 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 begin, int end,
192         com.liferay.portal.kernel.util.OrderByComparator obc)
193         throws com.liferay.portal.SystemException {
194         return getPersistence().findByC_K(companyId, key, begin, 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<com.liferay.portlet.tags.model.TagsProperty> findWithDynamicQuery(
236         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
237         throws com.liferay.portal.SystemException {
238         return getPersistence().findWithDynamicQuery(queryInitializer);
239     }
240 
241     public static java.util.List<com.liferay.portlet.tags.model.TagsProperty> findWithDynamicQuery(
242         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
243         int begin, int end) throws com.liferay.portal.SystemException {
244         return getPersistence()
245                    .findWithDynamicQuery(queryInitializer, begin, end);
246     }
247 
248     public static java.util.List<com.liferay.portlet.tags.model.TagsProperty> findAll()
249         throws com.liferay.portal.SystemException {
250         return getPersistence().findAll();
251     }
252 
253     public static java.util.List<com.liferay.portlet.tags.model.TagsProperty> findAll(
254         int begin, int end) throws com.liferay.portal.SystemException {
255         return getPersistence().findAll(begin, end);
256     }
257 
258     public static java.util.List<com.liferay.portlet.tags.model.TagsProperty> findAll(
259         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
260         throws com.liferay.portal.SystemException {
261         return getPersistence().findAll(begin, end, obc);
262     }
263 
264     public static void removeByCompanyId(long companyId)
265         throws com.liferay.portal.SystemException {
266         getPersistence().removeByCompanyId(companyId);
267     }
268 
269     public static void removeByEntryId(long entryId)
270         throws com.liferay.portal.SystemException {
271         getPersistence().removeByEntryId(entryId);
272     }
273 
274     public static void removeByC_K(long companyId, java.lang.String key)
275         throws com.liferay.portal.SystemException {
276         getPersistence().removeByC_K(companyId, key);
277     }
278 
279     public static void removeByE_K(long entryId, java.lang.String key)
280         throws com.liferay.portal.SystemException,
281             com.liferay.portlet.tags.NoSuchPropertyException {
282         getPersistence().removeByE_K(entryId, key);
283     }
284 
285     public static void removeAll() throws com.liferay.portal.SystemException {
286         getPersistence().removeAll();
287     }
288 
289     public static int countByCompanyId(long companyId)
290         throws com.liferay.portal.SystemException {
291         return getPersistence().countByCompanyId(companyId);
292     }
293 
294     public static int countByEntryId(long entryId)
295         throws com.liferay.portal.SystemException {
296         return getPersistence().countByEntryId(entryId);
297     }
298 
299     public static int countByC_K(long companyId, java.lang.String key)
300         throws com.liferay.portal.SystemException {
301         return getPersistence().countByC_K(companyId, key);
302     }
303 
304     public static int countByE_K(long entryId, java.lang.String key)
305         throws com.liferay.portal.SystemException {
306         return getPersistence().countByE_K(entryId, key);
307     }
308 
309     public static int countAll() throws com.liferay.portal.SystemException {
310         return getPersistence().countAll();
311     }
312 
313     public static TagsPropertyPersistence getPersistence() {
314         return _getUtil()._persistence;
315     }
316 
317     public void setPersistence(TagsPropertyPersistence persistence) {
318         _persistence = persistence;
319     }
320 
321     private static TagsPropertyUtil _getUtil() {
322         if (_util == null) {
323             _util = (TagsPropertyUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
324         }
325 
326         return _util;
327     }
328 
329     private static final String _UTIL = TagsPropertyUtil.class.getName();
330     private static TagsPropertyUtil _util;
331     private TagsPropertyPersistence _persistence;
332 }