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.expando.service.persistence;
24  
25  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.Propagation;
28  import com.liferay.portal.kernel.annotation.Transactional;
29  
30  /**
31   * <a href="ExpandoValuePersistence.java.html"><b><i>View Source</i></b></a>
32   *
33   * @author Brian Wing Shun Chan
34   *
35   */
36  @Transactional(rollbackFor =  {
37      PortalException.class, SystemException.class})
38  public interface ExpandoValuePersistence {
39      public com.liferay.portlet.expando.model.ExpandoValue create(long valueId);
40  
41      public com.liferay.portlet.expando.model.ExpandoValue remove(long valueId)
42          throws com.liferay.portal.SystemException,
43              com.liferay.portlet.expando.NoSuchValueException;
44  
45      public com.liferay.portlet.expando.model.ExpandoValue remove(
46          com.liferay.portlet.expando.model.ExpandoValue expandoValue)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * @deprecated Use <code>update(ExpandoValue expandoValue, boolean merge)</code>.
51       */
52      public com.liferay.portlet.expando.model.ExpandoValue update(
53          com.liferay.portlet.expando.model.ExpandoValue expandoValue)
54          throws com.liferay.portal.SystemException;
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        expandoValue 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 expandoValue 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 com.liferay.portlet.expando.model.ExpandoValue update(
70          com.liferay.portlet.expando.model.ExpandoValue expandoValue,
71          boolean merge) throws com.liferay.portal.SystemException;
72  
73      public com.liferay.portlet.expando.model.ExpandoValue updateImpl(
74          com.liferay.portlet.expando.model.ExpandoValue expandoValue,
75          boolean merge) throws com.liferay.portal.SystemException;
76  
77      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
78      public com.liferay.portlet.expando.model.ExpandoValue findByPrimaryKey(
79          long valueId)
80          throws com.liferay.portal.SystemException,
81              com.liferay.portlet.expando.NoSuchValueException;
82  
83      public com.liferay.portlet.expando.model.ExpandoValue fetchByPrimaryKey(
84          long valueId) throws com.liferay.portal.SystemException;
85  
86      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
87      public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByTableId(
88          long tableId) throws com.liferay.portal.SystemException;
89  
90      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
91      public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByTableId(
92          long tableId, int start, int end)
93          throws com.liferay.portal.SystemException;
94  
95      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
96      public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByTableId(
97          long tableId, int start, int end,
98          com.liferay.portal.kernel.util.OrderByComparator obc)
99          throws com.liferay.portal.SystemException;
100 
101     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
102     public com.liferay.portlet.expando.model.ExpandoValue findByTableId_First(
103         long tableId, com.liferay.portal.kernel.util.OrderByComparator obc)
104         throws com.liferay.portal.SystemException,
105             com.liferay.portlet.expando.NoSuchValueException;
106 
107     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
108     public com.liferay.portlet.expando.model.ExpandoValue findByTableId_Last(
109         long tableId, com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException,
111             com.liferay.portlet.expando.NoSuchValueException;
112 
113     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
114     public com.liferay.portlet.expando.model.ExpandoValue[] findByTableId_PrevAndNext(
115         long valueId, long tableId,
116         com.liferay.portal.kernel.util.OrderByComparator obc)
117         throws com.liferay.portal.SystemException,
118             com.liferay.portlet.expando.NoSuchValueException;
119 
120     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
121     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByColumnId(
122         long columnId) throws com.liferay.portal.SystemException;
123 
124     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByColumnId(
126         long columnId, int start, int end)
127         throws com.liferay.portal.SystemException;
128 
129     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
130     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByColumnId(
131         long columnId, int start, int end,
132         com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.SystemException;
134 
135     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
136     public com.liferay.portlet.expando.model.ExpandoValue findByColumnId_First(
137         long columnId, com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.SystemException,
139             com.liferay.portlet.expando.NoSuchValueException;
140 
141     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
142     public com.liferay.portlet.expando.model.ExpandoValue findByColumnId_Last(
143         long columnId, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException,
145             com.liferay.portlet.expando.NoSuchValueException;
146 
147     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
148     public com.liferay.portlet.expando.model.ExpandoValue[] findByColumnId_PrevAndNext(
149         long valueId, long columnId,
150         com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.SystemException,
152             com.liferay.portlet.expando.NoSuchValueException;
153 
154     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByRowId(
156         long rowId) throws com.liferay.portal.SystemException;
157 
158     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
159     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByRowId(
160         long rowId, int start, int end)
161         throws com.liferay.portal.SystemException;
162 
163     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByRowId(
165         long rowId, int start, int end,
166         com.liferay.portal.kernel.util.OrderByComparator obc)
167         throws com.liferay.portal.SystemException;
168 
169     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170     public com.liferay.portlet.expando.model.ExpandoValue findByRowId_First(
171         long rowId, com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.expando.NoSuchValueException;
174 
175     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176     public com.liferay.portlet.expando.model.ExpandoValue findByRowId_Last(
177         long rowId, com.liferay.portal.kernel.util.OrderByComparator obc)
178         throws com.liferay.portal.SystemException,
179             com.liferay.portlet.expando.NoSuchValueException;
180 
181     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182     public com.liferay.portlet.expando.model.ExpandoValue[] findByRowId_PrevAndNext(
183         long valueId, long rowId,
184         com.liferay.portal.kernel.util.OrderByComparator obc)
185         throws com.liferay.portal.SystemException,
186             com.liferay.portlet.expando.NoSuchValueException;
187 
188     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
189     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByT_R(
190         long tableId, long rowId) throws com.liferay.portal.SystemException;
191 
192     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByT_R(
194         long tableId, long rowId, int start, int end)
195         throws com.liferay.portal.SystemException;
196 
197     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByT_R(
199         long tableId, long rowId, int start, int end,
200         com.liferay.portal.kernel.util.OrderByComparator obc)
201         throws com.liferay.portal.SystemException;
202 
203     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204     public com.liferay.portlet.expando.model.ExpandoValue findByT_R_First(
205         long tableId, long rowId,
206         com.liferay.portal.kernel.util.OrderByComparator obc)
207         throws com.liferay.portal.SystemException,
208             com.liferay.portlet.expando.NoSuchValueException;
209 
210     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211     public com.liferay.portlet.expando.model.ExpandoValue findByT_R_Last(
212         long tableId, long rowId,
213         com.liferay.portal.kernel.util.OrderByComparator obc)
214         throws com.liferay.portal.SystemException,
215             com.liferay.portlet.expando.NoSuchValueException;
216 
217     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218     public com.liferay.portlet.expando.model.ExpandoValue[] findByT_R_PrevAndNext(
219         long valueId, long tableId, long rowId,
220         com.liferay.portal.kernel.util.OrderByComparator obc)
221         throws com.liferay.portal.SystemException,
222             com.liferay.portlet.expando.NoSuchValueException;
223 
224     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225     public com.liferay.portlet.expando.model.ExpandoValue findByC_R(
226         long columnId, long rowId)
227         throws com.liferay.portal.SystemException,
228             com.liferay.portlet.expando.NoSuchValueException;
229 
230     public com.liferay.portlet.expando.model.ExpandoValue fetchByC_R(
231         long columnId, long rowId) throws com.liferay.portal.SystemException;
232 
233     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByC_C(
235         long classNameId, long classPK)
236         throws com.liferay.portal.SystemException;
237 
238     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByC_C(
240         long classNameId, long classPK, int start, int end)
241         throws com.liferay.portal.SystemException;
242 
243     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
244     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByC_C(
245         long classNameId, long classPK, int start, int end,
246         com.liferay.portal.kernel.util.OrderByComparator obc)
247         throws com.liferay.portal.SystemException;
248 
249     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250     public com.liferay.portlet.expando.model.ExpandoValue findByC_C_First(
251         long classNameId, long classPK,
252         com.liferay.portal.kernel.util.OrderByComparator obc)
253         throws com.liferay.portal.SystemException,
254             com.liferay.portlet.expando.NoSuchValueException;
255 
256     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
257     public com.liferay.portlet.expando.model.ExpandoValue findByC_C_Last(
258         long classNameId, long classPK,
259         com.liferay.portal.kernel.util.OrderByComparator obc)
260         throws com.liferay.portal.SystemException,
261             com.liferay.portlet.expando.NoSuchValueException;
262 
263     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
264     public com.liferay.portlet.expando.model.ExpandoValue[] findByC_C_PrevAndNext(
265         long valueId, long classNameId, long classPK,
266         com.liferay.portal.kernel.util.OrderByComparator obc)
267         throws com.liferay.portal.SystemException,
268             com.liferay.portlet.expando.NoSuchValueException;
269 
270     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
271     public com.liferay.portlet.expando.model.ExpandoValue findByT_C_R(
272         long tableId, long columnId, long rowId)
273         throws com.liferay.portal.SystemException,
274             com.liferay.portlet.expando.NoSuchValueException;
275 
276     public com.liferay.portlet.expando.model.ExpandoValue fetchByT_C_R(
277         long tableId, long columnId, long rowId)
278         throws com.liferay.portal.SystemException;
279 
280     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
281     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByT_C_C_C(
282         long tableId, long columnId, long classNameId, long classPK)
283         throws com.liferay.portal.SystemException;
284 
285     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByT_C_C_C(
287         long tableId, long columnId, long classNameId, long classPK, int start,
288         int end) throws com.liferay.portal.SystemException;
289 
290     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
291     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByT_C_C_C(
292         long tableId, long columnId, long classNameId, long classPK, int start,
293         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
294         throws com.liferay.portal.SystemException;
295 
296     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297     public com.liferay.portlet.expando.model.ExpandoValue findByT_C_C_C_First(
298         long tableId, long columnId, long classNameId, long classPK,
299         com.liferay.portal.kernel.util.OrderByComparator obc)
300         throws com.liferay.portal.SystemException,
301             com.liferay.portlet.expando.NoSuchValueException;
302 
303     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
304     public com.liferay.portlet.expando.model.ExpandoValue findByT_C_C_C_Last(
305         long tableId, long columnId, long classNameId, long classPK,
306         com.liferay.portal.kernel.util.OrderByComparator obc)
307         throws com.liferay.portal.SystemException,
308             com.liferay.portlet.expando.NoSuchValueException;
309 
310     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
311     public com.liferay.portlet.expando.model.ExpandoValue[] findByT_C_C_C_PrevAndNext(
312         long valueId, long tableId, long columnId, long classNameId,
313         long classPK, com.liferay.portal.kernel.util.OrderByComparator obc)
314         throws com.liferay.portal.SystemException,
315             com.liferay.portlet.expando.NoSuchValueException;
316 
317     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
318     public java.util.List<Object> findWithDynamicQuery(
319         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
320         throws com.liferay.portal.SystemException;
321 
322     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323     public java.util.List<Object> findWithDynamicQuery(
324         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
325         int end) throws com.liferay.portal.SystemException;
326 
327     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findAll()
329         throws com.liferay.portal.SystemException;
330 
331     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
332     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findAll(
333         int start, int end) throws com.liferay.portal.SystemException;
334 
335     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
336     public java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findAll(
337         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
338         throws com.liferay.portal.SystemException;
339 
340     public void removeByTableId(long tableId)
341         throws com.liferay.portal.SystemException;
342 
343     public void removeByColumnId(long columnId)
344         throws com.liferay.portal.SystemException;
345 
346     public void removeByRowId(long rowId)
347         throws com.liferay.portal.SystemException;
348 
349     public void removeByT_R(long tableId, long rowId)
350         throws com.liferay.portal.SystemException;
351 
352     public void removeByC_R(long columnId, long rowId)
353         throws com.liferay.portal.SystemException,
354             com.liferay.portlet.expando.NoSuchValueException;
355 
356     public void removeByC_C(long classNameId, long classPK)
357         throws com.liferay.portal.SystemException;
358 
359     public void removeByT_C_R(long tableId, long columnId, long rowId)
360         throws com.liferay.portal.SystemException,
361             com.liferay.portlet.expando.NoSuchValueException;
362 
363     public void removeByT_C_C_C(long tableId, long columnId, long classNameId,
364         long classPK) throws com.liferay.portal.SystemException;
365 
366     public void removeAll() throws com.liferay.portal.SystemException;
367 
368     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
369     public int countByTableId(long tableId)
370         throws com.liferay.portal.SystemException;
371 
372     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
373     public int countByColumnId(long columnId)
374         throws com.liferay.portal.SystemException;
375 
376     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
377     public int countByRowId(long rowId)
378         throws com.liferay.portal.SystemException;
379 
380     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
381     public int countByT_R(long tableId, long rowId)
382         throws com.liferay.portal.SystemException;
383 
384     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
385     public int countByC_R(long columnId, long rowId)
386         throws com.liferay.portal.SystemException;
387 
388     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
389     public int countByC_C(long classNameId, long classPK)
390         throws com.liferay.portal.SystemException;
391 
392     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
393     public int countByT_C_R(long tableId, long columnId, long rowId)
394         throws com.liferay.portal.SystemException;
395 
396     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
397     public int countByT_C_C_C(long tableId, long columnId, long classNameId,
398         long classPK) throws com.liferay.portal.SystemException;
399 
400     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
401     public int countAll() throws com.liferay.portal.SystemException;
402 
403     public void registerListener(
404         com.liferay.portal.model.ModelListener listener);
405 
406     public void unregisterListener(
407         com.liferay.portal.model.ModelListener listener);
408 }