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.softwarecatalog.service.persistence;
21  
22  import com.liferay.portal.service.persistence.BasePersistence;
23  
24  /**
25   * <a href="SCProductScreenshotPersistence.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   *
29   */
30  public interface SCProductScreenshotPersistence extends BasePersistence {
31      public void cacheResult(
32          com.liferay.portlet.softwarecatalog.model.SCProductScreenshot scProductScreenshot);
33  
34      public void cacheResult(
35          java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> scProductScreenshots);
36  
37      public void clearCache();
38  
39      public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot create(
40          long productScreenshotId);
41  
42      public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot remove(
43          long productScreenshotId)
44          throws com.liferay.portal.SystemException,
45              com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
46  
47      public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot remove(
48          com.liferay.portlet.softwarecatalog.model.SCProductScreenshot scProductScreenshot)
49          throws com.liferay.portal.SystemException;
50  
51      /**
52       * @deprecated Use <code>update(SCProductScreenshot scProductScreenshot, boolean merge)</code>.
53       */
54      public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot update(
55          com.liferay.portlet.softwarecatalog.model.SCProductScreenshot scProductScreenshot)
56          throws com.liferay.portal.SystemException;
57  
58      /**
59       * Add, update, or merge, the entity. This method also calls the model
60       * listeners to trigger the proper events associated with adding, deleting,
61       * or updating an entity.
62       *
63       * @param        scProductScreenshot the entity to add, update, or merge
64       * @param        merge boolean value for whether to merge the entity. The
65       *                default value is false. Setting merge to true is more
66       *                expensive and should only be true when scProductScreenshot is
67       *                transient. See LEP-5473 for a detailed discussion of this
68       *                method.
69       * @return        true if the portlet can be displayed via Ajax
70       */
71      public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot update(
72          com.liferay.portlet.softwarecatalog.model.SCProductScreenshot scProductScreenshot,
73          boolean merge) throws com.liferay.portal.SystemException;
74  
75      public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot updateImpl(
76          com.liferay.portlet.softwarecatalog.model.SCProductScreenshot scProductScreenshot,
77          boolean merge) throws com.liferay.portal.SystemException;
78  
79      public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot findByPrimaryKey(
80          long productScreenshotId)
81          throws com.liferay.portal.SystemException,
82              com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
83  
84      public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot fetchByPrimaryKey(
85          long productScreenshotId) throws com.liferay.portal.SystemException;
86  
87      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findByProductEntryId(
88          long productEntryId) throws com.liferay.portal.SystemException;
89  
90      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findByProductEntryId(
91          long productEntryId, int start, int end)
92          throws com.liferay.portal.SystemException;
93  
94      public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findByProductEntryId(
95          long productEntryId, int start, int end,
96          com.liferay.portal.kernel.util.OrderByComparator obc)
97          throws com.liferay.portal.SystemException;
98  
99      public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot findByProductEntryId_First(
100         long productEntryId,
101         com.liferay.portal.kernel.util.OrderByComparator obc)
102         throws com.liferay.portal.SystemException,
103             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
104 
105     public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot findByProductEntryId_Last(
106         long productEntryId,
107         com.liferay.portal.kernel.util.OrderByComparator obc)
108         throws com.liferay.portal.SystemException,
109             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
110 
111     public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot[] findByProductEntryId_PrevAndNext(
112         long productScreenshotId, long productEntryId,
113         com.liferay.portal.kernel.util.OrderByComparator obc)
114         throws com.liferay.portal.SystemException,
115             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
116 
117     public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot findByThumbnailId(
118         long thumbnailId)
119         throws com.liferay.portal.SystemException,
120             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
121 
122     public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot fetchByThumbnailId(
123         long thumbnailId) throws com.liferay.portal.SystemException;
124 
125     public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot fetchByThumbnailId(
126         long thumbnailId, boolean retrieveFromCache)
127         throws com.liferay.portal.SystemException;
128 
129     public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot findByFullImageId(
130         long fullImageId)
131         throws com.liferay.portal.SystemException,
132             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
133 
134     public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot fetchByFullImageId(
135         long fullImageId) throws com.liferay.portal.SystemException;
136 
137     public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot fetchByFullImageId(
138         long fullImageId, boolean retrieveFromCache)
139         throws com.liferay.portal.SystemException;
140 
141     public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot findByP_P(
142         long productEntryId, int priority)
143         throws com.liferay.portal.SystemException,
144             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
145 
146     public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot fetchByP_P(
147         long productEntryId, int priority)
148         throws com.liferay.portal.SystemException;
149 
150     public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot fetchByP_P(
151         long productEntryId, int priority, boolean retrieveFromCache)
152         throws com.liferay.portal.SystemException;
153 
154     public java.util.List<Object> findWithDynamicQuery(
155         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
156         throws com.liferay.portal.SystemException;
157 
158     public java.util.List<Object> findWithDynamicQuery(
159         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
160         int end) throws com.liferay.portal.SystemException;
161 
162     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findAll()
163         throws com.liferay.portal.SystemException;
164 
165     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findAll(
166         int start, int end) throws com.liferay.portal.SystemException;
167 
168     public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findAll(
169         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException;
171 
172     public void removeByProductEntryId(long productEntryId)
173         throws com.liferay.portal.SystemException;
174 
175     public void removeByThumbnailId(long thumbnailId)
176         throws com.liferay.portal.SystemException,
177             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
178 
179     public void removeByFullImageId(long fullImageId)
180         throws com.liferay.portal.SystemException,
181             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
182 
183     public void removeByP_P(long productEntryId, int priority)
184         throws com.liferay.portal.SystemException,
185             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException;
186 
187     public void removeAll() throws com.liferay.portal.SystemException;
188 
189     public int countByProductEntryId(long productEntryId)
190         throws com.liferay.portal.SystemException;
191 
192     public int countByThumbnailId(long thumbnailId)
193         throws com.liferay.portal.SystemException;
194 
195     public int countByFullImageId(long fullImageId)
196         throws com.liferay.portal.SystemException;
197 
198     public int countByP_P(long productEntryId, int priority)
199         throws com.liferay.portal.SystemException;
200 
201     public int countAll() throws com.liferay.portal.SystemException;
202 }