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