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