1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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.ratings.service.persistence;
24  
25  import com.liferay.portal.service.persistence.BasePersistence;
26  
27  /**
28   * <a href="RatingsEntryPersistence.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       RatingsEntryPersistenceImpl
37   * @see       RatingsEntryUtil
38   * @generated
39   */
40  public interface RatingsEntryPersistence extends BasePersistence {
41      public void cacheResult(
42          com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry);
43  
44      public void cacheResult(
45          java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> ratingsEntries);
46  
47      public void clearCache();
48  
49      public com.liferay.portlet.ratings.model.RatingsEntry create(long entryId);
50  
51      public com.liferay.portlet.ratings.model.RatingsEntry remove(long entryId)
52          throws com.liferay.portal.SystemException,
53              com.liferay.portlet.ratings.NoSuchEntryException;
54  
55      public com.liferay.portlet.ratings.model.RatingsEntry remove(
56          com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry)
57          throws com.liferay.portal.SystemException;
58  
59      /**
60       * @deprecated Use {@link #update(RatingsEntry, boolean merge)}.
61       */
62      public com.liferay.portlet.ratings.model.RatingsEntry update(
63          com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry)
64          throws com.liferay.portal.SystemException;
65  
66      /**
67       * Add, update, or merge, the entity. This method also calls the model
68       * listeners to trigger the proper events associated with adding, deleting,
69       * or updating an entity.
70       *
71       * @param  ratingsEntry the entity to add, update, or merge
72       * @param  merge boolean value for whether to merge the entity. The default
73       *         value is false. Setting merge to true is more expensive and
74       *         should only be true when ratingsEntry is transient. See
75       *         LEP-5473 for a detailed discussion of this method.
76       * @return the entity that was added, updated, or merged
77       */
78      public com.liferay.portlet.ratings.model.RatingsEntry update(
79          com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry,
80          boolean merge) throws com.liferay.portal.SystemException;
81  
82      public com.liferay.portlet.ratings.model.RatingsEntry updateImpl(
83          com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry,
84          boolean merge) throws com.liferay.portal.SystemException;
85  
86      public com.liferay.portlet.ratings.model.RatingsEntry findByPrimaryKey(
87          long entryId)
88          throws com.liferay.portal.SystemException,
89              com.liferay.portlet.ratings.NoSuchEntryException;
90  
91      public com.liferay.portlet.ratings.model.RatingsEntry fetchByPrimaryKey(
92          long entryId) throws com.liferay.portal.SystemException;
93  
94      public java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
95          long classNameId, long classPK)
96          throws com.liferay.portal.SystemException;
97  
98      public java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
99          long classNameId, long classPK, int start, int end)
100         throws com.liferay.portal.SystemException;
101 
102     public java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C(
103         long classNameId, long classPK, int start, int end,
104         com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException;
106 
107     public com.liferay.portlet.ratings.model.RatingsEntry findByC_C_First(
108         long classNameId, long classPK,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException,
111             com.liferay.portlet.ratings.NoSuchEntryException;
112 
113     public com.liferay.portlet.ratings.model.RatingsEntry findByC_C_Last(
114         long classNameId, long classPK,
115         com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.SystemException,
117             com.liferay.portlet.ratings.NoSuchEntryException;
118 
119     public com.liferay.portlet.ratings.model.RatingsEntry[] findByC_C_PrevAndNext(
120         long entryId, long classNameId, long classPK,
121         com.liferay.portal.kernel.util.OrderByComparator obc)
122         throws com.liferay.portal.SystemException,
123             com.liferay.portlet.ratings.NoSuchEntryException;
124 
125     public com.liferay.portlet.ratings.model.RatingsEntry findByU_C_C(
126         long userId, long classNameId, long classPK)
127         throws com.liferay.portal.SystemException,
128             com.liferay.portlet.ratings.NoSuchEntryException;
129 
130     public com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C(
131         long userId, long classNameId, long classPK)
132         throws com.liferay.portal.SystemException;
133 
134     public com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C(
135         long userId, long classNameId, long classPK, boolean retrieveFromCache)
136         throws com.liferay.portal.SystemException;
137 
138     public java.util.List<Object> findWithDynamicQuery(
139         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
140         throws com.liferay.portal.SystemException;
141 
142     public java.util.List<Object> findWithDynamicQuery(
143         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
144         int end) throws com.liferay.portal.SystemException;
145 
146     public java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll()
147         throws com.liferay.portal.SystemException;
148 
149     public java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll(
150         int start, int end) throws com.liferay.portal.SystemException;
151 
152     public java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll(
153         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
154         throws com.liferay.portal.SystemException;
155 
156     public void removeByC_C(long classNameId, long classPK)
157         throws com.liferay.portal.SystemException;
158 
159     public void removeByU_C_C(long userId, long classNameId, long classPK)
160         throws com.liferay.portal.SystemException,
161             com.liferay.portlet.ratings.NoSuchEntryException;
162 
163     public void removeAll() throws com.liferay.portal.SystemException;
164 
165     public int countByC_C(long classNameId, long classPK)
166         throws com.liferay.portal.SystemException;
167 
168     public int countByU_C_C(long userId, long classNameId, long classPK)
169         throws com.liferay.portal.SystemException;
170 
171     public int countAll() throws com.liferay.portal.SystemException;
172 }