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.portal.service.persistence;
24  
25  
26  /**
27   * <a href="ImagePersistence.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       ImagePersistenceImpl
36   * @see       ImageUtil
37   * @generated
38   */
39  public interface ImagePersistence extends BasePersistence {
40      public void cacheResult(com.liferay.portal.model.Image image);
41  
42      public void cacheResult(
43          java.util.List<com.liferay.portal.model.Image> images);
44  
45      public void clearCache();
46  
47      public com.liferay.portal.model.Image create(long imageId);
48  
49      public com.liferay.portal.model.Image remove(long imageId)
50          throws com.liferay.portal.NoSuchImageException,
51              com.liferay.portal.SystemException;
52  
53      public com.liferay.portal.model.Image remove(
54          com.liferay.portal.model.Image image)
55          throws com.liferay.portal.SystemException;
56  
57      /**
58       * @deprecated Use {@link #update(Image, boolean merge)}.
59       */
60      public com.liferay.portal.model.Image update(
61          com.liferay.portal.model.Image image)
62          throws com.liferay.portal.SystemException;
63  
64      /**
65       * Add, update, or merge, the entity. This method also calls the model
66       * listeners to trigger the proper events associated with adding, deleting,
67       * or updating an entity.
68       *
69       * @param  image the entity to add, update, or merge
70       * @param  merge boolean value for whether to merge the entity. The default
71       *         value is false. Setting merge to true is more expensive and
72       *         should only be true when image is transient. See
73       *         LEP-5473 for a detailed discussion of this method.
74       * @return the entity that was added, updated, or merged
75       */
76      public com.liferay.portal.model.Image update(
77          com.liferay.portal.model.Image image, boolean merge)
78          throws com.liferay.portal.SystemException;
79  
80      public com.liferay.portal.model.Image updateImpl(
81          com.liferay.portal.model.Image image, boolean merge)
82          throws com.liferay.portal.SystemException;
83  
84      public com.liferay.portal.model.Image findByPrimaryKey(long imageId)
85          throws com.liferay.portal.NoSuchImageException,
86              com.liferay.portal.SystemException;
87  
88      public com.liferay.portal.model.Image fetchByPrimaryKey(long imageId)
89          throws com.liferay.portal.SystemException;
90  
91      public java.util.List<com.liferay.portal.model.Image> findBySize(int size)
92          throws com.liferay.portal.SystemException;
93  
94      public java.util.List<com.liferay.portal.model.Image> findBySize(int size,
95          int start, int end) throws com.liferay.portal.SystemException;
96  
97      public java.util.List<com.liferay.portal.model.Image> findBySize(int size,
98          int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
99          throws com.liferay.portal.SystemException;
100 
101     public com.liferay.portal.model.Image findBySize_First(int size,
102         com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.NoSuchImageException,
104             com.liferay.portal.SystemException;
105 
106     public com.liferay.portal.model.Image findBySize_Last(int size,
107         com.liferay.portal.kernel.util.OrderByComparator obc)
108         throws com.liferay.portal.NoSuchImageException,
109             com.liferay.portal.SystemException;
110 
111     public com.liferay.portal.model.Image[] findBySize_PrevAndNext(
112         long imageId, int size,
113         com.liferay.portal.kernel.util.OrderByComparator obc)
114         throws com.liferay.portal.NoSuchImageException,
115             com.liferay.portal.SystemException;
116 
117     public java.util.List<Object> findWithDynamicQuery(
118         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
119         throws com.liferay.portal.SystemException;
120 
121     public java.util.List<Object> findWithDynamicQuery(
122         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
123         int end) throws com.liferay.portal.SystemException;
124 
125     public java.util.List<com.liferay.portal.model.Image> findAll()
126         throws com.liferay.portal.SystemException;
127 
128     public java.util.List<com.liferay.portal.model.Image> findAll(int start,
129         int end) throws com.liferay.portal.SystemException;
130 
131     public java.util.List<com.liferay.portal.model.Image> findAll(int start,
132         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.SystemException;
134 
135     public void removeBySize(int size)
136         throws com.liferay.portal.SystemException;
137 
138     public void removeAll() throws com.liferay.portal.SystemException;
139 
140     public int countBySize(int size) throws com.liferay.portal.SystemException;
141 
142     public int countAll() throws com.liferay.portal.SystemException;
143 }