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