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