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.documentlibrary.service.persistence;
21  
22  import com.liferay.portal.service.persistence.BasePersistence;
23  
24  /**
25   * <a href="DLFileVersionPersistence.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   *
29   */
30  public interface DLFileVersionPersistence extends BasePersistence {
31      public void cacheResult(
32          com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion);
33  
34      public void cacheResult(
35          java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> dlFileVersions);
36  
37      public void clearCache();
38  
39      public com.liferay.portlet.documentlibrary.model.DLFileVersion create(
40          long fileVersionId);
41  
42      public com.liferay.portlet.documentlibrary.model.DLFileVersion remove(
43          long fileVersionId)
44          throws com.liferay.portal.SystemException,
45              com.liferay.portlet.documentlibrary.NoSuchFileVersionException;
46  
47      public com.liferay.portlet.documentlibrary.model.DLFileVersion remove(
48          com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion)
49          throws com.liferay.portal.SystemException;
50  
51      /**
52       * @deprecated Use <code>update(DLFileVersion dlFileVersion, boolean merge)</code>.
53       */
54      public com.liferay.portlet.documentlibrary.model.DLFileVersion update(
55          com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion)
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        dlFileVersion 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 dlFileVersion 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.documentlibrary.model.DLFileVersion update(
72          com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion,
73          boolean merge) throws com.liferay.portal.SystemException;
74  
75      public com.liferay.portlet.documentlibrary.model.DLFileVersion updateImpl(
76          com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion,
77          boolean merge) throws com.liferay.portal.SystemException;
78  
79      public com.liferay.portlet.documentlibrary.model.DLFileVersion findByPrimaryKey(
80          long fileVersionId)
81          throws com.liferay.portal.SystemException,
82              com.liferay.portlet.documentlibrary.NoSuchFileVersionException;
83  
84      public com.liferay.portlet.documentlibrary.model.DLFileVersion fetchByPrimaryKey(
85          long fileVersionId) throws com.liferay.portal.SystemException;
86  
87      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByF_N(
88          long folderId, java.lang.String name)
89          throws com.liferay.portal.SystemException;
90  
91      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByF_N(
92          long folderId, java.lang.String name, int start, int end)
93          throws com.liferay.portal.SystemException;
94  
95      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByF_N(
96          long folderId, java.lang.String name, int start, int end,
97          com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException;
99  
100     public com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_N_First(
101         long folderId, java.lang.String name,
102         com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.SystemException,
104             com.liferay.portlet.documentlibrary.NoSuchFileVersionException;
105 
106     public com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_N_Last(
107         long folderId, java.lang.String name,
108         com.liferay.portal.kernel.util.OrderByComparator obc)
109         throws com.liferay.portal.SystemException,
110             com.liferay.portlet.documentlibrary.NoSuchFileVersionException;
111 
112     public com.liferay.portlet.documentlibrary.model.DLFileVersion[] findByF_N_PrevAndNext(
113         long fileVersionId, long folderId, java.lang.String name,
114         com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.SystemException,
116             com.liferay.portlet.documentlibrary.NoSuchFileVersionException;
117 
118     public com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_N_V(
119         long folderId, java.lang.String name, double version)
120         throws com.liferay.portal.SystemException,
121             com.liferay.portlet.documentlibrary.NoSuchFileVersionException;
122 
123     public com.liferay.portlet.documentlibrary.model.DLFileVersion fetchByF_N_V(
124         long folderId, java.lang.String name, double version)
125         throws com.liferay.portal.SystemException;
126 
127     public com.liferay.portlet.documentlibrary.model.DLFileVersion fetchByF_N_V(
128         long folderId, java.lang.String name, double version,
129         boolean retrieveFromCache) throws com.liferay.portal.SystemException;
130 
131     public java.util.List<Object> findWithDynamicQuery(
132         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
133         throws com.liferay.portal.SystemException;
134 
135     public java.util.List<Object> findWithDynamicQuery(
136         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
137         int end) throws com.liferay.portal.SystemException;
138 
139     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findAll()
140         throws com.liferay.portal.SystemException;
141 
142     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findAll(
143         int start, int end) throws com.liferay.portal.SystemException;
144 
145     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findAll(
146         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.SystemException;
148 
149     public void removeByF_N(long folderId, java.lang.String name)
150         throws com.liferay.portal.SystemException;
151 
152     public void removeByF_N_V(long folderId, java.lang.String name,
153         double version)
154         throws com.liferay.portal.SystemException,
155             com.liferay.portlet.documentlibrary.NoSuchFileVersionException;
156 
157     public void removeAll() throws com.liferay.portal.SystemException;
158 
159     public int countByF_N(long folderId, java.lang.String name)
160         throws com.liferay.portal.SystemException;
161 
162     public int countByF_N_V(long folderId, java.lang.String name, double version)
163         throws com.liferay.portal.SystemException;
164 
165     public int countAll() throws com.liferay.portal.SystemException;
166 }