1   /**
2    * Copyright (c) 2000-2008 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.tasks.service.persistence;
24  
25  /**
26   * <a href="TasksProposalPersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface TasksProposalPersistence {
32      public com.liferay.portlet.tasks.model.TasksProposal create(long proposalId);
33  
34      public com.liferay.portlet.tasks.model.TasksProposal remove(long proposalId)
35          throws com.liferay.portal.SystemException,
36              com.liferay.portlet.tasks.NoSuchProposalException;
37  
38      public com.liferay.portlet.tasks.model.TasksProposal remove(
39          com.liferay.portlet.tasks.model.TasksProposal tasksProposal)
40          throws com.liferay.portal.SystemException;
41  
42      /**
43       * @deprecated Use <code>update(TasksProposal tasksProposal, boolean merge)</code>.
44       */
45      public com.liferay.portlet.tasks.model.TasksProposal update(
46          com.liferay.portlet.tasks.model.TasksProposal tasksProposal)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * Add, update, or merge, the entity. This method also calls the model
51       * listeners to trigger the proper events associated with adding, deleting,
52       * or updating an entity.
53       *
54       * @param        tasksProposal the entity to add, update, or merge
55       * @param        merge boolean value for whether to merge the entity. The
56       *                default value is false. Setting merge to true is more
57       *                expensive and should only be true when tasksProposal is
58       *                transient. See LEP-5473 for a detailed discussion of this
59       *                method.
60       * @return        true if the portlet can be displayed via Ajax
61       */
62      public com.liferay.portlet.tasks.model.TasksProposal update(
63          com.liferay.portlet.tasks.model.TasksProposal tasksProposal,
64          boolean merge) throws com.liferay.portal.SystemException;
65  
66      public com.liferay.portlet.tasks.model.TasksProposal updateImpl(
67          com.liferay.portlet.tasks.model.TasksProposal tasksProposal,
68          boolean merge) throws com.liferay.portal.SystemException;
69  
70      public com.liferay.portlet.tasks.model.TasksProposal findByPrimaryKey(
71          long proposalId)
72          throws com.liferay.portal.SystemException,
73              com.liferay.portlet.tasks.NoSuchProposalException;
74  
75      public com.liferay.portlet.tasks.model.TasksProposal fetchByPrimaryKey(
76          long proposalId) throws com.liferay.portal.SystemException;
77  
78      public java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findByGroupId(
79          long groupId) throws com.liferay.portal.SystemException;
80  
81      public java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findByGroupId(
82          long groupId, int begin, int end)
83          throws com.liferay.portal.SystemException;
84  
85      public java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findByGroupId(
86          long groupId, int begin, int end,
87          com.liferay.portal.kernel.util.OrderByComparator obc)
88          throws com.liferay.portal.SystemException;
89  
90      public com.liferay.portlet.tasks.model.TasksProposal findByGroupId_First(
91          long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
92          throws com.liferay.portal.SystemException,
93              com.liferay.portlet.tasks.NoSuchProposalException;
94  
95      public com.liferay.portlet.tasks.model.TasksProposal findByGroupId_Last(
96          long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
97          throws com.liferay.portal.SystemException,
98              com.liferay.portlet.tasks.NoSuchProposalException;
99  
100     public com.liferay.portlet.tasks.model.TasksProposal[] findByGroupId_PrevAndNext(
101         long proposalId, long groupId,
102         com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.SystemException,
104             com.liferay.portlet.tasks.NoSuchProposalException;
105 
106     public java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findByG_U(
107         long groupId, long userId) throws com.liferay.portal.SystemException;
108 
109     public java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findByG_U(
110         long groupId, long userId, int begin, int end)
111         throws com.liferay.portal.SystemException;
112 
113     public java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findByG_U(
114         long groupId, long userId, int begin, int end,
115         com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.SystemException;
117 
118     public com.liferay.portlet.tasks.model.TasksProposal findByG_U_First(
119         long groupId, long userId,
120         com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.SystemException,
122             com.liferay.portlet.tasks.NoSuchProposalException;
123 
124     public com.liferay.portlet.tasks.model.TasksProposal findByG_U_Last(
125         long groupId, long userId,
126         com.liferay.portal.kernel.util.OrderByComparator obc)
127         throws com.liferay.portal.SystemException,
128             com.liferay.portlet.tasks.NoSuchProposalException;
129 
130     public com.liferay.portlet.tasks.model.TasksProposal[] findByG_U_PrevAndNext(
131         long proposalId, long groupId, long userId,
132         com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.SystemException,
134             com.liferay.portlet.tasks.NoSuchProposalException;
135 
136     public com.liferay.portlet.tasks.model.TasksProposal findByC_C(
137         long classNameId, java.lang.String classPK)
138         throws com.liferay.portal.SystemException,
139             com.liferay.portlet.tasks.NoSuchProposalException;
140 
141     public com.liferay.portlet.tasks.model.TasksProposal fetchByC_C(
142         long classNameId, java.lang.String classPK)
143         throws com.liferay.portal.SystemException;
144 
145     public java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findWithDynamicQuery(
146         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
147         throws com.liferay.portal.SystemException;
148 
149     public java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findWithDynamicQuery(
150         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
151         int begin, int end) throws com.liferay.portal.SystemException;
152 
153     public java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findAll()
154         throws com.liferay.portal.SystemException;
155 
156     public java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findAll(
157         int begin, int end) throws com.liferay.portal.SystemException;
158 
159     public java.util.List<com.liferay.portlet.tasks.model.TasksProposal> findAll(
160         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
161         throws com.liferay.portal.SystemException;
162 
163     public void removeByGroupId(long groupId)
164         throws com.liferay.portal.SystemException;
165 
166     public void removeByG_U(long groupId, long userId)
167         throws com.liferay.portal.SystemException;
168 
169     public void removeByC_C(long classNameId, java.lang.String classPK)
170         throws com.liferay.portal.SystemException,
171             com.liferay.portlet.tasks.NoSuchProposalException;
172 
173     public void removeAll() throws com.liferay.portal.SystemException;
174 
175     public int countByGroupId(long groupId)
176         throws com.liferay.portal.SystemException;
177 
178     public int countByG_U(long groupId, long userId)
179         throws com.liferay.portal.SystemException;
180 
181     public int countByC_C(long classNameId, java.lang.String classPK)
182         throws com.liferay.portal.SystemException;
183 
184     public int countAll() throws com.liferay.portal.SystemException;
185 }